Skip to content

GH-136874: url2pathname(): discard query and fragment components#136875

Merged
barneygale merged 2 commits into
python:mainfrom
barneygale:gh-136874
Jul 21, 2025
Merged

GH-136874: url2pathname(): discard query and fragment components#136875
barneygale merged 2 commits into
python:mainfrom
barneygale:gh-136874

Conversation

@barneygale

@barneygale barneygale commented Jul 20, 2025

Copy link
Copy Markdown
Contributor

In urllib.request.url2pathname(), ignore any query or fragment components in the given URL.


📚 Documentation preview 📚: https://cpython-previews--136875.org.readthedocs.build/

In `urllib.request.url2pathname()`, ignore any query or fragment components
in the given URL.
@barneygale barneygale added the needs backport to 3.14 bugs and security fixes label Jul 20, 2025
@barneygale barneygale marked this pull request as ready for review July 20, 2025 15:21
@barneygale

Copy link
Copy Markdown
Contributor Author

@hugovk is this OK to backport into 3.14 once approved? It's somewhere between a bugfix and a feature enhancement I think.

(3.14 contains a bevy of related improvements to url2pathname() and pathname2url().)

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

Comment thread Lib/test/test_urllib.py
@hugovk

hugovk commented Jul 21, 2025

Copy link
Copy Markdown
Member

@hugovk is this OK to backport into 3.14 once approved? It's somewhere between a bugfix and a feature enhancement I think.

As a feature, no; as a bugfix, yes. So you can merge and backport as a bugfix, if done before tomorrow morning for RC1.

@barneygale barneygale enabled auto-merge (squash) July 21, 2025 17:09
@barneygale barneygale merged commit 80b2d60 into python:main Jul 21, 2025
41 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @barneygale for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 21, 2025
…nts (pythonGH-136875)

In `urllib.request.url2pathname()`, ignore any query or fragment components
in the given URL.
(cherry picked from commit 80b2d60)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
@bedevere-app

bedevere-app Bot commented Jul 21, 2025

Copy link
Copy Markdown

GH-136942 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jul 21, 2025
barneygale added a commit that referenced this pull request Jul 21, 2025
…ents (GH-136875) (#136942)

GH-136874: `url2pathname()`: discard query and fragment components (GH-136875)

In `urllib.request.url2pathname()`, ignore any query or fragment components
in the given URL.
(cherry picked from commit 80b2d60)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
…nts (python#136875)

In `urllib.request.url2pathname()`, ignore any query or fragment components
in the given URL.
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
…nts (python#136875)

In `urllib.request.url2pathname()`, ignore any query or fragment components
in the given URL.
kumaraditya303 pushed a commit to miss-islington/cpython that referenced this pull request Sep 9, 2025
…components (pythonGH-136875) (python#136942)

pythonGH-136874: `url2pathname()`: discard query and fragment components (pythonGH-136875)

In `urllib.request.url2pathname()`, ignore any query or fragment components
in the given URL.
(cherry picked from commit 80b2d60)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants