| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix socket(fileno=fd) by auto-detecting the socket's family, type,
and proto from the file descriptor. The auto-detection can be overruled
by passing in family, type, and proto explicitly.
Without the fix, all socket except for TCP/IP over IPv4 are basically broken:
>>> s = socket.create_connection(('www.python.org', 443))
>>> s
<socket.socket fd=3, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=6, laddr=('2003:58:bc4a:3b00:56ee:75ff:fe47:ca7b', 59730, 0, 0), raddr=('2a04:4e42:1b::223', 443, 0, 0)>
>>> socket.socket(fileno=s.fileno())
<socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('2003:58:bc4a:3b00::%2550471192', 59730, 0, 2550471192), raddr=('2a04:4e42:1b:0:700c:e70b:ff7f:0%2550471192', 443, 0, 2550471192)>
Signed-off-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
|
| |
(#5394)
This reverts commit 47c0b1f7d4115e6f15e6776c1f91d28e7d96fe0c.
|
| |
|
|
|
|
|
| |
Add close(fd) function to the socket module
Signed-off-by: Christian Heimes <christian@python.org>
|
|
|
|
| |
`socketmodule.c` on Windows
|
| |
|
|
|
|
|
|
|
| |
* Fix compilation of the socket module on NetBSD 8.
* Fix the assertion failure or reading arbitrary data when parse
a AF_BLUETOOTH address on NetBSD and DragonFly BSD.
* Fix other potential errors and make the code more reliable.
|
| |
|
|
|
|
| |
Remove dangling references to PYCC_VACPP that are not relelvant
since removal of OS/2 support.
|
| |
|
|
|
|
|
|
|
|
|
| |
more functions (#4026)
Fix timeout rounding in time.sleep(), threading.Lock.acquire() and
socket.socket.settimeout() to round correctly negative timeouts between -1.0 and
0.0. The functions now block waiting for events as expected. Previously, the
call was incorrectly non-blocking.
|
| |
|
| |
|
|
|
|
|
|
| |
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-27584: New addition of vSockets to the python socket module
Support for AF_VSOCK on Linux only
* bpo-27584: Fixes for V2
Fixed syntax and naming problems.
Fixed #ifdef AF_VSOCK checking
Restored original aclocal.m4
* bpo-27584: Fixes for V3
Added checking for fcntl and thread modules.
* bpo-27584: Fixes for V4
Fixed white space error
* bpo-27584: Fixes for V5
Added back comma in (CID, port).
* bpo-27584: Fixes for V6
Added news file.
socket.rst now reflects first Linux introduction of AF_VSOCK.
Fixed get_cid in test_socket.py.
Replaced PyLong_FromLong with PyLong_FromUnsignedLong in socketmodule.c
Got rid of extra AF_VSOCK #define.
Added sockaddr_vm to sock_addr.
* bpo-27584: Fixes for V7
Minor cleanup.
* bpo-27584: Fixes for V8
Put back #undef AF_VSOCK as it is necessary when vm_sockets.h is not installed.
|
|
|
| |
See PEP 11.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added support for CAN_ISOTP protocol
* Added unit tests for CAN ISOTP
* Updated documentation for ISO-TP protocol
* Removed trailing whitespace in documentation
* Added blurb NEWS.d file
* updated Misc/ACKS
* Fixed broken unit test that was using isotp const outside of skippable section
* Removed dependecy over third party project
* Added implementation for getsockname + unit tests
* Missing newline at end of ACKS file
* Accidentally inserted a type in ACKS file
* Followed tiran changes review #1 recommendations
* Added spaces after comma
|
|
|
|
| |
tuples. (#3119)
|
|
|
|
| |
socket.close() was modified in Python 3.6 to raise OSError on
failure: see bpo-26685.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-23451: Fix WSASocket and WSADuplicateSocket deprecation warnings
* bpo-23451: Add backwards compatibility note about socket share/fromshare
* bpo-23451: Fixed `WSAAddressToString`/`WSAStringToAddress` deprecation warnings
* bpo-23451: Use `inet_pton`/`inet_ntop` instead of `WSAAddressToString`/`WSAStringToAddress`
* bpo-23451: Move `HAVE_INET_PTON` from _socket.vcxproj to pyconfig.h
* bpo-23451: Add SUPPRESS_DEPRECATED_CALL to socketmodule.c
* bpo-23451: Add a NEWS.d entry
* bpo-23451: Corrected NEWS.d entry
|
|
|
|
|
|
| |
* bpo-30205: Fix getsockname() for unbound AF_UNIX sockets on Linux
* Add NEWS entry
|
|
|
|
|
| |
* Provide socket.TCP_NOTSENT_LOWAT
* New TCP option available on recent MacOS and Linux.
* Document addition of TCP_NOTSENT_LOWAT
|
|
|
|
|
|
|
|
|
|
| |
sock_addr_t is used to define the minimum size of any socket address on
the stack. Let's make sure that an AF_ALG address always fits. Coverity
complains because in theory, AF_ALG might be larger than any of the other
structs. In practice it already fits.
Closes Coverity CID 1398948, 1398949, 1398950
Signed-off-by: Christian Heimes <christian@python.org>
|
|
|
| |
IPPROTO_IPV6 is already defined further above in the same way.
|
|
|
|
| |
possible. Patch is writen with Coccinelle.
|
|
|
|
|
| |
in socket.sendto(). A PyErr_Occurred() check was happening later, but
it is better to just use the return value and not call PyErr_Occurred().
|
|
|
|
|
|
|
| |
Issue #26273: Add new socket.TCP_CONGESTION (Linux 2.6.13) and
socket.TCP_USER_TIMEOUT (Linux 2.6.37) constants.
Patch written by Omar Sandoval.
|
|
|
|
| |
UTF-8 represenatation of Unicode objects.
|
|\
| |
| |
| | |
with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
|
| |
| |
| |
| | |
with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
|
|\ \
| |/ |
|
| |\ |
|
| | |
| | |
| | |
| | | |
Patch by Matthieu S.
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | | |
Based on patch by Masayuki Yamamoto.
|
|\ \ \
| |/ / |
|
| | | |
|
|/ /
| |
| |
| | |
Original patch by Oren Milman.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
Also update the classmethod and staticmethod doc strings and comments to
match the RST documentation.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Issue #27744:
* Release msg.msg_iov memory block.
* Release memory on PyMem_Malloc(controllen) failure
|
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #27744:
* PEP 7: add {...} around if blocks
* assign variables and then check their value in if() to make the code easier
to read and to debug.
|
| |
| |
| |
| |
| |
| |
| | |
The function internal_setblocking() of the socket module did not check
the return values of ioctl() and fnctl().
CID 1294328
|
| | |
|
| | |
|
| | |
|