Matthias Kramm
a02f9b6d46
switch order of ContextManager and Generic ( #1382 )
...
Since ContextManager inherits from Generic, too, listing Generic first, in the list of base classes, results in a cyclic MRO.
2017-06-01 18:06:43 -07:00
Cooper Lees
4656153478
Allow subprocess stdout + stderr be Optional ( #1375 )
...
- Adding optional to _FILE for stderr + stdout arguments to subprocess functions
- Sometimes you might want subprocess commands to be quiet and other time print the output
2017-06-01 17:46:14 -07:00
rchen152
2161f72990
time.mktime can take a struct_time or a tuple. ( #1380 )
2017-06-01 17:37:13 -07:00
Yusuke Miyazaki
35852bd687
Update stub for grp ( #1373 )
2017-06-01 17:36:32 -07:00
Alex Grönholm
37fc02ea7e
Made Logger methods accept BaseExceptions for exc_info ( #1376 )
...
Loggers accept any exceptions as the exc_info argument, not only Exception subclasses.
2017-05-31 20:00:56 -07:00
Yusuke Miyazaki
193e6885d4
Update stub for spwd ( #1372 )
...
Update stub for spwd
- Use `NamedTuple`
- Fix stub for Python 3
- Some attributes are changed from Python 2
- `sp_nam` -> `sp_namp`
- `sp_pwd` -> `sp_pwdp`
2017-05-31 12:07:21 -07:00
Matthias Kramm
6f07424246
fix types in os.path ( #1363 )
...
In Python 2, doing
os.path.join(u"foo", "bar")
is actually legal, and returns a unicode string.
Also os.path.relpath always returns the type of its first argument.
(The solution is not perfect -- e.g.
os.path.join("a", "b", "c", "d", u"e")
will still result in a type error. )
2017-05-31 10:43:26 -07:00
Semyon Proshev
5db571a8f3
Update typing.MutableMapping.update stubs to allow keyword-only arguments ( #1370 )
2017-05-30 21:44:10 -07:00
Yusuke Miyazaki
40c6927cf0
Update stub for pwd ( #1371 )
2017-05-30 21:43:30 -07:00
Suren Nihalani
d494114214
asyncio.subprocess: fix type to include IO instead of just int and match Popen ( #1366 )
...
Fixes #1365
2017-05-28 18:58:23 -07:00
DmitriyS
9f433a57f4
Fix type stubs in typing.pyi ( #1263 )
2017-05-28 13:13:20 -07:00
mistermocha
2053e5882f
Completing functionality for enum.auto ( #1331 )
...
Full context: https://github.com/python/mypy/pull/3441
Closes python/mypy#3434 .
2017-05-27 15:06:00 -07:00
Semyon Proshev
f9872cafd8
Update collections and typing.NamedTuple ( #1276 )
...
* Update stubs for `collections` module in both Pythons.
* Update `typing.NamedTuple` stub to have `_source` attribute.
* Fix compatibility of `deque.index` signature with supertype `Sequence`
2017-05-27 15:01:40 -07:00
Matěj Cepl
6f0c929658
Fix unittest.main() parameters. ( #1351 )
2017-05-27 14:40:55 -07:00
Doug Freed
56f3d66f47
ipaddress: make _BaseAddress subclass SupportsInt ( #1361 )
2017-05-26 09:36:29 -07:00
Jelle Zijlstra
9bbcb0822d
add difflib.diff_bytes and difflib.Match ( #1336 )
2017-05-26 09:32:34 -07:00
Jelle Zijlstra
f8d06c88e5
fix reverse comparison in optparse ( #1337 )
2017-05-26 09:31:30 -07:00
Jelle Zijlstra
296f294b75
add fileinput.filelineno and fileinput.fileno ( #1338 )
2017-05-26 09:30:42 -07:00
Jelle Zijlstra
d23fe74072
add some exception classes to shutil ( #1334 )
2017-05-26 09:30:20 -07:00
Matthias Kramm
ac0b809bf5
tweak files to fix pytype parsing errors ( #1325 )
...
* Don't use "\" to join lines
2017-05-26 08:45:52 -07:00
Jelle Zijlstra
e8013fd808
add types.AsyncGeneratorType ( #1322 )
2017-05-26 08:37:39 -07:00
Jelle Zijlstra
fefdf185c7
merge and complete linecache stubs ( #1320 )
2017-05-26 08:30:42 -07:00
Jelle Zijlstra
4f2dd0f446
remove unused type ignore flags ( #1346 )
...
Verified that none of those are necessary for pytype.
2017-05-26 08:28:51 -07:00
Jelle Zijlstra
c31dcf4088
Add more flags to socket ( #1348 )
...
Also switch to PEP 526-style types in socket.
2017-05-26 08:25:20 -07:00
Jelle Zijlstra
2800002ebf
add to calendar stub ( #1359 )
2017-05-26 06:27:08 -07:00
Jelle Zijlstra
aeb19baa84
add symtable.symtable ( #1360 )
...
https://docs.python.org/3/library/symtable.html#symtable.symtable
and
https://docs.python.org/2/library/symtable.html#symtable.symtable
2017-05-25 19:39:15 -07:00
Jelle Zijlstra
3ed17cdb49
distutils.core.setup fixes ( #1358 )
...
- add include_package_data (which setuptools accepts)
- allow arbitrary other kwargs, because distutils.core.setup allows arbitrary kwargs and just passes them through to commands
2017-05-25 19:37:10 -07:00
Jelle Zijlstra
c4e6ce319f
minor fixes to email stubs ( #1357 )
2017-05-25 19:36:48 -07:00
Jelle Zijlstra
72a745b2f8
remove collections.MutableString ( #1356 )
...
It does not exist (some StackOverflow question I found suggests it was removed in 2.6).
2017-05-25 19:36:08 -07:00
Jelle Zijlstra
fce4424c6e
add http.client.error ( #1355 )
...
It's in __all__
2017-05-25 19:35:36 -07:00
Jelle Zijlstra
a25b449ee0
add some missing classes and platform checks to socketserver ( #1354 )
...
These checks were already in SocketServer.pyi for Python 2.
2017-05-25 19:34:27 -07:00
Jelle Zijlstra
26d1ff8352
add tempfile.TMP_MAX for py3 ( #1353 )
2017-05-25 19:33:05 -07:00
Sebastian Meßmer
e6af58a4cc
Fix type stubs in locks.pyi ( #1250 )
2017-05-25 19:32:17 -07:00
Matěj Cepl
367743adf0
Python 3 adds short_empty_elements attribute to xml.sax.saxutils.XMLGenerator. ( #1265 )
...
Fix #1265
2017-05-25 08:53:01 -07:00
Semyon Proshev
1ebcc1d11f
Add timespec parameter to datetime.datetime.isoformat for Python 3.6+. ( #1349 )
2017-05-25 07:33:50 -07:00
Jelle Zijlstra
875b02e374
complete and merge weakref stubs ( #1343 )
2017-05-24 20:35:16 -07:00
Jelle Zijlstra
383d1dc9e1
mark cProfile as private in pstats.pyi ( #1344 )
2017-05-24 20:33:20 -07:00
Eklavya Sharma
c1b7fc7020
datetime: Fix datetime.datetime.replace's stub. ( #1347 )
2017-05-24 19:42:27 -07:00
elmar bucher
579f25896b
fix posix and win32 specific realpath path.pyi definition (PR 2) ( #1345 )
...
Fixes #1335 .
2017-05-24 18:54:50 -07:00
elmar bucher
fc76215cc5
add from importlib import util ( #1341 )
2017-05-24 16:20:18 -07:00
Jelle Zijlstra
d9bf214203
merge pickle stubs into 2and3 ( #1328 )
...
Followup from #1321
2017-05-24 14:57:58 -07:00
Jelle Zijlstra
6fe7cdb1c3
merge 2and3 stubs for select ( #1333 )
...
There don't seem to be significant changes between Python 2 and 3. The Python 2
stub was much better, so I mostly built off of it.
2017-05-24 14:57:11 -07:00
Jelle Zijlstra
6152bad0af
add random.choices for 3.6 ( #1329 )
2017-05-24 14:09:52 -07:00
Jelle Zijlstra
89f27742ca
add re.template ( #1330 )
2017-05-24 14:07:31 -07:00
Jelle Zijlstra
890190d349
add opcodes to pickle stubs ( #1321 )
2017-05-24 08:05:55 -07:00
Jelle Zijlstra
97f32a57a2
complete __future__ stubs ( #1326 )
...
We were missing the most important one.
2017-05-24 08:02:47 -07:00
Jelle Zijlstra
5e4165493a
fix typo in importlib.abc ( #1323 )
2017-05-24 08:00:12 -07:00
Jelle Zijlstra
c930e889ee
merge 2 and 3 stubs for fileinput ( #1319 )
...
* merge 2 and 3 stubs for fileinput
Plus some minor fixes.
* pytype doesn't like generic type aliases
2017-05-24 07:58:56 -07:00
Sebastian Meßmer
3cfc146223
Fix type stubs in streams.pyi ( #1252 )
2017-05-23 23:14:41 -07:00
Jelle Zijlstra
4ea798b869
inspect.getmoduleinfo was removed in 3.6 ( #1318 )
...
Compare https://docs.python.org/3.5/library/inspect.html#inspect.getmoduleinfo
and https://docs.python.org/3.6/library/inspect.html
2017-05-23 16:52:16 -07:00