'../one-level-up'from urllib.parse import urljoin
urljoin('gopher://gopher.floodgap.com:70/1/overbite', '../one-level-up') 'gopher://gopher.floodgap.com:70/one-level-up'
urljoin('gopher://gopher.floodgap.com:70/1/overbite', 'same-level') 'gopher://gopher.floodgap.com:70/1/same-level'
urljoin('gemini://woodpeckersnest.space/~schapps/journal/2025-04-20-slixfeed-gemini-and-twtxt.gmi', '../one-level-up')
'same-level'urljoin('gemini://woodpeckersnest.space/~schapps/journal/2025-04-20-slixfeed-gemini-and-twtxt.gmi', 'same-level')
SplitResult(scheme='gemini', netloc='woodpeckersnest.space', path='/~schapps/journal/2025-04-20-slixfeed-gemini-and-twtxt.gmi', query='', fragment='')from urllib.parse import urlsplit
urlsplit('gopher://gopher.floodgap.com:70/1/overbite') SplitResult(scheme='gopher', netloc='gopher.floodgap.com:70', path='/1/overbite', query='', fragment='')
urlsplit('gemini://woodpeckersnest.space/~schapps/journal/2025-04-20-slixfeed-gemini-and-twtxt.gmi')
https://git.xmpp-it.net/sch/Slixfeed/src/branch/master/slixfeed/parser/gmi.py
Yesterday, I have added support for a new syndication format, Gemini
feed.
Schimon Jehudah via Python-list writes:--- Synchronet 3.20c-Linux NewsLink 1.2
Yesterday, I have added support for a new syndication format, Gemini
feed.
I note that 'gemini' is not (yet?) a registered URI scheme:
https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml
ht
Is there an "ignore" option for "urljoin" to allow schemes that are not included in the registry of the interpreter of the Python computer
language?
Some approach to support future-proofing in general would seem to be in order.An alternative would be to refactor urllib.parse to use strategy objects
Given some other precedents, adding a boolean argument called either 'strict' or 'lax' would be my preference.
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 1,064 |
Nodes: | 10 (0 / 10) |
Uptime: | 152:38:36 |
Calls: | 13,691 |
Calls today: | 1 |
Files: | 186,936 |
D/L today: |
2,520 files (731M bytes) |
Messages: | 2,411,051 |