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-97822: Fix http.server documentation reference to test() function by Jason-Y-Z · Pull Request #98027 · python/cpython

Conversation

@Jason-Y-Z

@Jason-Y-Z Jason-Y-Z commented Oct 7, 2022 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor
  • Issue: documentation for http.server refers to wrong test() function #97822

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-bot bedevere-bot added awaiting review docs Documentation in the Doc dir skip news labels Oct 7, 2022
@ghost

ghost commented Oct 7, 2022 •
edited by ghost
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.

JelleZijlstra
JelleZijlstra reviewed Oct 7, 2022
View reviewed changes
Comment thread Doc/library/http.server.rst Outdated
``text/`` the file is opened in text mode; otherwise binary mode is used.

For example usage, see the implementation of the :func:`test` function
For example usage, see the implementation of the :func:`~http.server.test` function

@JelleZijlstra JelleZijlstra Oct 7, 2022

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.

This link won't work, because the test() function is (rightly) not documented. I think it would be more helpful to link to the source code, which can be done with the :source: directive.

Sorry, something went wrong.

Uh oh!

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

All reactions

@Jason-Y-Z Jason-Y-Z Oct 7, 2022

Copy link
Copy Markdown
Contributor Author

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.

Thanks for the review, hopefully the latest version fixed this :)

Sorry, something went wrong.

Uh oh!

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

All reactions
@Jason-Y-Z
Jason-Y-Z force-pushed the gh-97822 branch from 0355123 to 9d4a36b Compare October 7, 2022 16:01
JelleZijlstra
JelleZijlstra reviewed Oct 7, 2022
View reviewed changes
Comment thread Doc/library/http.server.rst Outdated
``text/`` the file is opened in text mode; otherwise binary mode is used.

For example usage, see the implementation of the :func:`test` function
For example usage, see the implementation of the :source:`~http.server.test` function

@JelleZijlstra JelleZijlstra Oct 7, 2022

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.

This is not correct, you need a file path like Lib/http/server.py. See the top of https://docs.python.org/3.10/library/dbm.html for an example of how it is rendered.

Sorry, something went wrong.

Uh oh!

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

All reactions

@Jason-Y-Z Jason-Y-Z Oct 7, 2022

Copy link
Copy Markdown
Contributor Author

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.

Right, thanks for your help :)

Sorry, something went wrong.

Uh oh!

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

All reactions
JelleZijlstra
JelleZijlstra reviewed Oct 7, 2022
View reviewed changes
Comment thread Doc/library/http.server.rst Outdated
Comment on lines 395 to 396
For example usage, see the implementation of the :source:`~http.server.test` function
invocation in the :mod:`http.server` module.

@JelleZijlstra JelleZijlstra Oct 7, 2022

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.

Suggested change
For example usage, see the implementation of the :source:`~http.server.test` function
invocation in the :mod:`http.server` module.
For example usage, see the implementation of the ``test`` function
invocation in :source:`Lib/http/server.py`.

Sorry, something went wrong.

Uh oh!

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

All reactions
@Jason-Y-Z
Jason-Y-Z force-pushed the gh-97822 branch from 9d4a36b to d57649f Compare October 7, 2022 18:58
JelleZijlstra
JelleZijlstra reviewed Oct 7, 2022
View reviewed changes
Comment thread Doc/library/http.server.rst Resolved

Uh oh!

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

JelleZijlstra
JelleZijlstra approved these changes Oct 7, 2022
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels Oct 7, 2022
@JelleZijlstra JelleZijlstra self-assigned this Oct 7, 2022
@Jason-Y-Z
pythongh-97822: Fix http.server documentation reference to test() fun…
0682fbd
…ction
@Jason-Y-Z
Jason-Y-Z force-pushed the gh-97822 branch from b44ed69 to 0682fbd Compare October 7, 2022 19:02
@Jason-Y-Z

Jason-Y-Z commented Oct 7, 2022 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

I might be wrong, but the build error message seems to be suggesting something else broken?

All reactions

Sorry, something went wrong.

Uh oh!

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

@JelleZijlstra

JelleZijlstra commented Oct 7, 2022

Copy link
Copy Markdown
Member

Sorry for that, #98056 will fix it.

Jason-Y-Z reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@JelleZijlstra
Merge branch 'main' into pythongh-97822
97790bf
JelleZijlstra
JelleZijlstra reviewed Oct 8, 2022
View reviewed changes
Comment thread Doc/library/http.server.rst Resolved

Uh oh!

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

@JelleZijlstra
Update Doc/library/http.server.rst
d6fe4ce
@JelleZijlstra JelleZijlstra added needs backport to 3.10 needs backport to 3.11 only security fixes labels Oct 8, 2022
@JelleZijlstra
JelleZijlstra merged commit 6b48562 into python:main Oct 8, 2022
@miss-islington

miss-islington commented Oct 8, 2022

Copy link
Copy Markdown
Contributor

Thanks @Jason-Y-Z for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖

Jason-Y-Z reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the awaiting merge label Oct 8, 2022
@bedevere-bot

bedevere-bot commented Oct 8, 2022

Copy link
Copy Markdown

GH-98084 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Oct 8, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 8, 2022
@Jason-Y-Z @miss-islington
pythongh-97822: Fix http.server documentation reference to test() fun…
1676696
…ction (pythonGH-98027)

