Skip to content

gh-151522: Guard against None transport in slow-socket SSL test#151523

Merged
itamaro merged 1 commit into
python:mainfrom
itamaro:gh-151522-test-asyncio-ssl-slow-socket
Jun 16, 2026
Merged

gh-151522: Guard against None transport in slow-socket SSL test#151523
itamaro merged 1 commit into
python:mainfrom
itamaro:gh-151522-test-asyncio-ssl-slow-socket

Conversation

@itamaro

@itamaro itamaro commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

@itamaro itamaro merged commit 11f032f into python:main Jun 16, 2026
103 of 105 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @itamaro for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@bedevere-app

bedevere-app Bot commented Jun 16, 2026

Copy link
Copy Markdown

GH-151528 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jun 16, 2026
@bedevere-app

bedevere-app Bot commented Jun 16, 2026

Copy link
Copy Markdown

GH-151529 is a backport of this pull request to the 3.14 branch.

@bedevere-app

bedevere-app Bot commented Jun 16, 2026

Copy link
Copy Markdown

GH-151530 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Jun 16, 2026
itamaro added a commit that referenced this pull request Jun 16, 2026
GH-151523) (#151528)

gh-151522: Guard against None transport in slow-socket SSL test (GH-151523)
(cherry picked from commit 11f032f)

Co-authored-by: Itamar Oren <itamarost@gmail.com>
itamaro added a commit that referenced this pull request Jun 16, 2026
GH-151523) (#151529)

gh-151522: Guard against None transport in slow-socket SSL test (GH-151523)
(cherry picked from commit 11f032f)

Co-authored-by: Itamar Oren <itamarost@gmail.com>
itamaro added a commit that referenced this pull request Jun 16, 2026
GH-151523) (#151530)

gh-151522: Guard against None transport in slow-socket SSL test (GH-151523)
(cherry picked from commit 11f032f)

Co-authored-by: Itamar Oren <itamarost@gmail.com>
@itamaro itamaro deleted the gh-151522-test-asyncio-ssl-slow-socket branch June 16, 2026 05:59
@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot aarch64 Android 3.15 (tier-3) has failed when building commit 1a8e743.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/2113/builds/197) and take a look at the build logs.
  4. Check if the failure is related to this commit (1a8e743) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/2113/builds/197

Failed tests:

  • test_urllib2
  • test_urllibnet

Failed subtests:

  • test_ftp_error - test.test_urllib2.HandlerTests.test_ftp_error
  • test_getcode - test.test_urllibnet.urlopenNetworkTests.test_getcode

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/data/user/0/org.python.testbed/files/python/lib/python3.15/test/test_urllibnet.py", line 107, in test_getcode
    self.assertEqual(e.exception.code, 404)
                     ^^^^^^^^^^^^^^^^
AttributeError: 'URLError' object has no attribute 'code'
 
----------------------------------------------------------------------


Traceback (most recent call last):
  File "/data/user/0/org.python.testbed/files/python/lib/python3.15/test/test_urllibnet.py", line 107, in test_getcode
    self.assertEqual(e.exception.code, 404)
                     ^^^^^^^^^^^^^^^^
AttributeError: 'URLError' object has no attribute 'code'
 
----------------------------------------------------------------------
Ran 12 tests in 0.047s
 
FAILED (errors=1, skipped=10)


Traceback (most recent call last):
  File "/data/user/0/org.python.testbed/files/python/lib/python3.15/urllib/request.py", line 1531, in ftp_open
    host = socket.gethostbyname(host)
socket.gaierror: [Errno 7] No address associated with hostname
 
During handling of the above exception, another exception occurred:
 
Traceback (most recent call last):
  File "/data/user/0/org.python.testbed/files/python/lib/python3.15/test/test_urllib2.py", line 815, in test_ftp_error
    urlopen("ftp://www.pythontest.net/")
    ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/user/0/org.python.testbed/files/python/lib/python3.15/urllib/request.py", line 489, in open
    response = self._open(req, data)
  File "/data/user/0/org.python.testbed/files/python/lib/python3.15/urllib/request.py", line 506, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
                              '_open', req)
  File "/data/user/0/org.python.testbed/files/python/lib/python3.15/urllib/request.py", line 466, in _call_chain
    result = func(*args)
  File "/data/user/0/org.python.testbed/files/python/lib/python3.15/urllib/request.py", line 1533, in ftp_open
    raise URLError(msg)
urllib.error.URLError: <urlopen error [Errno 7] No address associated with hostname>
 
During handling of the above exception, another exception occurred:
 
Traceback (most recent call last):
  File "/data/user/0/org.python.testbed/files/python/lib/python3.15/test/test_urllib2.py", line 817, in test_ftp_error
    self.assertEqual(raised.reason,
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
                     f"ftp error: {exception.args[0]}")
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: gaierror(7, 'No address associated with hostname') != 'ftp error: 500 OOPS: cannot change directory:/nonexistent'
 
----------------------------------------------------------------------
Ran 81 tests in 0.519s
 
FAILED (failures=1, skipped=3)


Traceback (most recent call last):
  File "/data/user/0/org.python.testbed/files/python/lib/python3.15/urllib/request.py", line 1531, in ftp_open
    host = socket.gethostbyname(host)
socket.gaierror: [Errno 7] No address associated with hostname
 
During handling of the above exception, another exception occurred:
 
Traceback (most recent call last):
  File "/data/user/0/org.python.testbed/files/python/lib/python3.15/test/test_urllib2.py", line 815, in test_ftp_error
    urlopen("ftp://www.pythontest.net/")
    ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/user/0/org.python.testbed/files/python/lib/python3.15/urllib/request.py", line 489, in open
    response = self._open(req, data)
  File "/data/user/0/org.python.testbed/files/python/lib/python3.15/urllib/request.py", line 506, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
                              '_open', req)
  File "/data/user/0/org.python.testbed/files/python/lib/python3.15/urllib/request.py", line 466, in _call_chain
    result = func(*args)
  File "/data/user/0/org.python.testbed/files/python/lib/python3.15/urllib/request.py", line 1533, in ftp_open
    raise URLError(msg)
urllib.error.URLError: <urlopen error [Errno 7] No address associated with hostname>
 
During handling of the above exception, another exception occurred:
 
Traceback (most recent call last):
  File "/data/user/0/org.python.testbed/files/python/lib/python3.15/test/test_urllib2.py", line 817, in test_ftp_error
    self.assertEqual(raised.reason,
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
                     f"ftp error: {exception.args[0]}")
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: gaierror(7, 'No address associated with hostname') != 'ftp error: 500 OOPS: cannot change directory:/nonexistent'
 
----------------------------------------------------------------------
Ran 81 tests in 0.036s
 
FAILED (failures=1, skipped=3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants