Sujet : Re: Module urljoin does not appear to work with scheme Gemini
De : ht (at) *nospam* inf.ed.ac.uk (Henry S. Thompson)
Groupes : comp.lang.pythonDate : 23. Apr 2025, 15:13:51
Autres entêtes
Message-ID : <mailman.29.1745419807.3008.python-list@python.org>
References : 1 2 3 4
User-Agent : Gnus/5.101 (Gnus v5.10.10) XEmacs/21.5-b35 (linux)
Schimon Jehudah writes:
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. Given some other precedents, adding a boolean argument
called either 'strict' or 'lax' would be my preference.
It would seem that for backwards-compatibility, even though it feels
backwards from the in-principle correct approach, it should be either
'strict=True' or 'lax=False'.
I note that there are 440 schemes registered [1] as of today, with the
following statuses:
275 Provisional
99 Permanent
18 Historical
48 [not given]
The (python3.11) implementation of "urljoin" depends on a list of 18
'uses_relative' scheme names: it would be silly to expect anyone to
actually check even just the other 81 Permanent schemes to see if they
should be added to this list, much less the Provisional or Historical
ones, and even sillier to expect that the list ought to be regularly
synchronised with the IANA registry.
ht
[1]
https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml-- Henry S. Thompson, School of Informatics, University of Edinburgh 10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND e-mail: ht@inf.ed.ac.uk URL: https://www.ltg.ed.ac.uk/~ht/ [mail from me _always_ has a .sig like this -- mail without it is forged spam]