Skip to content

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

Merged
picnixz merged 79 commits into
python:mainfrom
ggqlq:main
May 19, 2025
Merged

picnixz merged 79 commits into
python:mainfrom
ggqlq:main

Conversation

@ggqlq

@ggqlq ggqlq commented Apr 15, 2025 •

Copy link
Copy Markdown
Contributor
@python-cla-bot

python-cla-bot Bot commented Apr 15, 2025 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app

bedevere-app Bot commented Apr 15, 2025

Copy link
Copy Markdown

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

bedevere-app Bot commented Apr 15, 2025

Copy link
Copy Markdown

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 Apr 15, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Apr 15, 2025
7 of 9 tasks
Comment thread Lib/http/server.py Resolved
Comment thread Lib/test/test_httpservers.py Resolved
@ggqlq
ggqlq requested a review from donbarbos April 16, 2025 08:32

@donbarbos donbarbos left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread Lib/http/server.py Resolved
Comment thread Lib/http/server.py Resolved
Comment thread Lib/http/server.py Resolved
Comment thread Lib/http/server.py Resolved
Comment thread Lib/http/server.py Resolved
Comment thread Lib/http/server.py Resolved
Comment thread Lib/test/test_httpservers.py Resolved
Comment thread Lib/test/test_httpservers.py Resolved
Comment thread Lib/test/test_httpservers.py Resolved
Comment thread Lib/test/test_httpservers.py Resolved
Comment thread Lib/test/test_httpservers.py Resolved
ggqlq and others added 9 commits April 16, 2025 21:31
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Comment thread Lib/test/test_httpservers.py Resolved
Comment thread Lib/test/test_httpservers.py Resolved
Comment thread Lib/test/test_httpservers.py Resolved
Comment thread Lib/test/test_httpservers.py Resolved
Comment thread Lib/test/test_httpservers.py Resolved
Comment thread Lib/test/test_httpservers.py Resolved
Comment thread Lib/test/test_httpservers.py Resolved
Comment thread Lib/test/test_httpservers.py Resolved
Comment thread Lib/test/test_httpservers.py Resolved
Comment thread Lib/test/test_httpservers.py Resolved
Comment thread Lib/test/test_httpservers.py Resolved
ggqlq and others added 10 commits May 19, 2025 19:32
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Comment thread Lib/test/test_httpservers.py Resolved
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Comment thread Lib/test/test_httpservers.py Resolved
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Comment thread Lib/test/test_httpservers.py Resolved
@picnixz
picnixz enabled auto-merge (squash) May 19, 2025 11:47
@ggqlq

ggqlq commented May 19, 2025

Copy link
Copy Markdown
Contributor Author

Thank you all!

@picnixz
picnixz merged commit 605022a into python:main May 19, 2025
@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ 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

picnixz commented May 19, 2025

Copy link
Copy Markdown
Member

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

@ggqlq

ggqlq commented May 19, 2025

Copy link
Copy Markdown
Contributor Author

@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

4 participants