Jason R. Coombs

Results 1062 comments of Jason R. Coombs

In #4302, after releasing v69.3, users are surprised by two behaviors: - Trailing zeros are stripped. - The filename of the sdist doesn't match other names inside the sdist. The...

> I'm not aware of anything in any spec that suggests that stripping trailing zero components is necessary [This section](https://packaging.python.org/en/latest/specifications/source-distribution-format/#source-distribution-file-name) does say > `{version}` is the canonicalized form of the...

What that does imply, however, is that for a given version, it will not be possible to deterministically infer what the filename will be for that version. If the indicated...

> Where the rules are: https://peps.python.org/pep-0440/#normalization. We probably need to introduce a function into `packaging` that handles PEP 440 normalization (retaining trailing zeros) in addition the the existing canonicalization function....

``` >>> utils.canonicalize_version('1.0-2', strip_trailing_zero=False) '1.0.post2' ```

IMO, a "canonicalize" function should produce a truly canonical, unambiguous version, as `canonicalize_version` does by default, but unfortunately, that's not how wheel does it and thus it's surprising for users....

> There seems to be a chance the potential fix requires some coordination between [_distutils_system_mod](https://sources.debian.org/src/python3.10/3.10.4-3/Lib/_distutils_system_mod.py/) and the usage > [`virtualenv` makes of `distutils`](https://github.com/pypa/virtualenv/blob/2f5453641b1cc7482c27fb26c6cc94ad70ec32f5/src/virtualenv/discovery/py_info.py#L140). Maybe also `pypa/distutils`. Yes, I think you're...

I used this dockerfile: ```Dockerfile from ubuntu:22.04 RUN apt update RUN apt install -y python3 python3-pip python3-virtualenv tree RUN pip install -U setuptools RUN virtualenv venv CMD tree -L 3...

As I review this, I believe there's nothing more for Setuptools to do here, so I'm closing the ticket. Happy to re-open if that's not the case.

Can you give an example of how the existing behavior has caused issues? It may be worthwhile to create a test that captures the expected behavior, so that someone wishing...