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.
This commit is contained in:
Sebastian Rittau authored and GitHub committed 2021-05-30 20:17:33 +02:00
1 parent ee4d9fb106
commit 6ee67483a3
15 files changed
+1245 -754

No files matched your search

+1
View File
@@ -43,6 +43,7 @@ _py_abc: 3.7-
_pydecimal: 3.6-
_random: 2.7-
_sitebuiltins: 3.6-
_socket: 3.0- # present in 2.7 at runtime, but not in typeshed
_stat: 3.6-
_thread: 2.7-
_threading_local: 3.6-