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: fix SSL tests for `http.server` command-line interface by ggqlq · Pull Request #134224 · python/cpython

Conversation

@ggqlq

@ggqlq ggqlq commented May 19, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor
  • 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 and others added 30 commits April 15, 2025 02:38
@ggqlq
Add tests for http.server command-line interface
79db2f2
@ggqlq
Merge branch 'python:main' into main
a5e5220
@ggqlq
add news
2b589bf
@ggqlq
add news
e11f8fe
@ggqlq
lint
4e008fd
@ggqlq
move a new class into test
ad76ab1
@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]>
@ggqlq
update
3277327
@ggqlq @donbarbos
Update Lib/http/server.py
771263d
Co-authored-by: Semyon Moroz <[email protected]>
@ggqlq
remove news
3679a76
@ggqlq @donbarbos
Update Lib/test/test_httpservers.py
6c58710
Co-authored-by: Semyon Moroz <[email protected]>
@ggqlq @donbarbos
Update Lib/test/test_httpservers.py
3e4a6aa
Co-authored-by: Semyon Moroz <[email protected]>
@ggqlq @donbarbos
Update Lib/test/test_httpservers.py
8e93c5d
Co-authored-by: Semyon Moroz <[email protected]>
@ggqlq
add no argument test and redirect stderr
439c36d
@ggqlq
wrap some lines to fit into 79 characters
7e8aedc
@ggqlq
wrap some lines to fit into 79 characters(2)
8f3e7ad
@ggqlq @donbarbos
Update Lib/test/test_httpservers.py
85cb099
Co-authored-by: Semyon Moroz <[email protected]>
@ggqlq @donbarbos
Update Lib/test/test_httpservers.py
9417864
Co-authored-by: Semyon Moroz <[email protected]>
@ggqlq @donbarbos
Update Lib/test/test_httpservers.py
a5a7d8c
Co-authored-by: Semyon Moroz <[email protected]>
@ggqlq @picnixz
Update Lib/test/test_httpservers.py
a35e0d6
Co-authored-by: Bénédikt Tran <[email protected]>
@ggqlq @picnixz
Update Lib/test/test_httpservers.py
e2266c0
Co-authored-by: Bénédikt Tran <[email protected]>
@ggqlq @picnixz
Update Lib/test/test_httpservers.py
b4f9e72
Co-authored-by: Bénédikt Tran <[email protected]>
@ggqlq
pass ssl context by argument
fc741e9
picnixz
picnixz approved these changes May 19, 2025
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels May 19, 2025
@picnixz
Merge branch 'main' into main
0e0fb7a
@picnixz

picnixz commented May 19, 2025

Copy link
Copy Markdown
Member

!buildbot ASAN

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot

bedevere-bot commented May 19, 2025

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @picnixz for commit 0e0fb7a 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F134224%2Fmerge

The command will test the builders whose names match following regular expression: ASAN

The builders matched are:

  • AMD64 Arch Linux Asan PR
  • AMD64 Arch Linux Asan Debug PR
  • x86-64 MacOS Intel ASAN NoGIL PR
All reactions

Sorry, something went wrong.

Uh oh!

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

@picnixz
Merge branch 'main' into main
e818bb6
@picnixz picnixz mentioned this pull request May 19, 2025
Improve error messages of curses by indicating failed C function #125843
Closed
@picnixz

picnixz commented May 19, 2025

Copy link
Copy Markdown
Member

!buildbot x86-64 MacOS Intel ASAN NoGIL PR

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot

bedevere-bot commented May 19, 2025

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @picnixz for commit e818bb6 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F134224%2Fmerge

The command will test the builders whose names match following regular expression: x86-64 MacOS Intel ASAN NoGIL PR

The builders matched are:

  • x86-64 MacOS Intel ASAN NoGIL PR
All reactions

Sorry, something went wrong.

Uh oh!

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

@picnixz

picnixz commented May 19, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

So the failures are the following:

======================================================================
ERROR: test_http_client (test.test_httpservers.CommandLineRunTimeTestCase.test_http_client)
----------------------------------------------------------------------
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'

======================================================================
FAIL: test_https_client (test.test_httpservers.CommandLineRunTimeTestCase.test_https_client)
----------------------------------------------------------------------
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

----------------------------------------------------------------------

We fixed the AttributeError, but I don't know why the other happens.

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

Note: using localhost instead of 127.0.0.1 doesn't seem the right solution as we also have tests with 127.0.0.1 elsewhere.

However, maybe we can just ignore the bind itself and check for the "best" address (which is chosen by http.server via _get_best_family).

All reactions

Sorry, something went wrong.

Uh oh!

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

@picnixz
Update test_httpservers.py
9192281
@picnixz

picnixz commented May 19, 2025

Copy link
Copy Markdown
Member

I've committed directly to your branch as the tier-1 bot is failing (making it hard to fix another issue I introduced in a subsequent commit, not your fault!)

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

!buildbot x86-64 MacOS Intel ASAN NoGIL PR

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot

bedevere-bot commented May 19, 2025

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @picnixz for commit 9192281 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F134224%2Fmerge

The command will test the builders whose names match following regular expression: x86-64 MacOS Intel ASAN NoGIL PR

The builders matched are:

  • x86-64 MacOS Intel ASAN NoGIL PR
All reactions

Sorry, something went wrong.

Uh oh!

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

@picnixz

This comment was marked as resolved.

Sign in to view
@picnixz
fix tests
bd42827
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.

picnixz added 2 commits May 19, 2025 21:23
@picnixz
Update Lib/test/test_httpservers.py
5c6f022
@picnixz
Update Lib/test/test_httpservers.py
4dfcfe3
@picnixz

picnixz commented May 19, 2025

Copy link
Copy Markdown
Member

Ok, so the tests now hang on non-Linux bots. I'll stop working on this branch and will come back on my linux in a few hours.

All reactions

Sorry, something went wrong.

Uh oh!

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

@diegorusso diegorusso mentioned this pull request May 19, 2025
gh-131798: Split CALL_LIST_APPEND into serveral uops #134240
Merged
picnixz
picnixz reviewed May 19, 2025
View reviewed changes

@picnixz picnixz left a comment •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

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.

So localhost doesn't work and 127.0.0.1 doesn't work for some build bots. I think we'll just leave it to the script the responsibility to start the server and we'll deduce the bind address from the output.

Sorry, something went wrong.

Uh oh!

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

All reactions
@picnixz
now it should work
7123976
@picnixz

picnixz commented May 19, 2025

Copy link
Copy Markdown
Member

Ok, so now, the tests entirely hang for some obscure reasons. I'll open a new PR instead, sorry for messing up your branch though (but thank you for your quick response time).

All reactions

Sorry, something went wrong.

Uh oh!

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

@picnixz picnixz closed this May 19, 2025
@picnixz

picnixz commented May 19, 2025

Copy link
Copy Markdown
Member

I've opened #134279

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

Uh oh!

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

Assignees

No one assigned

Labels

awaiting merge skip news tests Tests in the Lib/test dir

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 @picnixz @bedevere-bot @ZeroIntensity
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.