python / python/cpython

A shortcut for `urllib.parse.quote` to keep all reserved characters?

Open
#93,459 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

stdlib type-feature
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

Feature or enhancement
maybe safe='url' or safe='allreserved'? instead of manually repeating all reserved characters that are already in the func doc

Pitch
that urllib.parse.quote quoted paths, say contain '[' and ']', is invalid for opencv.VideoCapture, and also invalid for copying to chrome to open. so it seems incompatible with the browsers' behavior, unless manually set safe to '/[]'

other reserved many characters like ?= and etc. probably can have the same result.

already see urllib.parse.quote is for submitting web forms. but should have a shortcut safe parameter for urlencode that other apps know like browsers?

if it's cool, I would like to PR

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the urllib.parse.quote and urlencode entry points, then read the existing safe-parameter documentation and reserved-character list. Compare the proposed shortcut with the browser-style path cases mentioned, including '[' and ']' and characters such as '?' and '='; the work is done when its behavior and compatibility expectations are agreed and covered by tests and documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.