Shantanu
470a13ab09
Use PEP 570 syntax in stdlib ( #11250 )
2024-03-09 14:50:16 -08:00
Sebastian Rittau
23604858a6
Remove Python 3.7 branches ( #11238 )
2024-01-05 11:39:39 +01:00
Shantanu
2cafcc90a7
socket: rework to match docs more closely, improve accuracy on linux ( #11219 )
...
Match the documentation more closely
Fixes some of #8101
2024-01-04 14:36:31 -08:00
Nikita Sobolev
9456f5501b
Update socket stubs for Python3.12 ( #10247 )
...
Docs: https://github.com/python/cpython/blob/3.12/Doc/library/socket.rst
Source: https://github.com/python/cpython/blob/3.12/Modules/socketmodule.c#L8441
2023-06-05 09:32:02 +01:00
Jelle Zijlstra
c7820b401d
socket: constructor accepts bytes on Windows ( #9095 )
...
d04899abb0/Modules/socketmodule.c (L5318)
This is used in `socket.fromshare`. It must be bytes, not some other buffer.
2022-11-10 15:10:44 +00:00
Jelle Zijlstra
287fce4872
ssl, socket, array: Improve bytes handling ( #8997 )
2022-10-28 15:35:51 +02:00
Chris Cotter
1a3ae3efc7
socket: sendmsg can accept None for the address (#8771 )
...
Per the Python docs and socketmodule.c source, the address argument can
be None.
https://docs.python.org/3/library/socket.html#socket.socket.sendmsg
2022-09-20 14:15:47 +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
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
7e7562b95b
Add socket.TCP_CONNECTION_INFO ( #7755 )
...
python/cpython#69256
2022-04-30 09:24:09 -06:00
Alex Waygood
b093c90a94
Use TypeAlias for type aliases where possible, part II ( #7667 )
2022-04-20 20:02:47 +01:00
Alex Waygood
740193a8fc
Use TypeAlias where possible for type aliases ( #7630 )
2022-04-15 18:01:00 -07:00
Alex Waygood
1acc8f3bd6
Use PEP 604 syntax wherever possible, part II ( #7514 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2022-03-19 14:27:35 +00:00
Alex Waygood
bc72b25a2a
Make more miscellaneous fields read-only, annotate _json.make_encoder ( #7439 )
2022-03-06 15:41:49 -08:00
Shantanu
b88a6f19cd
Upgrade black version ( #7089 )
2022-01-30 16:27:06 -08:00
Rui Cunha
d00b3b2d12
Add socket.IPPROTO_MPTCP ( #6863 )
2022-01-08 20:57:03 +02:00
Alex Waygood
8d5d2520ac
Use PEP 585 syntax wherever possible ( #6717 )
2021-12-28 11:31:43 +01:00
Alex Waygood
c164d21225
Add timeout attribute to _socket.socket ( #6607 )
2021-12-16 13:50:43 +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
Jelle Zijlstra
e58070cd35
socket: allow ReadableBuffer on send* methods ( #5648 )
2021-06-16 15:36:56 +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