blokeley
c5479b11bb
Add private methods stubs to queue.Queue ( #1507 )
...
It is a common pattern to subclass queue.Queue and override the private methods _init, _get, _put and _qsize so they should have stubs.
2017-08-01 14:37:51 -07:00
Matthias Kramm
6f23d124c0
Remove subclass IOBase from TextIOBase. ( #1505 )
...
This used to cause TextIOBase to subclass both BinaryIO and TextIO, even
though those two are incompatible.
2017-07-28 21:07:37 -07:00
Jelle Zijlstra
2d97894fa9
collections: make UserDict, UserList, and UserString concrete ( #1477 )
...
* collections: make UserDict, UserList, and UserString concrete
* add version checks
573b44c18f
* remove redundant methods
2017-07-26 16:34:43 -07:00
Semyon Proshev
72fbc459a7
Add __init__ to types.MethodType ( #1499 )
2017-07-26 08:38:27 -07:00
Thomas Grainger
15c8474e35
fix email.mime ( #1482 )
...
* add missing python 2 email.mime.application stub
* restore missing python 3 mime package
* Delete __init__.py
2017-07-26 08:29:30 -07:00
Luka Sterbic
34c8aa0d4c
traceback: use StackSummary where possible ( #1495 )
2017-07-26 08:27:43 -07:00
Michael Lee
1e04a8c1b8
Add stubs for typing_extensions module ( #1471 )
2017-07-23 12:19:49 -07:00
Michael Lee
6d3024fb19
Add NoReturn type to typing stubs ( #1496 )
2017-07-20 21:24:34 -07:00
toejough
f6b013ba52
ignore type for mock.pyi inheritance from Any ( #1492 )
...
It is currently required to shut up mypy when run with `--strict`
or `--disallow-subclassing-any`. The `Any` base class is currently
the only way to allow passing an instance of `Mock` to functions
expecting other classes (as is Mock's purpose).
2017-07-19 11:33:59 -07:00
Jelle Zijlstra
be7490322b
Counter: fix return value of most_common() ( #1491 )
...
https://docs.python.org/3/library/collections.html#collections.Counter.most_common
https://docs.python.org/2/library/collections.html#collections.Counter.most_common
2017-07-19 20:29:32 +03:00
Jelle Zijlstra
00ddb1c84a
encodings: IncrementalEncoder and Decoder concrete ( #1490 )
...
These stubs are identical in Python 2 and 3, but I believe they
should not be merged, because there are numerous other modules
in the encodings package, and some only exist in some Python
versions. I don't think we can support that in the 2and3
directory.
2017-07-19 20:28:43 +03:00
Jelle Zijlstra
32d9c8cb8f
make io.IncrementalNewlineDecoder concrete ( #1489 )
...
Part of #1476
2017-07-19 20:28:25 +03:00
Jelle Zijlstra
74966bacd9
distutils: make Command classes non-abstract ( #1488 )
2017-07-19 20:28:16 +03:00
Jelle Zijlstra
ac651d2f8c
Fix a few TODOs ( #1487 )
...
* fix some easy TODOs
* fix io
2017-07-19 20:27:50 +03:00
Jelle Zijlstra
1515ed9f88
fix some abstract classes in third_party/ ( #1486 )
2017-07-19 20:27:22 +03:00
Ashwini Chaudhary
11a479fd69
Add stub for formatter ( #1481 )
2017-07-18 19:19:14 -07:00
eujing
be31439168
Added missing Process fields; More accurate Optional parameters ( #1483 )
2017-07-18 19:17:23 -07:00
Matthias Kramm
a5d044361b
Add "conventions" section to README.md ( #1470 )
...
This documents, among others, the unicode -> Union[bytes, unicode] promotion that python/peps#302 removes from PEP 484.
2017-07-18 13:58:24 -07:00
Ashwini Chaudhary
a4a34a0e73
Added stub for stringold module ( #1460 )
2017-07-16 15:08:27 -07:00
Thomas Grainger
2bb7ea9595
csv DictReader should only yield OrderedDicts in Py3.6 ( #1478 )
2017-07-14 21:58:52 -07:00
Ivan Levkivskyi
d75ea88da5
Use 'as name' patter to re-export names from stubs (PEP 484) ( #1484 )
2017-07-14 21:31:53 -07:00
rchen152
643aedea1b
Fix the definition of LockType.__exit__. ( #1485 )
2017-07-13 17:30:51 -07:00
Luka Sterbic
dd7ff91519
Support mp.Value.value ( #1480 )
2017-07-12 15:00:14 +02:00
Ashwini Chaudhary
47b3979a83
Added stub for Python 3's _threading_local ( #1462 )
2017-07-10 21:20:02 -07:00
Thomas Grainger
7637549ced
fix DictReader definition ( #1475 )
...
* constructable with Iterable
* __iter__ returns another DictReader
* supports `__next__` on python 3
* supports `next` on python 2
2017-07-10 21:02:59 -07:00
Svyatoslav Ilinskiy
45f2d9d625
Add travis badge ( #1474 )
2017-07-10 14:23:05 -07:00
Jelle Zijlstra
0e26c1f936
asyncio: fix several types ( #1450 )
...
Fixes #1447
2017-07-06 14:22:55 -07:00
rchen152
6368baf42a
Remove duplicate names from posixpath.pyi. ( #1468 )
...
posixpath.pyi did a '*' import of genericpath.pyi and then redefined
everything it imported. Removes the duplicate definitions from posixpath
and improves the ones in genericpath.
2017-07-06 14:22:18 -07:00
Jelle Zijlstra
16aa0651ae
Revert "Add __new__ to str and int stubs in both Pythons. ( #1352 )" ( #1466 )
...
This reverts commit fed4e03e53 .
2017-07-06 14:21:54 -07:00
Ashwini Chaudhary
1a9685c6ce
Added stub for Python 2's _threading_local ( #1461 )
2017-07-04 20:01:17 -07:00
Jelle Zijlstra
318cada66c
os: merge the top and bottom of os/__init__.pyi ( #1458 )
...
* os: merge the top and bottom of os/__init__.pyi
Part of #1427 . In preparation for merging the two stubs, I'm making the files
identical as much as possible. This PR merges the top of the file, down to
but not including the definition of statvfs_result, and the bottom up to
and including os.utime.
This PR mostly adds more "if sys.version_info" block. Until the merger
completes, we'll have some Python 2 blocks in the Python 3 stub and vice versa.
I also add a few missing constants and arguments.
In followup PRs I'll merge the rest of the file. I'll put the trickiest part
(the return values of functions like os.stat) in its own PR.
* back out DirEntry from py2
It relies on stat_result which we don't have yet in py2.
2017-07-04 19:30:55 -07:00
Jelle Zijlstra
a419b696d4
make os.path identical in Python 2 and 3 ( #1459 )
...
Part of #1427 . I don't think we can actually merge these until we merge
os/__init__.pyi too, which will take a few more PRs.
2017-07-04 19:27:27 -07:00
Jelle Zijlstra
7ecc979211
locale: broaden type of val argument to format ( #1453 )
...
Fixes #1350
2017-07-04 19:21:12 -07:00
Jelle Zijlstra
f264eda4ed
builtins: mode argument to open can be unicode ( #1452 )
...
Part of #1411
Also remove some explicit parameter defaults.
2017-07-04 19:20:45 -07:00
Jelle Zijlstra
9947c9d513
urlparse: allow unicode arguments in more places ( #1451 )
...
* urlparse: allow unicode arguments in more places
Part of #1411
urlunsplit() and similar functions accept either unicode or str in all
places. Their actual return type is unicode if any of the arguments is
unicode and nonempty, which the type system can't exactly express. I
left the return type as str because str is implicitly promoted to
unicode, so using the return type in a place that accepts unicode should
work.
unquote, parse_qs, and parse_qsl return unicode if you pass them unicode,
so AnyStr is appropriate in their stubs.
* fix type for urldefrag
The return type was wrong; this function returns a 2-tuple. The second member of the tuple is always a `str` if the argument type does not contain '#', and otherwise matches the type of the argument.
2017-07-04 19:20:23 -07:00
Jelle Zijlstra
fee2eaae30
xml.sax.saxutils: make some functions take AnyStr ( #1457 )
...
Fixes #1062
2017-07-04 19:18:43 -07:00
Jelle Zijlstra
2b97c02801
logging: make Logger inherit from Filterer ( #1448 )
...
Fixes #1401
2017-07-04 19:18:01 -07:00
Jelle Zijlstra
e980c8987b
tokenize: add generate_tokens in py3 ( #1449 )
...
Fixes #1433
This is undocumented but somebody is asking for it to be included.
2017-07-04 19:17:39 -07:00
macheins
ab5f196fca
Add maxsize attribute to Queue ( #1465 )
2017-07-04 08:40:17 -07:00
Roy Williams
7720a90bde
Add stubs for pynamodb ( #1431 )
...
Approval here: https://github.com/pynamodb/PynamoDB/issues/209
2017-07-03 14:11:22 -07:00
Ivan Levkivskyi
97737ce8c2
Add collections import in typing for type aliases to always work ( #1456 )
...
* Add collections import in typing for type aliases to always work
* Add mypy issue number to the comment
2017-07-03 10:01:19 -07:00
Ashwini Chaudhary
83d5ba157c
Added stub for toaiff module ( #1455 )
2017-07-02 21:24:21 -07:00
Ashwini Chaudhary
489696e9a1
Added stub for user module ( #1454 )
2017-07-02 15:17:37 -07:00
khyox
61154a9ad2
Add more multiprocessing function stubs ( #1435 )
...
Fixes #1422
2017-06-30 22:25:05 -07:00
Teemu R
218ce96871
PyYaml: uncomment commented out imports and add missing classmethod decorators ( #1439 )
...
* uncomment yaml imports
* yaml: decorate classmethods
2017-06-30 22:22:55 -07:00
Rhys Parry
9e7953515d
Allow os.readlink to accept path-like objects ( #1441 )
2017-06-30 22:00:36 -07:00
Rhys Parry
683c6e90a0
Support named attributes in os.uname() result ( #1445 )
...
`os.uname` changed in version 3.3: Return type changed from a tuple to
a tuple-like object with named attributes.
2017-06-30 21:58:44 -07:00
Peter Vilim
bc9b2f0d4d
Fix signature for slite3.fetchmany ( #1444 )
...
Also made pymssql.fetchmany simpler.
2017-06-29 15:05:47 -07:00
Roy Williams
ac87de50dd
Add __name__ field to MethodType ( #1442 )
...
See 08c16016e2/Lib/types.py (L32-L34)
```python
>>> class _C:
... def _m(self): pass
...
>>> _C()._m.__name__
'_m'
```
2017-06-29 10:05:25 -07:00
Jukka Lehtosalo
9b612c9218
Add TypedDict total argument ( #1443 )
...
See https://github.com/python/mypy/pull/3558 for context.
2017-06-29 08:38:13 -07:00