Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #197424 > unrolled thread

Module urljoin does not appear to work with scheme Gemini

Started bySchimon Jehudah <sch@fedora.email>
First post2025-04-21 08:38 +0300
Last post2025-04-21 08:38 +0300
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Module urljoin does not appear to work with scheme Gemini Schimon Jehudah <sch@fedora.email> - 2025-04-21 08:38 +0300

#197424 — Module urljoin does not appear to work with scheme Gemini

FromSchimon Jehudah <sch@fedora.email>
Date2025-04-21 08:38 +0300
SubjectModule urljoin does not appear to work with scheme Gemini
Message-ID<mailman.26.1745214249.3008.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web