python / python/cpython

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

未關閉
#93,459 7 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

stdlib type-feature
主要語言
Python
星號
77.2k
分支
36k
PR 合併指標
PR 指標待擷取

描述

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

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 urllib.parse.quote 和 urlencode 入口開始,接著閱讀現有的 safe 參數文件和保留字元清單。將提議的捷徑與提到的瀏覽器風格路徑案例進行比較,包括 '[' 和 ']' 以及 '?' 和 '=' 等字元;當其行為和相容性預期達成共識,並由測試和文件涵蓋時,這項工作就完成了。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
web-dev
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
32/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。