Skip to content

Deprecate PurePath.as_uri - #15178

Merged
srittau merged 2 commits into
python:mainfrom
max-muoto:deprecate-pure-path-as-uri
Dec 28, 2025
Merged

srittau merged 2 commits into
python:mainfrom
max-muoto:deprecate-pure-path-as-uri

Conversation

@max-muoto

Copy link
Copy Markdown
Contributor

Deprecated in favor of Path.as_uri as of 3.14.

@github-actions

This comment has been minimized.

@donbarbos donbarbos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!
PR: python/cpython#127380

Comment thread stdlib/pathlib/__init__.pyi Resolved
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
@github-actions

Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

trio (https://github.com/python-trio/trio)
+ src/trio/_path.py:267: error: Argument 1 to "as_uri" of "Path" has incompatible type "trio._path.Path"; expected "pathlib.Path"  [arg-type]
@srittau
srittau merged commit 11e703e into python:main Dec 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants