Kevin Kirsche
a8c8178127
Add missing NETLINK re-exports of linux socket constants ( #8555 )
2022-08-18 20:24:58 +01:00
Alex Waygood
edc0ecd857
Remove Python 3.6 branches from typeshed ( #8269 )
2022-07-11 10:55:17 +02:00
Alex Waygood
c6de37df53
Overhaul socket stubs on Windows and MacOS ( #8106 )
...
Reduce the `socket` allowlists for these platforms to a handful of missing constants
2022-06-20 20:11:50 +01:00
Shantanu
34579f1edf
socket: add TCP_KEEPALIVE ( #8100 )
...
bpo-34932
Co-authored-by: hauntsaninja <>
2022-06-19 17:57:07 +01:00
Alex Waygood
411d85feeb
socket.AddressFamily: Fix AF_LINK ( #8103 )
...
Slipped through the net in #8099
2022-06-19 09:10:33 +01:00
Shantanu
b7f8d847be
socket: consistency between constants and enums ( #8099 )
...
This matches what happens at runtime, from Enum._convert_
Helps with #8098 . Closes #5696 .
2022-06-19 08:57:55 +01:00
Sebastian Rittau
f21898abb9
Improve I/O types in socket.pyi ( #7852 )
...
* Use a protocol for socket.sendfile() "file" argument.
* Use concrete classes for socket.makefile() return types.
2022-05-17 06:11:50 -07:00
Jelle Zijlstra
ab1dcafec2
socket: add SO_INCOMING_CPU for 3.11 ( #7801 )
...
python/cpython#31237
2022-05-06 22:46:34 -07:00
Jelle Zijlstra
85a6f0ffe9
socket: add all_errors param to create_connection ( #7691 )
...
python/cpython#91704
2022-04-25 22:10:29 -06:00
Alex Waygood
74ecce5b68
Improve host parameter of socket.getaddrinfo() ( #7518 )
...
As pointed out by @srittau in #7517 , `bytearray` [is redundant](https://docs.python.org/3/library/typing.html#typing.ByteString ) in a union where `bytes` is also in the union.
2022-03-20 23:35:03 +00:00
Martin Fischer
8138981492
stdlib: socket.CMSG_LEN & socket.CMSG_SPACE are only available on Unix ( #7384 )
2022-03-06 16:04:05 -08:00
Alex Waygood
96c9abb058
Always use _typeshed.Self, where applicable ( #6880 )
...
* Always use `_typeshed.Self`, where applicable
* Revert changes to `google-cloud-ndb` (ambiguous)
* Remove empty line added by script
* Revert changes to `stubs/python-dateutil/dateutil/relativedelta.pyi`
* Manually add a few more that the script missed
* Improve `filelock` annotation
Source code here: 79ec7b2826/src/filelock/_api.py (L207)
* Improve `opentracing/scope` annotation
Source code here: 3e1d357a34/opentracing/scope.py (L71)
* Improve `redis/client` stub
Source code here: 15f315a496/redis/client.py (L1217)
* Improve `redis/lock` annotation
Source code here: 15f315a496/redis/lock.py (L155)
* Improve `requests/models` annotation
Source code here: d718e75383/requests/models.py (L653)
2022-01-09 19:16:19 -08:00
Rui Cunha
d00b3b2d12
Add socket.IPPROTO_MPTCP ( #6863 )
2022-01-08 20:57:03 +02:00
Akuli
a5bc1e037f
Add mypy error codes to '# type: ignore' comments ( #6379 )
2021-11-26 07:07:56 +01:00
Stefan Tatschner
7720f9b7df
Add CAN_RAW_JOIN_FILTERS constant to socket stub ( #6159 )
...
This constant has been added in python 3.9.
2021-10-13 16:29:03 +02:00
Akuli
ee487304d7
Big diff: Use new "|" union syntax ( #5872 )
2021-08-08 11:05:21 +02:00
Anton Grübel
96e0660fba
Use _typeshed.Self with __enter__ ( #5717 )
...
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-07-01 12:32:32 +02: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
Sebastian Rittau
6a9c89e928
Replace 'Text' with 'str' in py3 stdlib ( #5466 )
2021-05-16 07:10:48 -07:00
Akuli
17dcea4a68
Akuli and srittau: Remove Python 2 branches from Python 3 stubs ( #5461 )
...
* run script and do some manual changes (Akuli)
* do the whole thing manually (srittau)
* merge changes (Akuli)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
2021-05-15 15:33:39 +03:00
hatal175
b8e5f637b9
Stubtest fixes ( #5391 )
2021-05-13 18:20:55 -07:00
Eric Traut
0ec182227c
Added a few missing type arguments for generic types used in stdlib stubs
...
I just found and fixed a bug in pyright's "missing type arguments" check. When type arguments were omitted for a generic type within a subscript expression, the error was being suppressed. With this bug fixed, I found several new cases where type arguments were missing in stdlib stubs. (#5130 )
Co-authored-by: Eric Traut <erictr@microsoft.com >
2021-03-22 18:28:04 -07: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