Co-authored-by: Jelle Zijlstra <[email protected]>
(cherry picked from commit 6b48562)

Co-authored-by: JasonYZ <[email protected]>
@bedevere-bot

bedevere-bot commented Oct 8, 2022

Copy link
Copy Markdown

GH-98085 is a backport of this pull request to the 3.10 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the needs backport to 3.10 label Oct 8, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 8, 2022
@Jason-Y-Z @miss-islington
pythongh-97822: Fix http.server documentation reference to test() fun…
5442004
…ction (pythonGH-98027)

Co-authored-by: Jelle Zijlstra <[email protected]>
(cherry picked from commit 6b48562)

Co-authored-by: JasonYZ <[email protected]>
miss-islington added a commit that referenced this pull request Oct 8, 2022
@miss-islington @Jason-Y-Z
gh-97822: Fix http.server documentation reference to test() function (G…
b5196fa
…H-98027)

Co-authored-by: Jelle Zijlstra <[email protected]>
(cherry picked from commit 6b48562)

Co-authored-by: JasonYZ <[email protected]>
miss-islington added a commit that referenced this pull request Oct 8, 2022
@miss-islington @Jason-Y-Z
gh-97822: Fix http.server documentation reference to test() function (G…
786fde5
…H-98027)

Co-authored-by: Jelle Zijlstra <[email protected]>
(cherry picked from commit 6b48562)

Co-authored-by: JasonYZ <[email protected]>
@Jason-Y-Z
Jason-Y-Z deleted the gh-97822 branch October 8, 2022 08:33
carljm added a commit to carljm/cpython that referenced this pull request Oct 8, 2022
@carljm
Merge branch 'main' into typewatch
d67d6fd
* main:
  pythongh-68686: Retire eptag ptag scripts (python#98064)
  pythongh-97922: Run the GC only on eval breaker (python#97920)
  GitHub Workflows security hardening (python#96492)
  Add `@ezio-melotti` as codeowner for `.github/`. (python#98079)
  pythongh-97913 Docs: Add walrus operator to the index (python#97921)
  [doc] Fix broken links to C extensions accelerating stdlib modules (python#96914)
  pythongh-97822: Fix http.server documentation reference to test() function (python#98027)
  pythongh-91052: Add PyDict_Unwatch for unwatching a dictionary (python#98055)
  pythonGH-98023: Change default child watcher to PidfdChildWatcher on supported systems (python#98024)
  pythonGH-94182: Run the PidfdChildWatcher on the running loop (python#94184)
carljm added a commit to carljm/cpython that referenced this pull request Oct 9, 2022
@carljm
Merge branch 'main' into urllibnonet
132c32e
* main: (5519 commits)
  Minor edits to the Descriptor HowTo Guide (pythonGH-24901)
  Fix link to Lifecycle of a Pull Request in CONTRIBUTING (python#98102)
  pythonGH-94597: deprecate `SafeChildWatcher`, `FastChildWatcher` and `MultiLoopChildWatcher` child watchers  (python#98089)
  Auto-cancel old builds when new commit pushed to branch (python#98009)
  pythongh-95011: Migrate syslog module to Argument Clinic (pythonGH-95012)
  pythongh-68686: Retire eptag ptag scripts (python#98064)
  pythongh-97922: Run the GC only on eval breaker (python#97920)
  GitHub Workflows security hardening (python#96492)
  Add `@ezio-melotti` as codeowner for `.github/`. (python#98079)
  pythongh-97913 Docs: Add walrus operator to the index (python#97921)
  [doc] Fix broken links to C extensions accelerating stdlib modules (python#96914)
  pythongh-97822: Fix http.server documentation reference to test() function (python#98027)
  pythongh-91052: Add PyDict_Unwatch for unwatching a dictionary (python#98055)
  pythonGH-98023: Change default child watcher to PidfdChildWatcher on supported systems (python#98024)
  pythonGH-94182: Run the PidfdChildWatcher on the running loop (python#94184)
  pythongh-92886: make test_ast pass with -O (assertions off) (pythonGH-98058)
  pythongh-92886: make test_coroutines pass with -O (assertions off) (pythonGH-98060)
  pythongh-57179: Add note on symlinks for os.walk (python#94799)
  pythongh-94808: Fix regex on exotic platforms (python#98036)
  pythongh-90085: Remove vestigial -t and -c timeit options (python#94941)
  ...
mpage pushed a commit to mpage/cpython that referenced this pull request Oct 11, 2022
@Jason-Y-Z @JelleZijlstra @mpage
pythongh-97822: Fix http.server documentation reference to test() fun…
e20a190
…ction (python#98027)

Co-authored-by: Jelle Zijlstra <[email protected]>
pablogsal pushed a commit that referenced this pull request Oct 22, 2022
@miss-islington @Jason-Y-Z @pablogsal
gh-97822: Fix http.server documentation reference to test() function (G…
dfae46c
…H-98027)

Co-authored-by: Jelle Zijlstra <[email protected]>
(cherry picked from commit 6b48562)

Co-authored-by: JasonYZ <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@JelleZijlstra JelleZijlstra JelleZijlstra approved these changes

Uh oh!

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

Assignees

@JelleZijlstra JelleZijlstra

Labels

docs Documentation in the Doc dir 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

@Jason-Y-Z @JelleZijlstra @miss-islington @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.