[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: URL mangling in https://pypi.debian.net/



Hi Alexandre!

On Tue, Dec 17, 2024 at 11:57:18PM +0100, Alexandre Detiste wrote:
> Hi,
>
> I've noticed a recent pattern with archives published on PyPi :
> the "-" we expect in the regexp specified in d/watch is now an underscore.
>
> So the tracker got the false information that everything is up-to-date
>
> With some horribly wretched code I can find some projects with updates pending.
>   https://paste.debian.net/1340327/
>
> One field got duplicated in the output but I'm not running
> the code again immediately because it can be considered abuse
> by who run pypi.debian.net.
>
> Ideas ?

I think pypi.debian.net does not mangle the file names in any way, it just
takes them from upstream PyPI verbatim.

And the change from - to _ is caused by more build tools adopting this
specification [1], which says:

“In distribution names, any run of -_. characters (HYPHEN-MINUS, LOW LINE and
FULL STOP) should be replaced with _ (LOW LINE), and uppercase characters
should be replaced with corresponding lowercase ones.”

This link is for binary distributions, but there is a separate specification
for source distributions [2] which says that rules are the same.

[1]: https://packaging.python.org/en/latest/specifications/binary-distribution-format/#escaping-and-unicode
[2]: https://packaging.python.org/en/latest/specifications/source-distribution-format/#source-distribution-file-name

--
Dmitry Shachnev

Attachment: signature.asc
Description: PGP signature


Reply to: