Commit Graph

19 Commits

Author SHA1 Message Date
Matthias Kramm
79061f9de2 move simplejson from stdlib/ to third_party/ (#752) 2016-12-06 17:43:47 -08:00
Onno Kortmann
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
5ba7abc559 Add GenericMeta (so that classes can be Generic when they already hav… (#703) 2016-12-02 12:09:59 -08:00
Josiah Boning
c9ad4b8dc0 Have frozenset inherit from FrozenSet (#726)
Fixes python/mypy#2514
2016-11-30 17:58:11 -08:00
Roy Williams
33b81b9e2b Add MutableSet to collections (#691) 2016-11-24 11:39:00 +00:00
Jelle Zijlstra
b10125cd7d commands: add python 2 pyi file (#698)
Partially fixes issue #531
2016-11-23 12:14:03 +00:00
Jelle Zijlstra
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
9bc07e7b9d fix typo in list.__delslice__ (#696) 2016-11-23 11:41:33 +00: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
Onno Kortmann
2d19599b68 python2: gmtime(None), localtime(None), and ctime(None) works (#662) 2016-11-11 09:33:50 -08:00
Roy Williams
f7f9c956ff Add stubs for cookielib to 2.
(Extracted from PR #530.))
2016-11-08 19:39:27 -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
onnokort
cd1ef9149b Queue.get(...) takes optional float (#661) 2016-11-05 10:43:52 -07:00
Elazar Gershuni
59f86e1b6a fix self type for stdlib/2 (#645) 2016-10-30 14:51:52 -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
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
cb97bb54c0 Move 2.7 to 2 (#635)
Closes #579.
2016-10-26 16:24:49 -07:00