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 — Add Python 3.15 path HTTP and importlib updates by JelleZijlstra · Pull Request #15737 · python/typeshed

Conversation

@JelleZijlstra

@JelleZijlstra JelleZijlstra commented May 9, 2026

Copy link
Copy Markdown
Member

Summary

Add Python 3.15 stdlib updates for path helpers, HTTP helpers, importlib, inspect, pydoc, pathlib, glob, and zipimport.

Relevant report entries

  • Added genericpath.ALL_BUT_LAST, posixpath.ALL_BUT_LAST, and ntpath.ALL_BUT_LAST, and updated several path helpers to positional-only signatures (CPython source: https://github.com/python/cpython/blob/e81025e6d2e01e38c5a5b656af5739ac9df5ff55/Lib/genericpath.py, https://github.com/python/cpython/blob/e81025e6d2e01e38c5a5b656af5739ac9df5ff55/Lib/posixpath.py, https://github.com/python/cpython/blob/e81025e6d2e01e38c5a5b656af5739ac9df5ff55/Lib/ntpath.py)
  • Added http.client.HTTPConnection(max_response_headers=...) and HTTPSConnection(max_response_headers=...) (CPython PR: http.client._MAXHEADERS = 100 limit no longer sufficient cpython#131724; source: https://github.com/python/cpython/blob/main/Lib/http/client.py)
  • Added http.server default_content_type and SimpleHTTPRequestHandler(extra_response_headers=...); removed CGIHTTPRequestHandler for 3.15 (CPython PRs: default http content-type cpython#113471, gh-135056: Add a --header CLI argument to http.server cpython#135057, Remove http.server.CGIHTTPRequestHandler and --cgi flag support cpython#133810; source: https://github.com/python/cpython/blob/main/Lib/http/server.py)
  • Added inspect.getdoc(inherit_class_doc=..., fallback_to_class_doc=...) (CPython PR: Share code for getdoc() between inspect and pydoc cpython#132686; source: https://github.com/python/cpython/blob/main/Lib/inspect.py)
  • Added importlib.resources.abc.Traversable.read_text(errors=...) (CPython source: https://github.com/python/cpython/blob/e81025e6d2e01e38c5a5b656af5739ac9df5ff55/Lib/importlib/resources/abc.py)
  • Removed private importlib.metadata.DeprecatedNonAbstract, kept Distribution and PathDistribution as ABCs, and updated 3.15 importlib.metadata.__all__/MetadataNotFound (CPython source: https://github.com/python/cpython/blob/e81025e6d2e01e38c5a5b656af5739ac9df5ff55/Lib/importlib/metadata/__init__.py)
  • Changed opcode.opmap to frozendict and added pathlib.PurePath.__vfspath__() for Python 3.15 (CPython sources: https://github.com/python/cpython/blob/e81025e6d2e01e38c5a5b656af5739ac9df5ff55/Lib/opcode.py, https://github.com/python/cpython/blob/e81025e6d2e01e38c5a5b656af5739ac9df5ff55/Lib/pathlib/__init__.py)
  • Added pstats.Stats.print_call_subheading() and pydoc.Doc.STDLIB_DIR; changed pydoc.Doc.getdocloc(basedir=None) (CPython sources: https://github.com/python/cpython/blob/e81025e6d2e01e38c5a5b656af5739ac9df5ff55/Lib/pstats.py, https://github.com/python/cpython/blob/e81025e6d2e01e38c5a5b656af5739ac9df5ff55/Lib/pydoc.py)
  • Removed glob.glob0, glob.glob1, platform.java_ver, pathlib.PurePath.is_reserved, and zipimport.zipimporter.load_module for 3.15 (sources: https://github.com/python/cpython/blob/main/Lib/glob.py, https://github.com/python/cpython/blob/main/Lib/platform.py, https://github.com/python/cpython/blob/main/Lib/pathlib/__init__.py, https://github.com/python/cpython/blob/main/Lib/zipimport.py)

Sorry, something went wrong.

Uh oh!

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

All reactions
JelleZijlstra added 2 commits May 8, 2026 18:45
@JelleZijlstra
Add Python 3.15 path and importlib updates
a3ead21
@JelleZijlstra
Fix pydoc stubtest compatibility
e841dad
@github-actions

This comment has been minimized.

Sign in to view
@JelleZijlstra
Simplify zipimport version guards
2f504a4
@github-actions

This comment has been minimized.

Sign in to view
@JelleZijlstra
JelleZijlstra marked this pull request as ready for review May 9, 2026 03:19
JelleZijlstra
JelleZijlstra commented May 9, 2026
View reviewed changes
Comment thread stdlib/http/server.pyi Resolved

Uh oh!

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

JelleZijlstra
JelleZijlstra commented May 9, 2026
View reviewed changes
Comment thread stdlib/pathlib/__init__.pyi Outdated
if sys.version_info >= (3, 13):
if sys.version_info >= (3, 15):
pass
elif sys.version_info >= (3, 13):

@JelleZijlstra JelleZijlstra May 9, 2026

Copy link
Copy Markdown
Member 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.

same

Sorry, something went wrong.

Uh oh!

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

All reactions

@JelleZijlstra JelleZijlstra May 9, 2026

Copy link
Copy Markdown
Member 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.

Actually @srittau do you have strong opinions on how cases like this should be formatted? We have one set of slots for 3.10/3.11, another for 3.12, yet another for 3.13/3.14, and then no slots in 3.15. We could instead wrap up the whole thing in an if sys.version_info < (3, 15):, but that means the rest gets indented more.

Sorry, something went wrong.

Uh oh!

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

All reactions

@srittau srittau May 11, 2026

Copy link
Copy Markdown
Collaborator

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 find a double indent slightly more readable as it makes it clear that the following was removed in 3.15, while I find the "empty" branch a bit weird. But I don't really have a strong opinion, so let's use what you prefer.

Sorry, something went wrong.

Uh oh!

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

All reactions

@JelleZijlstra JelleZijlstra May 11, 2026

Copy link
Copy Markdown
Member 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.

All right, I'll change it. Your version will also make the edit easier when we drop support for 3.12.

Sorry, something went wrong.

Uh oh!

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

All reactions
JelleZijlstra
JelleZijlstra commented May 9, 2026
View reviewed changes
Comment thread stdlib/pathlib/__init__.pyi Outdated
def as_uri(self) -> str: ...
def is_absolute(self) -> bool: ...
if sys.version_info >= (3, 13):
if sys.version_info >= (3, 15):

@JelleZijlstra JelleZijlstra May 9, 2026

Copy link
Copy Markdown
Member 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.

This is sort of similar. The method has been there since the beginning, deprecated since 3.13, gone in 3.15. In this case we shouldn't unconditionally mark it as deprecated, because the replacement (os.path.isreserved) is also new in 3.13.

Sorry, something went wrong.

Uh oh!

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

All reactions
JelleZijlstra added 2 commits May 9, 2026 06:49
@JelleZijlstra
tweaks
b9c3af1
@JelleZijlstra
Merge branch 'main' into codex/python315-paths
4c60419
@github-actions

This comment has been minimized.

Sign in to view
@JelleZijlstra
Merge branch 'main' into codex/python315-paths
c94a8c8
@github-actions

This comment has been minimized.

Sign in to view
@JelleZijlstra
Merge branch 'main' into codex/python315-paths
cf89535
@github-actions

This comment has been minimized.

Sign in to view
@JelleZijlstra
reformat
dec5871
srittau
srittau requested changes May 11, 2026
View reviewed changes
Comment thread stdlib/http/server.pyi Resolved

Uh oh!

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

Comment thread stdlib/pathlib/__init__.pyi Resolved

Uh oh!

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

Comment thread stdlib/pathlib/__init__.pyi Resolved

Uh oh!

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

Comment thread stdlib/genericpath.pyi Resolved

Uh oh!

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

Comment thread stdlib/ntpath.pyi Resolved

Uh oh!

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

@JelleZijlstra
more srittau feedback
1945090
srittau
srittau approved these changes May 11, 2026
View reviewed changes
@github-actions

github-actions Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

All reactions

Sorry, something went wrong.

Uh oh!

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

@JelleZijlstra
JelleZijlstra merged commit 4e1948a into python:main May 11, 2026
56 checks passed

Uh oh!

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

@JelleZijlstra
JelleZijlstra deleted the codex/python315-paths branch May 11, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@srittau srittau srittau approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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.

2 participants

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