mirror of
https://github.com/python/cpython.git
synced 2025-08-19 16:20:59 +00:00
Bug #978833: Revert r50844, as it broke _socketobject.dup.
This commit is contained in:
parent
fe048e8ee7
commit
a8ddae6149
3 changed files with 4 additions and 5 deletions
|
@ -926,8 +926,8 @@ class HTTPConnection:
|
||||||
self.__state = _CS_IDLE
|
self.__state = _CS_IDLE
|
||||||
|
|
||||||
if response.will_close:
|
if response.will_close:
|
||||||
# Pass the socket to the response
|
# this effectively passes the connection to the response
|
||||||
self.sock = None
|
self.close()
|
||||||
else:
|
else:
|
||||||
# remember this, so we can tell when it is complete
|
# remember this, so we can tell when it is complete
|
||||||
self.__response = response
|
self.__response = response
|
||||||
|
|
|
@ -139,8 +139,6 @@ class _closedsocket(object):
|
||||||
__slots__ = []
|
__slots__ = []
|
||||||
def _dummy(*args):
|
def _dummy(*args):
|
||||||
raise error(EBADF, 'Bad file descriptor')
|
raise error(EBADF, 'Bad file descriptor')
|
||||||
def close(self):
|
|
||||||
pass
|
|
||||||
# All _delegate_methods must also be initialized here.
|
# All _delegate_methods must also be initialized here.
|
||||||
send = recv = recv_into = sendto = recvfrom = recvfrom_into = _dummy
|
send = recv = recv_into = sendto = recvfrom = recvfrom_into = _dummy
|
||||||
__getattr__ = _dummy
|
__getattr__ = _dummy
|
||||||
|
@ -159,7 +157,6 @@ class _socketobject(object):
|
||||||
setattr(self, method, getattr(_sock, method))
|
setattr(self, method, getattr(_sock, method))
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
self._sock.close()
|
|
||||||
self._sock = _closedsocket()
|
self._sock = _closedsocket()
|
||||||
dummy = self._sock._dummy
|
dummy = self._sock._dummy
|
||||||
for method in _delegate_methods:
|
for method in _delegate_methods:
|
||||||
|
|
|
@ -217,6 +217,8 @@ Extension Modules
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Bug #978833: Revert r50844, as it broke _socketobject.dup.
|
||||||
|
|
||||||
- Bug #1675967: re patterns pickled with Python 2.4 and earlier can
|
- Bug #1675967: re patterns pickled with Python 2.4 and earlier can
|
||||||
now be unpickled with Python 2.5.
|
now be unpickled with Python 2.5.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue