Commit Graph

1123 Commits

Author SHA1 Message Date
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
Jelle Zijlstra
cca81d864a complete doctest stub (#1315)
* complete doctest stub

And merge it into 2and3 (the old stubs were virtually empty).

* note things changed in 3.4

2.7 also had an undocumented and deprecated doctest.Tester class. I'm going to leave it out until somebody asks for it to be added.
2017-05-23 16:34:34 -07:00
Luka Sterbic
9601a76b54 Use AsyncResult from multiprocessing.pool (#1317) 2017-05-23 16:33:46 -07:00
Jelle Zijlstra
6c5474ae8c various fixes to asyncio stubs (#1305) 2017-05-23 16:14:29 -07:00
Jelle Zijlstra
0bda8c0cef fixes and additions to the configparser stub (#1311)
* fixes and additions to the configparser stub

This broke pytype because of the type ignore. I think it's OK to blacklist
because another instance of this same error (stdlib/3/email/policy.pyi line 95)
is already blacklisted. We can remove it when the pytype parser is fixed to
allow type ignores in this context.

* add SectionProxy.__getattr__

* the __getattr__ returns Any

* don't need type ignore for pytype if we put it all on one line
2017-05-23 15:36:42 -07:00
Jelle Zijlstra
42cd0f59e5 add functools.partialmethod (#1316)
Plus other cleanup to the py3 functools stub
2017-05-23 15:36:09 -07:00
Jelle Zijlstra
9ae9a9e741 merge Python 2 and 3 stubs for difflib (#1313)
These were already virtually identical.

I didn't review the stubs themselves for correctness. I'll make some changes after this
PR is in.
2017-05-23 15:01:30 -07:00
Jelle Zijlstra
05a4059b3b make TimeTuple private in datetime.pyi (#1312)
Also, these stubs aren't incomplete.
2017-05-23 15:01:02 -07:00
Luka Sterbic
9b2b60eafc Make Lock usable as contect manager (#1314) 2017-05-23 15:00:32 -07:00
Jelle Zijlstra
1dda4ac105 merge python 2 and 3 stubs for calendar (#1310)
These are pretty much the same in the stdlib, except that TimeEncoding
got renamed to different_locale.
2017-05-23 12:47:24 -07:00
Jelle Zijlstra
3267e2396b Dummy thread improvements (#1309)
* dummy_thread improvements

- Complete the Python 3 stub
- Add a Python 2 stub. They're close enough that they should go into 2and3, but
  the module name changed so we can't do that.

* fix my bugs
2017-05-23 12:46:42 -07:00
Jelle Zijlstra
48796411ed curses: make names private that don't exist at runtime (#1308)
And add some missing return types
2017-05-23 12:46:05 -07:00
Jelle Zijlstra
14f7492fe0 os.walk allows PathLike (#1306) 2017-05-23 12:45:40 -07:00
Jelle Zijlstra
6f6fa428ce fix some issues found by stubcheck (#1303)
- ThreadError exists (undocumented) on Python 3. It's an alias for _thread.error,
  but making it a separate exception seems fine.
- zipfile.error is an alias for BadZipFile on both Python versions.
- zlib.Compress and Decompress are not actually accessible at runtime.
2017-05-23 12:44:35 -07:00
Jelle Zijlstra
0aa7138c4e fixes to logging stubs (#1302)
Found with my stubcheck tool
2017-05-23 12:43:49 -07:00
Jelle Zijlstra
915a91f80d fix "isisgeneratorfunction" (#1301) 2017-05-23 09:51:54 -07:00
Jelle Zijlstra
764d949f04 make _ast.identifier private (#1307)
It doesn't exist at runtime.
2017-05-23 09:51:29 -07:00