GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-131178: Add tests for http.server command-line interface by ggqlq · Pull Request #132540 · python/cpython

Conversation

@ggqlq

@ggqlq ggqlq commented Apr 15, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

#131178

  • Issue: Add tests for command-line interface #131178

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ggqlq
Add tests for http.server command-line interface
79db2f2
@bedevere-app bedevere-app Bot added the awaiting review label Apr 15, 2025
@python-cla-bot

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

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ggqlq
Merge branch 'python:main' into main
a5e5220
@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ggqlq added 2 commits April 15, 2025 12:52
@ggqlq
add news
2b589bf
@ggqlq
add news
e11f8fe
@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
@bedevere-app bedevere-app Bot mentioned this pull request Apr 15, 2025
Add tests for command-line interface #131178
Open
7 of 9 tasks
@ggqlq
lint
4e008fd
donbarbos
donbarbos reviewed Apr 15, 2025
View reviewed changes
Comment thread Lib/http/server.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

donbarbos
donbarbos reviewed Apr 15, 2025
View reviewed changes
Comment thread Lib/test/test_httpservers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ggqlq
move a new class into test
ad76ab1
@ggqlq
ggqlq requested a review from donbarbos April 16, 2025 08:32
donbarbos
donbarbos suggested changes Apr 16, 2025
View reviewed changes

@donbarbos donbarbos left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this 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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/http/server.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/http/server.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/http/server.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/http/server.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/http/server.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/http/server.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_httpservers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_httpservers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Misc/NEWS.d/next/Library/2025-04-15-12-47-09.gh-issue-131178.Td8j5x.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_httpservers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added awaiting core review and removed awaiting review labels Apr 16, 2025
donbarbos
donbarbos reviewed Apr 16, 2025
View reviewed changes
Comment thread Lib/test/test_httpservers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

donbarbos
donbarbos reviewed Apr 16, 2025
View reviewed changes
Comment thread Lib/test/test_httpservers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

ggqlq and others added 9 commits April 16, 2025 21:31
@ggqlq @donbarbos
Update Lib/http/server.py
5e563d3
Co-authored-by: Semyon Moroz <[email protected]>
@ggqlq @donbarbos
Update Lib/http/server.py
86b856e
Co-authored-by: Semyon Moroz <[email protected]>
@ggqlq @donbarbos
Update Lib/http/server.py
4d5c2b5
Co-authored-by: Semyon Moroz <[email protected]>
@ggqlq @donbarbos
Update Lib/http/server.py
574d6be
Co-authored-by: Semyon Moroz <[email protected]>
@ggqlq @donbarbos
Update Lib/http/server.py
c1f3358
Co-authored-by: Semyon Moroz <[email protected]>
@ggqlq @donbarbos
Update Lib/http/server.py
01d5fb8
Co-authored-by: Semyon Moroz <[email protected]>
@ggqlq @donbarbos
Update Lib/http/server.py
540700f
Co-authored-by: Semyon Moroz <[email protected]>
@ggqlq @donbarbos
Update Lib/test/test_httpservers.py
1bdb0ec
Co-authored-by: Semyon Moroz <[email protected]>
@ggqlq @donbarbos
Update Lib/test/test_httpservers.py
38aea9e
Co-authored-by: Semyon Moroz <[email protected]>
donbarbos
donbarbos reviewed Apr 16, 2025
View reviewed changes
Comment thread Lib/test/test_httpservers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

picnixz
picnixz reviewed May 19, 2025
View reviewed changes
Comment thread Lib/test/test_httpservers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_httpservers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_httpservers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_httpservers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_httpservers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_httpservers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_httpservers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_httpservers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_httpservers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_httpservers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

ggqlq and others added 10 commits May 19, 2025 19:32
@ggqlq @picnixz
Update Lib/test/test_httpservers.py
6beb7f1
Co-authored-by: Bénédikt Tran <[email protected]>
@ggqlq @picnixz
Update Lib/test/test_httpservers.py
4c25dcd
Co-authored-by: Bénédikt Tran <[email protected]>
@ggqlq @picnixz
Update Lib/test/test_httpservers.py
d67ee16
Co-authored-by: Bénédikt Tran <[email protected]>
@ggqlq @picnixz
Update Lib/test/test_httpservers.py
d5914dc
Co-authored-by: Bénédikt Tran <[email protected]>
@ggqlq @picnixz
Update Lib/test/test_httpservers.py
4d0154e
Co-authored-by: Bénédikt Tran <[email protected]>
@ggqlq @picnixz
Update Lib/test/test_httpservers.py
2ba7001
Co-authored-by: Bénédikt Tran <[email protected]>
@ggqlq @picnixz
Update Lib/test/test_httpservers.py
0c37216
Co-authored-by: Bénédikt Tran <[email protected]>
@ggqlq @picnixz
Update Lib/test/test_httpservers.py
6938dd9
Co-authored-by: Bénédikt Tran <[email protected]>
@ggqlq @picnixz
Update Lib/test/test_httpservers.py
59be989
Co-authored-by: Bénédikt Tran <[email protected]>
@ggqlq
rename random_... as served_... in the CommandLineRunTimeTestCase class
7a8d6f1
picnixz
picnixz reviewed May 19, 2025
View reviewed changes
Comment thread Lib/test/test_httpservers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ggqlq @picnixz
Update Lib/test/test_httpservers.py
921739c
Co-authored-by: Bénédikt Tran <[email protected]>
picnixz
picnixz reviewed May 19, 2025
View reviewed changes
Comment thread Lib/test/test_httpservers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ggqlq @picnixz
Update Lib/test/test_httpservers.py
6d9981f
Co-authored-by: Bénédikt Tran <[email protected]>
picnixz
picnixz approved these changes May 19, 2025
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels May 19, 2025
picnixz
picnixz reviewed May 19, 2025
View reviewed changes
Comment thread Lib/test/test_httpservers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@picnixz
Update Lib/test/test_httpservers.py
1d42f2c
@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!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz
picnixz merged commit 605022a into python:main May 19, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label May 19, 2025
@bedevere-bot

bedevere-bot commented May 19, 2025

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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz

picnixz commented May 19, 2025

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ggqlq ggqlq mentioned this pull request May 23, 2025
gh-131178: add E2E mockless tests for http.server command-line interface #134279
Merged
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
@ggqlq @Pranjal095
pythongh-131178: Add tests for http.server command-line interface (p…
a595c76
…ython#132540)
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
@ggqlq @taegyunkim
pythongh-131178: Add tests for http.server command-line interface (p…
d40a40d
…ython#132540)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@picnixz picnixz picnixz approved these changes
@donbarbos donbarbos Awaiting requested review from donbarbos

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@ggqlq @donbarbos @picnixz @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.