This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: urllib.parse: make coap:// known
Type: enhancement Stage:
Components: Library (Lib) Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: chrysn, demian.brecht, martin.panter, r.david.murray
Priority: normal Keywords:

Created on 2015-03-24 10:45 by chrysn, last changed 2022-04-11 14:58 by admin.

Messages (5)
msg239106 - (view) Author: chrysn (chrysn) * Date: 2015-03-24 10:45
The CoAP protocol (RFC 7252) registers the new URI schemes coap and coaps. They adhere to the generic RFC3986 rules, and use netloc and relative URIs.

Therefore, please add the 'coap' and 'coaps' schemes to the uses_relative and uses_netloc lists in urllib.parse.

I'm not sure about uses_params; the CoAP protocol in itself does not do anything special with the ';' character in URIs, so probably it should not be included there. (But then again, neither does RFC2616 mention ";" in the context of addresses, and it is included in uses_params).
msg239121 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-03-24 13:58
I would like to see these hard-coded white lists of URL schemes eliminated as much as possible. Here’s some related issues:

* Issue 16134: rtmp, rtmpe, rtmps, rtmpt
* Issue 18828: redis, also proposing to urljoin() arbitrary schemes
* Issue 15009: yelp
* Issue 22852: Proposing that urlunsplit() and urlunparse() restore empty netloc, query, and fragment components properly for arbitary schemes
* Issue 23636: scgi
msg239141 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2015-03-24 15:17
I too would like to see this issue dealt with generically.  I believe the last time we discussed it the barrier was backward compatibility and which RFCs we actually support :(.  Fixing it generically will require a well thought out and well researched proposal.
msg239142 - (view) Author: chrysn (chrysn) * Date: 2015-03-24 15:22
i wholeheartedly agree that a generic solution would be preferable, but as you pointed out, that needs to be well-researched. until there is a concrete plan for that, please don't let the ideal solution get in the way of a practical update of the uri scheme list.
msg239155 - (view) Author: Demian Brecht (demian.brecht) * (Python triager) Date: 2015-03-24 16:34
I'm also +1 to handling this generically and agree that a well thought out and researched proposal would be required.

I did mention in #18228 (http://bugs.python.org/issue18828#msg238363) that I think that a short term solution to this problem could be to simply add documentation around manually adding schemes as required to uses_relative.
History
Date User Action Args
2022-04-11 14:58:14adminsetgithub: 67947
2016-09-13 04:22:49martin.panterlinkissue18828 dependencies
2015-03-24 16:34:44demian.brechtsetnosy: + demian.brecht
messages: + msg239155
2015-03-24 15:22:04chrysnsetmessages: + msg239142
2015-03-24 15:17:59r.david.murraysetnosy: + r.david.murray
messages: + msg239141
2015-03-24 13:58:53martin.pantersetnosy: + martin.panter
messages: + msg239121
2015-03-24 10:45:14chrysncreate