Skip to content

gh-99352: Export HTTPSHandler from urllib.request #103688

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

arhadthedev
Copy link
Member

@arhadthedev arhadthedev commented Apr 22, 2023

Fixes a builbot failure due to gh-99353 importing previously unexported urllib.request.HTTPSHandler into a test:

test test_urllib2 crashed -- Traceback (most recent call last):
  File "/home/buildbot/buildarea/pull_request.cstratak-RHEL7-x86_64/build/Lib/test/libregrtest/runtest.py", line 360, in _runtest_inner
    refleak = _runtest_inner2(ns, test_name)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/pull_request.cstratak-RHEL7-x86_64/build/Lib/test/libregrtest/runtest.py", line 300, in _runtest_inner2
    the_module = importlib.import_module(abstest)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/pull_request.cstratak-RHEL7-x86_64/build/Lib/importlib/__init__.py", line 124, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1332, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1305, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1276, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 841, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1025, in exec_module
  File "<frozen importlib._bootstrap>", line 400, in _call_with_frames_removed
  File "/home/buildbot/buildarea/pull_request.cstratak-RHEL7-x86_64/build/Lib/test/test_urllib2.py", line 527, in <module>
    class MockHTTPSHandler(urllib.request.HTTPSHandler):
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'urllib.request' has no attribute 'HTTPSHandler'. Did you mean: 'HTTPHandler'?

I've met this error in #19474 (comment).

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @arhadthedev for commit a9b31ab 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Apr 22, 2023
@arhadthedev
Copy link
Member Author

#19474 (comment)

@arhadthedev arhadthedev deleted the gh-99352 branch April 22, 2023 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants