Commit Graph

17 Commits

Author SHA1 Message Date
Akuli
200260e685 move DndSource to tkinter/dnd.pyi (#5588) 2021-06-07 07:07:57 -07:00
Rebecca Chen
a4075472d3 Add some submodule versions to stdlib/VERSIONS. (#5573)
Adds some version ranges for submodules that are available in different
versions that their parent modules.

I noticed these while updating pytype's pinned typeshed commit. pytype
can't actually use this submodule version information yet, but from what
I understand, all type checkers at least handle this information
gracefully (by ignoring it), so it doesn't hurt to add it.

* collections.abc is available in Python 3.3 and later. _collections_abc
  is imported by the collections.abc stub, so its version range is also
  changed from 3.6- to 3.3-.
* _typeshed.tkinter needs to be 3.0-, since it imports tkinter, which is
  marked as 3.0-.
* importlib.metadata is available in 3.8 and later.
2021-06-03 18:15:47 -07:00
Sebastian Rittau
6ee67483a3 Rework socket (#5545)
* Extract _socket.pyi from socket.pyi.
* Extract _socket.socket from socket.socket.
* Fix socket.family annotation.
* Annotate SocketIO properly.
* SocketType is an alias of _socket.socket.
* Sort items in socket.pyi in the same order as in socket.py.
* Remove socket.EINTR.
* Use _typeshed.WriteableBuffer instead of custom alias.
* Add errorTab (Windows only).
* Add _socket.dup().
* Mark positional-only argments.
* Remove constructors from socket exceptions.
* socket.timeout is an alias for TimeoutError, starting with Python 3.10.
* Use PEP 604 in changed lines.
* Add alias for fileno arguments.
* getaddrinfo() port can be bytes.
* Explicitly override some SSLSocket methods.
* Allow ReadableBuffer in _CMSG arguments.
2021-05-30 20:17:33 +02:00
Jukka Lehtosalo
e5459900c0 Make html, ipaddress, reprlib and winreg only available on Python 3 (#5502)
None of these are available in Python 2.7.
2021-05-19 12:16:10 +01:00
Sebastian Rittau
54a0bd80ee Add a comment about _typeshed to VERSIONS (#5447) 2021-05-19 11:01:33 +02:00
Sebastian Rittau
dbe77b6ae9 importlib.resources was added in 3.7 (#5468)
Describe sub-module versioning
2021-05-16 07:04:28 -07:00
Jelle Zijlstra
a47ee3245a fix renamed Python 2 modules (#5450) 2021-05-14 14:36:00 -07:00
Sebastian Rittau
322396bb32 configparser available since Python 3.0 (#5443)
It was called ConfigParser in Python 2.

Split out from #5442.
2021-05-14 05:24:50 -07:00
Sebastian Rittau
d98fdd934c Move VERSIONS description to file itself (#5434) 2021-05-13 06:14:44 -07:00
Sebastian Rittau
1eb64b4372 Mark stdlib modules with upper version bounds (#5394)
* Mark stdlib modules with upper version bounds

* Add minus to all versions and enforce in check_consistent

* Fix check_consistent and mypy_test to work with new VERSIONS format
2021-05-10 16:29:43 +03:00
Jelle Zijlstra
5f591a1a12 fix VERSIONS (#5329) 2021-05-07 08:43:22 +02:00
Akuli
97101b1d2c create stub for __main__ (#5354)
* create stub for __main__

* exclude from pyright, like all other __getattr__ incomplete stubs
2021-05-06 18:57:33 +03:00
Akuli
e66b7fa660 delete _importlib_modulespec (#5350)
* delete _importlib_modulespec

* use typing_extensions.runtime_checkable
2021-05-06 17:13:35 +03:00
Shantanu
fc660d6d41 Move typing_extensions to stdlib (#5233)
I'm not sure what the best way to do this is. This effectively orphans
types-typing-extensions, but maybe that's not really a problem. (We can
yank the package too)

See https://github.com/python/typeshed/pull/5229#issuecomment-822234125
for some details

Co-authored-by: hauntsaninja <>
2021-04-20 21:55:48 -07:00
Sebastian Rittau
0cea325bc7 Modernize logging (#5068) 2021-03-22 19:26:43 -07:00
Sebastian Rittau
08b26b9e8e Split and restore correct Python 2 version of cgi.pyi (#5064)
* Split cgi.pyi into Py2 and 3 versions

* Restore correct Python 2 version of cgi.pyi

* Remove unnecessary version checks in cgi.pyi

* Use collections.abc

* Use List in Python 2 stub
2021-02-24 14:46:03 -08:00
Ivan Levkivskyi
16ae4c6120 Re-organize directory structure (#4971)
See discussion in #2491

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-27 12:00:39 +00:00