Skip to content

gh-131178: Add tests for http.server command-line interface #132540

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

Merged
merged 79 commits into from
May 19, 2025

Conversation

ggqlq
Copy link
Contributor

@ggqlq ggqlq commented Apr 15, 2025

@python-cla-bot
Copy link

python-cla-bot bot commented Apr 15, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Apr 15, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@bedevere-app
Copy link

bedevere-app bot commented Apr 15, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@ggqlq ggqlq changed the title Add tests for http.server command-line interface gh-131178: Add tests for http.server command-line interface Apr 15, 2025
@ggqlq ggqlq requested a review from donBarbos April 16, 2025 08:32
Copy link
Contributor

@donBarbos donBarbos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't read everything carefully yet, but this is what catches my eye first

ggqlq and others added 9 commits April 16, 2025 21:31
Co-authored-by: Semyon Moroz <[email protected]>
Co-authored-by: Semyon Moroz <[email protected]>
Co-authored-by: Semyon Moroz <[email protected]>
Co-authored-by: Semyon Moroz <[email protected]>
Co-authored-by: Semyon Moroz <[email protected]>
Co-authored-by: Semyon Moroz <[email protected]>
Co-authored-by: Semyon Moroz <[email protected]>
@picnixz picnixz enabled auto-merge (squash) May 19, 2025 11:47
@ggqlq
Copy link
Contributor Author

ggqlq commented May 19, 2025

Thank you all!

@picnixz picnixz merged commit 605022a into python:main May 19, 2025
38 checks passed
@bedevere-bot
Copy link

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

Hi! The buildbot x86-64 MacOS Intel ASAN NoGIL 3.x (tier-1) has failed when building commit 605022a.

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/1366/builds/4325) and take a look at the build logs.
  4. Check if the failure is related to this commit (605022a) 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/1366/builds/4325

Failed tests:

  • test_httpservers

Failed subtests:

  • test_https_client - test.test_httpservers.CommandLineRunTimeTestCase.test_https_client
  • test_http_client - test.test_httpservers.CommandLineRunTimeTestCase.test_http_client

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-intel-aws.macos-with-brew.asan.nogil/build/Lib/test/test_httpservers.py", line 1520, in test_http_client
    res = self.fetch_file(f'http://{bind}:{port}/{self.served_file_name}')
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-intel-aws.macos-with-brew.asan.nogil/build/Lib/test/test_httpservers.py", line 1476, in fetch_file
    context = ssl.create_default_context()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'create_default_context'


Traceback (most recent call last):
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-intel-aws.macos-with-brew.asan.nogil/build/Lib/test/test_httpservers.py", line 1533, in test_https_client
    self.assertTrue(self.wait_for_server(proc, 'https', port, bind))
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: False is not true

@picnixz
Copy link
Member

picnixz commented May 19, 2025

@ggqlq can you add a skipIf if ssl is None? TiA

@ggqlq
Copy link
Contributor Author

ggqlq commented May 19, 2025

@ggqlq can you add a skipIf if ssl is None? TiA

I open a new PR #134224 @picnixz

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.

4 participants