Calen Pennington
5ba7abc559
Add GenericMeta (so that classes can be Generic when they already hav… ( #703 )
2016-12-02 12:09:59 -08:00
Jelle Zijlstra
ed4f9e9b0b
urlencode: change parameters to Any instead of AnyStr ( #715 )
...
The implementation of this function calls str() on all arguments, so it accepts
any object (https://hg.python.org/cpython/file/3.5/Lib/urllib/parse.py#l801 ).
This was discussed on the mypy gitter chat.
2016-12-01 11:38:23 +00:00
Josiah Boning
c9ad4b8dc0
Have frozenset inherit from FrozenSet ( #726 )
...
Fixes python/mypy#2514
2016-11-30 17:58:11 -08:00
Łukasz Langa
85807ed72a
logging.Formatter attributes fixed ( #721 )
...
Fixes #720 .
Related changes: used a NamedTuple for time.struct_time on Python 3, used
sys.version selectors for proper typing of #716 , added missing *Style classes
to logging on Python 3.
2016-11-30 09:09:05 -08:00
rymdhund
eb90eddd8f
Fix urllib.parse.urlencode signature ( #702 )
...
Fixes #700
2016-11-24 11:45:20 +00:00
Richard Eames
4f567d993b
Add missing self parameters ( #695 )
...
A few methods are missing the `self` parameter in `urllib.RobotFileParser`
2016-11-23 11:37:39 +00:00
Ryan C. Thompson
f36d7a3cd3
Multiprocessing fixes ( #687 )
...
* Fix type declarations for multiprocessing.pool.ThreadPool
The existing incomplete type declarations were replaced by a copy of
multiprocessing.Pool's declarations, suitably modified.
Fixes #683 .
* Change iterable type to Iterable[Iterable[Any]] in starmap
multiprocessing.Pool and multiprocessing.pool.ThreadPool have starmap
and related methods, where the iterable argument is expected to yield
iterables. The type declarations now reflect this.
2016-11-12 17:31:54 -08:00
jgarvin
88350e7f47
Add ns accurate times in os.stat_result ( #686 )
2016-11-12 17:20:00 -08:00
Onno Kortmann
c4125739e5
The timeout argument to Queue.{get,put} may be None ( #682 )
...
Python 2 and 3.
2016-11-11 10:29:52 -08:00
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