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

gh-131178: Add tests for http.server command-line interface#132540
picnixz merged 79 commits into
python:mainfrom
ggqlq:main

Conversation

@ggqlq

@ggqlqggqlq commented Apr 15, 2025

Copy link
Copy Markdown
Contributor

@python-cla-bot

python-cla-botBot commented Apr 15, 2025

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app

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

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.

@ggqlqggqlq changed the title Add tests for http.server command-line interfacegh-131178: Add tests for http.server command-line interfaceApr 15, 2025
Comment threadLib/http/server.py Outdated
Comment threadLib/test/test_httpservers.py Outdated
@ggqlq
ggqlq requested a review from donbarbosApril 16, 2025 08:32

@donbarbosdonbarbos 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 threadLib/http/server.py Outdated
Comment threadLib/http/server.py Outdated
Comment threadLib/http/server.py Outdated
Comment threadLib/http/server.py
Comment threadLib/http/server.py
Comment threadLib/http/server.py Outdated
Comment threadLib/test/test_httpservers.py Outdated
Comment threadLib/test/test_httpservers.py Outdated
Comment threadMisc/NEWS.d/next/Library/2025-04-15-12-47-09.gh-issue-131178.Td8j5x.rst Outdated
Comment threadLib/test/test_httpservers.py Outdated
Comment threadLib/test/test_httpservers.py
Comment threadLib/test/test_httpservers.py Outdated
ggqlqand 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 threadLib/test/test_httpservers.py Outdated
Comment threadLib/test/test_httpservers.py Outdated
Comment threadLib/test/test_httpservers.py Outdated
Comment threadLib/test/test_httpservers.py Outdated
Comment threadLib/test/test_httpservers.py Outdated
Comment threadLib/test/test_httpservers.py Outdated
Comment threadLib/test/test_httpservers.py Outdated
Comment threadLib/test/test_httpservers.py Outdated
Comment threadLib/test/test_httpservers.py Outdated
Comment threadLib/test/test_httpservers.py Outdated
Comment threadLib/test/test_httpservers.py Outdated
ggqlqand 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 threadLib/test/test_httpservers.py
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Comment threadLib/test/test_httpservers.py Outdated
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Comment threadLib/test/test_httpservers.py Outdated
@picnixz
picnixz enabled auto-merge (squash) May 19, 2025 11:47
@ggqlq

Copy link
Copy Markdown
ContributorAuthor

Thank you all!

@picnixz
picnixz merged commit 605022a into python:mainMay 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_clientself.assertTrue(self.wait_for_server(proc, 'https', port, bind))
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AssertionError: False is not true

@picnixz

Copy link
Copy Markdown
Member

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

@ggqlq

Copy link
Copy Markdown
ContributorAuthor

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

I open a new PR #134224@picnixz

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@ggqlq@donbarbos@picnixz@bedevere-bot