Good day.

Yesterday, I have added support for a new syndication format, Gemini
feed.

Yet, it appears that module urljoin fails at its task, even though
module urlsplit correctly handles Gemini.

Python 3.13.3

>>> 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')
'../one-level-up'
>>> urljoin('gemini://woodpeckersnest.space/~schapps/journal/2025-04-20-slixfeed-gemini-and-twtxt.gmi',
>>>  'same-level')
'same-level'
>>> 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')
SplitResult(scheme='gemini', netloc='woodpeckersnest.space', 
path='/~schapps/journal/2025-04-20-slixfeed-gemini-and-twtxt.gmi', query='', 
fragment='')
>>>                                                                             
>>>                                                                  
https://git.xmpp-it.net/sch/Slixfeed/src/branch/master/slixfeed/parser/gmi.py

Is this a problem with the module urljoin?

To whom should reports about such concern be conveyed?

Please advise.

Kind regards,
Schimon
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to