Add Python 3.15 path HTTP and importlib updates#15737
Open
JelleZijlstra wants to merge 5 commits intopython:mainfrom
Open
Add Python 3.15 path HTTP and importlib updates#15737JelleZijlstra wants to merge 5 commits intopython:mainfrom
JelleZijlstra wants to merge 5 commits intopython:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
JelleZijlstra
commented
May 9, 2026
JelleZijlstra
commented
May 9, 2026
| if sys.version_info >= (3, 13): | ||
| if sys.version_info >= (3, 15): | ||
| pass | ||
| elif sys.version_info >= (3, 13): |
Member
Author
There was a problem hiding this comment.
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.
JelleZijlstra
commented
May 9, 2026
| def as_uri(self) -> str: ... | ||
| def is_absolute(self) -> bool: ... | ||
| if sys.version_info >= (3, 13): | ||
| if sys.version_info >= (3, 15): |
Member
Author
There was a problem hiding this comment.
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.
Contributor
|
Diff from mypy_primer, showing the effect of this PR on open source code: pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/computation/ops.py:328: error: Need type annotation for "_binary_ops_dict" (hint: "_binary_ops_dict: dict[<type>, <type>] = ...") [var-annotated]
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Add Python 3.15 stdlib updates for path helpers, HTTP helpers, importlib, inspect, pydoc, pathlib, glob, and zipimport.
Relevant report entries
genericpath.ALL_BUT_LAST,posixpath.ALL_BUT_LAST, andntpath.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)http.client.HTTPConnection(max_response_headers=...)andHTTPSConnection(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)http.serverdefault_content_typeandSimpleHTTPRequestHandler(extra_response_headers=...); removedCGIHTTPRequestHandlerfor 3.15 (CPython PRs: default http content-type cpython#113471, gh-135056: Add a --header CLI argument to http.server cpython#135057, Removehttp.server.CGIHTTPRequestHandlerand--cgiflag support cpython#133810; source: https://github.com/python/cpython/blob/main/Lib/http/server.py)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)importlib.resources.abc.Traversable.read_text(errors=...)(CPython source: https://github.com/python/cpython/blob/e81025e6d2e01e38c5a5b656af5739ac9df5ff55/Lib/importlib/resources/abc.py)importlib.metadata.DeprecatedNonAbstract, keptDistributionandPathDistributionas ABCs, and updated 3.15importlib.metadata.__all__/MetadataNotFound(CPython source: https://github.com/python/cpython/blob/e81025e6d2e01e38c5a5b656af5739ac9df5ff55/Lib/importlib/metadata/__init__.py)opcode.opmaptofrozendictand addedpathlib.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)pstats.Stats.print_call_subheading()andpydoc.Doc.STDLIB_DIR; changedpydoc.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)glob.glob0,glob.glob1,platform.java_ver,pathlib.PurePath.is_reserved, andzipimport.zipimporter.load_modulefor 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)