Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 21, 2025

Conversation

barneygale
Copy link
Contributor

@barneygale barneygale commented Jul 20, 2025

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
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().)

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM.

@hugovk
Copy link
Member

hugovk commented Jul 21, 2025

@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

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
Copy link

bedevere-app bot commented Jul 21, 2025

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>
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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy