Daisuke Miyakawa and Guido van Rossum
57aa1923d5
Make sqlite3's Connection.rollback() return None ( #758 )
...
Fixes #747 .
2016-12-07 16:22:47 -08:00
George King and Jukka Lehtosalo
af5b5c83fd
Make shutil.copytree stub's ignore parameter optional. ( #740 )
...
* Make `shutil.copytree` stub's `ignore` parameter optional.
* python2.7 shutil.copytree `ignore` annotated as optional.
2016-12-07 14:47:34 -08:00
George King and Jukka Lehtosalo
dccc29bc2f
Add None to type union for subprocess.Popen.communicate input. ( #743 )
...
* Add `None` to type union for `subprocess.Popen.communicate` stub's `input` parameter.
* subprocess.communicate `input` annotated as `Optional[AnyStr]` for both 2.7 and 3.x; `timeout` as `Optional[float]`.
2016-12-07 14:46:34 -08:00
Jukka Lehtosalo and Guido van Rossum
f39f9bf694
Make object_hook of json.load and json.loads optional (Python 2) ( #757 )
2016-12-07 13:32:56 -08:00
Matthias Kramm and Jukka Lehtosalo
79061f9de2
move simplejson from stdlib/ to third_party/ ( #752 )
2016-12-06 17:43:47 -08:00
Onno Kortmann and Guido van Rossum
69ea0ad43f
Iteration and fetch* fixes to the sqlite3.Cursor type ( #663 )
...
- Cursor is an Iterator of Any now, and .__iter__(..) and .__next__(..)
have been changed / made explicit to reflect this.
- .fetchall(..)/.fetchmany(..)/.fetchone(..) return (lists of) Anys
instead of tuples.
As per discussion in PR #663 , the output of fetching values from the
cursor can be customized with a custom assignment to
.row_factory. Therefore the correct return type for fetching is Any and
not tuple.
2016-12-06 08:17:21 -08:00
Calen Pennington and Guido van Rossum
5ba7abc559
Add GenericMeta (so that classes can be Generic when they already hav… ( #703 )
2016-12-02 12:09:59 -08:00
Josiah Boning and Guido van Rossum
c9ad4b8dc0
Have frozenset inherit from FrozenSet ( #726 )
...
Fixes python/mypy#2514
2016-11-30 17:58:11 -08:00
Roy Williams and Jukka Lehtosalo
33b81b9e2b
Add MutableSet to collections ( #691 )
2016-11-24 11:39:00 +00:00
Jelle Zijlstra and Jukka Lehtosalo
b10125cd7d
commands: add python 2 pyi file ( #698 )
...
Partially fixes issue #531
2016-11-23 12:14:03 +00:00
Jelle Zijlstra and Jukka Lehtosalo
7ac78b163d
Remove BaseException.with_traceback in py2 ( #697 )
...
This method doesn't exist in Python 2; it was added in Python 3. See https://docs.python.org/2/library/exceptions.html#exceptions.BaseException versus https://docs.python.org/3/library/exceptions.html#BaseException.with_traceback .
2016-11-23 11:42:59 +00:00
Jelle Zijlstra and Jukka Lehtosalo
9bc07e7b9d
fix typo in list.__delslice__ ( #696 )
2016-11-23 11:41:33 +00:00
Onno Kortmann and Guido van Rossum
c4125739e5
The timeout argument to Queue.{get,put} may be None ( #682 )
...
Python 2 and 3.
2016-11-11 10:29:52 -08:00
Onno Kortmann and Guido van Rossum
2d19599b68
python2: gmtime(None), localtime(None), and ctime(None) works ( #662 )
2016-11-11 09:33:50 -08:00
Roy Williams and Guido van Rossum
f7f9c956ff
Add stubs for cookielib to 2.
...
(Extracted from PR #530.))
2016-11-08 19:39:27 -08:00
TrueBrain and Guido van Rossum
341c4edc37
Args is a predefined attribute on BaseException, and always Tuple[Any, ...] ( #666 )
2016-11-05 16:33:58 -07:00
TrueBrain and Guido van Rossum
cecb64b59f
In TextIO, 'errors' is Optional ( #665 )
2016-11-05 15:02:35 -07:00
onnokort and Guido van Rossum
cd1ef9149b
Queue.get(...) takes optional float ( #661 )
2016-11-05 10:43:52 -07:00
Elazar Gershuni and Guido van Rossum
59f86e1b6a
fix self type for stdlib/2 ( #645 )
2016-10-30 14:51:52 -07:00
TrueBrain and Guido van Rossum
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 and Guido van Rossum
7a623f2cea
Dedicated TypeVar for type.__subclasses__ ( #639 )
2016-10-30 10:29:51 -07:00
Guido van Rossum
c3ddd3c5f2
Improve __subclasses__() signature. Fixes python/mypy#2236 .
2016-10-27 17:31:03 -07:00
Guido van Rossum and GitHub
cb97bb54c0
Move 2.7 to 2 ( #635 )
...
Closes #579 .
2016-10-26 16:24:49 -07:00