Hong Minhee
5fc1b4b948
Add missing MutableSet abstract base class ( #680 )
2016-11-10 14:10:10 -08:00
Guido van Rossum
ec4987fa5d
Fix AwaitableGenerator inheritance; Awaitable is the return value, not the yielded value ( #679 )
2016-11-10 11:57:31 -08:00
Elazar Gershuni
dfe4bf0a70
Fix broken sys.version_info check in importlib/abc.pyi ( #673 )
...
Fixes #672 .
2016-11-09 08:43:06 -08:00
Hong Minhee
13b1cdc834
Stubs for collections.abc ( #671 )
...
The ABC types were moved to collections.abc in 3.3 (but still exist in collections too).
2016-11-08 21:37:33 -08:00
Roy Williams
1b30761802
Small changes by @rowilla to collections.pyi and urllib/requests.pyi.
...
(Extracted from PR #530.)
2016-11-08 19:40:10 -08:00
Jon Dufresne
4b369945d0
Change struct fmt argument to str instead of AnyStr ( #669 )
...
Switching between a bytes fmt and str fmt argument can cause a BytesWarning
when running Python with the -b command line argument.
2016-11-07 16:58:25 -08:00
TrueBrain
341c4edc37
Args is a predefined attribute on BaseException, and always Tuple[Any, ...] ( #666 )
2016-11-05 16:33:58 -07:00
TrueBrain
cecb64b59f
In TextIO, 'errors' is Optional ( #665 )
2016-11-05 15:02:35 -07:00
Guido van Rossum
53014497c4
Add Coroutine. Fix signature for Generator.throw(). ( #656 )
2016-11-04 11:46:50 -07:00
Guido van Rossum
7c20adb715
Fix memoryview stub ( #651 )
...
Fixes python/mypy#2390
2016-11-02 17:18:44 -07:00
Elazar Gershuni
090667c7b2
fix self in urllib ( #643 )
2016-10-30 15:01:46 -07:00
Elazar Gershuni
252a772b67
fix self in ssl, unittest and multiprocessing/managers ( #644 )
2016-10-30 12:20:03 -07:00
Kai Lautaportti
b1c545cee6
Mark use of tzinfo optional in the datetime module. ( #637 )
2016-10-30 12:00:18 -07:00
TrueBrain
15ec66cdd6
Consider __doc__ always Optional. ( #641 )
...
python/mypy#2380 showed a discrepancy between object and FunctionType in stdlib2. The first defined __doc__ to be str, the second Optional[str]. As FunctionType depends on object, this is no longer valid.
As suggested by @gvanrossum in python/mypy#2380 , all __doc__ should be considered Optional.
(Final verdict was just to remove most __doc__ attributes since it's inherited from object.)
2016-10-30 11:48:23 -07:00
Elazar Gershuni
1d47c6fdb8
Directly import ABCMeta (and abstractmethod) from abc ( #640 )
...
This change is needed for mypy/#2365.
2016-10-30 11:30:22 -07:00
Elazar Gershuni
7a623f2cea
Dedicated TypeVar for type.__subclasses__ ( #639 )
2016-10-30 10:29:51 -07:00
Dima Gerasimov
58d864d726
Add __enter__ and __exit__ to Pool stub ( #642 )
2016-10-30 10:18:51 -07:00
Guido van Rossum
c3ddd3c5f2
Improve __subclasses__() signature. Fixes python/mypy#2236 .
2016-10-27 17:31:03 -07:00
Filip Figiel
d60bea14f6
Improve concurrent.futures.wait function stub ( #634 )
2016-10-26 07:19:24 -07:00
Gerhard Hagerer
0c2e9cf3be
Added variable types for resources.pyi ( #632 )
...
Just some output from stubgen.pyi
2016-10-26 07:16:48 -07:00
Kai Lautaportti
c8f324298d
Added typing for os.cpu_count() ( #628 )
2016-10-25 10:46:33 -07:00
Kai Lautaportti
f6bbc46c35
Fix functools.lru_cache() type hint to allow maxsize=None ( #627 )
2016-10-22 15:45:57 -07:00
Elazar
7224b67532
Remove @builtinclass ( #626 )
2016-10-22 12:25:02 -07:00
Matthias Kramm
7d80824092
Better definition for xml/sax/__init__.pyi. ( #621 )
...
Also, merge 2.7/xml/sax and 3/xml/sax into 2and3/xml/sax.
2016-10-19 15:30:25 -07:00
Kai Lautaportti
8fec896898
Added RecursionError to builtins for Python >= 3.5 ( #620 )
...
Closes #619 .
2016-10-19 15:06:10 -07:00
Matthias Kramm
94d3ddb60a
change the way 'os' imports 'os.path' ( #601 )
...
* use 'from . import path' instead, in both PY2 and PY3
* update blacklist to include os/__init__.pyi
2016-10-17 17:49:12 -07:00
Joshua Smock
e503ad4594
Allow any kind of item in the list returned by select ( #615 )
2016-10-17 12:11:10 -07:00
Calen Pennington
8865baf840
Make ABCMeta inherit from type in py3 ( #613 )
2016-10-17 09:19:10 -07:00
Guido van Rossum
8d1026cade
Fix timeout parameter to Popen.wait() -- it is optional (in both senses).
2016-10-15 21:12:32 -07:00
Sebastian Meßmer
b9ab4ae1c2
Add timeout parameter to subprocess.Popen.wait() ( #607 )
...
Also define TimeoutExpired exception.
2016-10-15 14:59:40 -07:00
Yegor Roganov
e4073e385a
Improve types of staticmethod and classmethod ( #609 )
...
Fixes #318
2016-10-15 14:17:17 -07:00
Yegor Roganov
2d8ff30e7a
Improve itertools.islice type ( #610 )
...
`stop` parameter to `islice` can be `None`,
which is important when checking with --strict-optional
2016-10-15 14:14:36 -07:00
Reiner Gerecke
5624e7fd4b
Add collections.Container to Python 2/3 ( #608 )
2016-10-15 08:16:02 -07:00
Guido van Rossum
0b04c44710
Revert last two commits.
...
Reason: https://github.com/python/mypy/issues/328
* Revert "Make fromkeys() take an Iterable instead of a sequence. (#605 )"
This reverts commit 66e8d4a14f .
* Revert "Make dict.fromkeys() a classmethod (which it is). (#604 )"
This reverts commit 26dfcb6859 .
* Add an explanation for fromkeys() being a staticmethod.
2016-10-14 21:11:10 -07:00
Guido van Rossum
66e8d4a14f
Make fromkeys() take an Iterable instead of a sequence. ( #605 )
...
(This, too, came up in python/mypy#2254 -- thanks @rwbarton!)
2016-10-14 10:00:43 -07:00
Guido van Rossum
26dfcb6859
Make dict.fromkeys() a classmethod (which it is). ( #604 )
...
This came up in https://github.com/python/mypy/issues/2254 .
I don't know why it was previously defined as a staticmethod, perhaps
there was an old mypy issue?
2016-10-14 09:41:26 -07:00
jgarvin
1b9266d801
Let open() take a pathlib.Path starting in 3.6 ( #596 )
2016-10-13 16:17:39 -07:00
Alex Jurkiewicz
8d10e885d1
[review] Add multiprocessing.Pool ( #523 )
2016-10-12 16:44:37 -07:00
Eklavya Sharma
7f7a5789bd
Add attribute 'name' to StringIO ( #600 )
...
Add an attribute 'name' of type str to StringIO.StringIO in python2
and io.StringIO in python2 and python3.
Fixes #598 .
2016-10-12 07:34:58 -07:00
Eklavya Sharma
b92991bc2a
Add TimeTuple in python3's time.pyi and datetime.pyi. ( #597 )
...
Add `TimeTuple = Tuple[int, int, int, int, int, int, int, int, int]`
to stdlib/3/time.pyi and stdlib/3/datetime.pyi.
Use `TimeTuple` instead of `tuple` (where relevant) in time.pyi for
stronger type checking.
Use `TimeTuple` instead of
`Tuple[int, int, int, int, int, int, int, int, int]` in datetime.pyi
to increase readability.
2016-10-11 14:48:47 -07:00
paavoap
71042452c7
Add stub for SameFileError. ( #594 )
2016-10-10 08:07:54 -07:00
jgarvin
490b34649f
Add stub for shutil.which ( #592 )
2016-10-09 19:58:55 -07:00
paavoap
cac07d6dea
Add type hints for _create_default_https_context and _create_unverified_context. ( #583 )
2016-10-09 19:56:01 -07:00
Alvaro Caceres
f90a6d1c0e
Inspect: use any instead of object ( #585 )
...
* Have inspect.getmembers' return value use Any instead of object
2016-10-06 11:36:17 -07:00
Alvaro Caceres
9586411dad
Add MONDAY, TUESDAY, ... constants to stdlib/calendar ( #586 )
...
These are undocumented but enough people seem to use them that they
should be considered public
2016-10-06 10:19:16 -07:00
Evgeniy Vasilev
0e5003b61e
Add HTTPStatus definition for python3.5+ ( #577 )
...
Fixes #576 .
2016-09-29 13:09:30 -07:00
Manuel Krebber
aa549db5e5
Added missing operations to collections.Counter stub. ( #575 )
2016-09-27 10:07:57 -07:00
Sebastian Meßmer
34b343ba66
Add missing type hints to atexit.register() ( #571 )
2016-09-23 13:35:55 -07:00
dlinnemeyer
bbf0ac2d1f
Fixing timezone utc type ( #568 )
...
* switching to timezone type
* taking a shot at 2.7
2016-09-23 05:39:52 -07:00
Samuel Colvin
5161341240
add signal.Signals for python3.5 ( #555 )
2016-09-22 12:50:27 -07:00