You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Follow PEP 503's normalisation for dist-info folder name and wheel name #440
Basically, wheel-generated wheels do not canonicalise name of the dist-info folder to remove . from the name of the folder. This means that packages generated with wheel can have package.name-1.0.0.dist-info instead of package_name-1.0.0.dist-info.
The discussion on discourse was - at least as I understood it - about what to do for distribution names in wheel filenames. The agreement is to move towards similar normalisation rules everywhere, so not just package_name-1.0.0.dist-info but also package_name-1.0.0-py3-none-any.whl.
Sure, but there are potential issues which may come up when the same project is packaged by a newer version of wheel and it produces a different file name. I would just like to acknowledge this and start to think about what we can (or cannot) do to "soften the blow".
I agree with @agronholm - the discussion over on Discourse hasn't yet really addressed transition questions like this (as far as I can recall). I'm not sure what is needed here (maybe it's just something simple like "all tools must be prepared to read non-normalised filenames, which may come from older versions of tools, but must always write normalised forms") but I think we should get consensus so that (a) all tools are behaving the same, and (b) the agreed behaviour gets documented somewhere.
changed the title [-]Follow PEP 503's normalisation for dist-info folder name[/-][+]Follow PEP 503's normalisation for dist-info folder name and wheel name[/+]on Jan 11, 2022
In the spec, the name normalisation based on PEP 503 is a 'should' and we've said that "tools consuming wheels must be prepared to accept . (FULL STOP) and uppercase letters, however, as these were allowed by an earlier version of this specification."
Admittedly there wasn't much discussion about this, but it seems fairly self evident: we've got a rule for how to consistently generate new wheel filenames, but we can't change all the ones already made, so you can't assume that all wheels will have a normalised filename.
Activity
agronholm commentedon Jan 11, 2022
This has been discussed at length over at #411.
agronholm commentedon Jan 11, 2022
I have some local code to address this, but I need to ensure that it can also work with wheels generated by older versions of
wheel.takluyver commentedon Jan 11, 2022
The discussion on discourse was - at least as I understood it - about what to do for distribution names in wheel filenames. The agreement is to move towards similar normalisation rules everywhere, so not just
package_name-1.0.0.dist-infobut alsopackage_name-1.0.0-py3-none-any.whl.agronholm commentedon Jan 11, 2022
Sure, but there are potential issues which may come up when the same project is packaged by a newer version of
wheeland it produces a different file name. I would just like to acknowledge this and start to think about what we can (or cannot) do to "soften the blow".pfmoore commentedon Jan 11, 2022
I agree with @agronholm - the discussion over on Discourse hasn't yet really addressed transition questions like this (as far as I can recall). I'm not sure what is needed here (maybe it's just something simple like "all tools must be prepared to read non-normalised filenames, which may come from older versions of tools, but must always write normalised forms") but I think we should get consensus so that (a) all tools are behaving the same, and (b) the agreed behaviour gets documented somewhere.
[-]Follow PEP 503's normalisation for dist-info folder name[/-][+]Follow PEP 503's normalisation for dist-info folder name and wheel name[/+]takluyver commentedon Jan 12, 2022
In the spec, the name normalisation based on PEP 503 is a 'should' and we've said that "tools consuming wheels must be prepared to accept
.(FULL STOP) and uppercase letters, however, as these were allowed by an earlier version of this specification."Admittedly there wasn't much discussion about this, but it seems fairly self evident: we've got a rule for how to consistently generate new wheel filenames, but we can't change all the ones already made, so you can't assume that all wheels will have a normalised filename.
agronholm commentedon May 22, 2024
I'm closing this as I'm now working on a proper API in pypa/packaging#805.