| Commit message (Collapse) | Author | Age | Files | Lines |
| |\ |
|
| | |
| |
| |
| |
| | |
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
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
Patch by Christian Heimes, reviewed by Martin Panter.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
SOCK_RAW is marked as optional in the POSIX specification:
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_socket.h.html
Patch by Ed Schouten.
|
| |\ \
| |/ |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
* Replace "fd = -1" with "fd = INVALID_SOCKET"
* Replace "fd < 0" with "fd == INVALID_SOCKET": SOCKET_T is unsigned on Windows
Bug found by Pavel Belikov ("Fragment N1"):
http://www.viva64.com/en/b/0414/#ID0ECDAE
|
| |\ \
| |/ |
|
| | |
| |
| |
| |
| | |
Bug found by Pavel Belikov ("Fragment N1"):
http://www.viva64.com/en/b/0414/#ID0ECDAE
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
Daniel Stokes.
|
| | |
| |
| |
| |
| | |
exposed on the API which are not implemented on GNU/Hurd. They would not
work at runtime anyway.
|
| | |
| |
| |
| | |
api-level >= 23. Patch by Xavier de Gaye.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
On Windows, socket.setsockopt() raises an OverflowError if the socket option is
larger than INT_MAX bytes.
|
| | |
| |
| |
| |
| |
| |
| | |
Issue #26590: Implement a safe finalizer for the _socket.socket type. It now
releases the GIL to close the socket. Use PyErr_ResourceWarning() to raise the
ResourceWarning to pass the socket object to the warning logger, to get the
traceback where the socket was created (allocated).
|
| | |
| |
| |
| | |
io.FileIO has a safe implementation of destructor, but not socket nor scandir.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #26567:
* Add a new function PyErr_ResourceWarning() function to pass the destroyed
object
* Add a source attribute to warnings.WarningMessage
* Add warnings._showwarnmsg() which uses tracemalloc to get the traceback where
source object was allocated.
|
| |\ \
| |/ |
|
| | |
| |
| |
| | |
current versions of OpenBSD and NetBSD. Patch by A. Jesse Jiryu Davis.
|
| |\ \
| |/ |
|
| | |
| |
| |
| | |
versions 10.5 or higher. Original patch by A. Jesse Jiryu Davis.
|
| |\ \
| |/ |
|
| | |
| |
| |
| |
| |
| | |
Issue #26227: On Windows, getnameinfo(), gethostbyaddr() and gethostbyname_ex()
functions of the socket module now decode the hostname from the ANSI code page
rather than UTF-8.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Add "#ifdef WITH_THREAD" around cals to:
* PyGILState_Check()
* _PyImport_AcquireLock()
* _PyImport_ReleaseLock()
|
| | | |
|
| | |
| |
| |
| | |
private functions.
|
| |/
|
|
|
|
|
|
| |
Add "#ifdef WITH_THREAD" around cals to:
* PyGILState_Check()
* _PyImport_AcquireLock()
* _PyImport_ReleaseLock()
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| | |
PyUnicode_AsEncodedString() instead of calling the encode() method of the
host, to handle correctly custom string with an encode() method which doesn't
return a byte string. The encoder of the IDNA codec is now called directly
instead of calling the encode() method of the string.
|
| | |
| |
| |
| | |
result of sendto() instead of the C int type.
|
| | |
| |
| |
| | |
accept() returns INVALID_SOCKET on error, it's not necessary a negative number.
|
| | |
| |
| |
| | |
Patch courtesy of Joe Jevnik.
|
| | |
| |
| |
| |
| |
| |
| | |
poll() is not available.
select() doesn't accept negative timeout, the timeout parameter must be NULL to
block on select().
|
| | |
| |
| |
| | |
Use -1 second by default, not -1 nanosecond.
|
| | |
| |
| |
| |
| | |
Call internal_select() with a timeout of 0 second, not a timeout of -1 second
(blocking)!
|
| | |
| |
| |
| |
| | |
each time data is sent successfuly. The socket timeout is now the maximum total
duration to send all data.
|
| | |
| |
| |
| |
| |
| | |
Use _PyTime_FromSeconds() to initialize the default socket timeout to -1
second, instead of -1 nanosecond which causes rounding issues in
internal_select().
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Use the new _PyTime_FromSeconds() function to set the timeout to -1 second
for socket.settimeout(None). It avoids a special case in internal_select()
because of a rounding issue: -1 nanosecond is rounded to 0 millisecond which
means non-blocking, instead of blocking.
* Check if the interval the negative in sock_call_ex() instead of doing the
check in internal_select(). sock_call_ex() remembers if the socket has a
timeout or not, which avoids a race condition if the timeout is modified in a
different thread.
|