| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
importlib.reload. (GH-122493) (GH-122509)
(cherry picked from commit f071f01b7b7e19d7d6b3a4b0ec62f820ecb14660)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
| |
|
|
|
|
|
|
|
|
|
| |
fallback (GH-122134) (GH-122429)
Authenticate socket connection for `socket.socketpair()` fallback when the platform does not have a native `socketpair` C API. We authenticate in-process using `getsocketname` and `getpeername` (thanks to Nathaniel J Smith for that suggestion).
(cherry picked from commit 78df1043dbdce5c989600616f9f87b4ee72944e5)
Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
| |
Host as None in address raises TypeError since it should be string, bytes or bytearray.
(cherry picked from commit 43682f1e39a3c61f0e8a638b887bcdcbfef766c5)
Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(GH-13135)
Break cycle generated when saving an exception in socket.py, codeop.py and dyld.py as they keep alive not only the exception but user objects through the ``__traceback__`` attribute.
https://bugs.python.org/issue36820
Automerge-Triggered-By: @pablogsal
(cherry picked from commit b64334cb93d0ddbb551c8cd712942bab2fc72772)
Co-authored-by: Mario Corchero <mcorcherojim@bloomberg.net>
|
| |
|
|
|
|
|
| |
(GH-16491) (#16506)
(cherry picked from commit 94e165096fd65e8237e60de570fb609604ab94c9)
Co-authored-by: Giampaolo Rodola <g.rodola@gmail.com>
|
| | |
|
| |
|
|
|
|
|
|
|
| |
It turns out doing socket.listen(0) does not equal to "choose a
reasonable default". It actually means "set backlog to 0".
As such set backlog=None as the default for socket.create_server.
Fixes the following BB failures:
https://github.com/python/cpython/pull/11784#issuecomment-481036369
Ref. BPO-1756, GH-11784.
|
| | |
|
| |
|
|
| |
types. (GH-6239)
|
| |
|
|
|
| |
* Fix enum members getting shadowed by parent attributes
* Move Enum._convert to EnumMeta._convert_
* Deprecate _convert
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| | |
|
| | |
|
| |\ |
|
| | | |
|
| |/ |
|
| | |
|
| | |
|
| |
|
|
| |
the same values as open().
|
| |\ |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
add private method to enum to support replacing global constants with Enum members:
- search for candidate constants via supplied filter
- create new enum class and members
- insert enum class and replace constants with members via supplied module name
- replace __reduce_ex__ with function that returns member name, so previous Python versions can unpickle
modify IntEnum classes to use new method
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
add private method to enum to support replacing global constants with Enum members:
- search for candidate constants via supplied filter
- create new enum class and members
- insert enum class and replace constants with members via supplied module name
- replace __reduce_ex__ with function that returns member name, so previous Python versions can unpickle
modify IntEnum classes to use new method
|
| | | |
|
| |\ \
| |/ |
|
| | |
| |
| |
| | |
Patch by Karan Goel.
|
| |\ \
| |/
| |
| | |
Based on patch by Franck Michea.
|
| | |
| |
| |
| | |
Based on patch by Franck Michea.
|
| |\ \
| |/ |
|
| | | |
|
| |\ \
| |/
| |
| | |
are SocketKind
|
| | |
| |
| |
| | |
are SocketKind
|
| | | |
|
| | |
| |
| |
| | |
fully qualified class names of Python implemented classes.
|
| |/
|
|
| |
a socket by using high-performance os.sendfile() on UNIX. Patch by Giampaolo Rodola'·
|
| |
|
|
|
|
|
|
| |
Before:
<socket.socket fd=3, family=2, type=1, proto=0, laddr=('0.0.0.0', 0)>
Now:
<socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketType.SOCK_STREAM, proto=0, laddr=('0.0.0.0', 0)>
|
| |
|
|
| |
Closes #18720.
|
| |
|
|
|
| |
are now created non-inheritable; add functions os.get/set_inheritable(),
os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
|
| | |
|
| |
|
|
| |
ModuleNotFoundError.
|
| |
|
|
| |
any).
|
| | |
|
| |\
| |
| |
| |
| |
| | |
ValueError when the file-like object is closed.
Patch by Alessandro Moura.
|
| | |
| |
| |
| |
| |
| | |
ValueError when the file-like object is closed.
Patch by Alessandro Moura.
|
| | | |
|
| |\ \
| |/
| |
| |
| |
| | |
the socket repr()).
Patch by Matt Joiner.
|
| | |
| |
| |
| |
| |
| | |
the socket repr()).
Patch by Matt Joiner.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88622 | antoine.pitrou | 2011-02-26 00:07:44 +0100 (sam., 26 févr. 2011) | 5 lines
Issue #7322: Trying to read from a socket's file-like object after a timeout
occurred now raises an error instead of silently losing data.
Patch by Ross Lagerwall.
........
|
| | | |
|
| | | |
|