Fix the "safe_name" attribute of PackageFile for backwards compatibility#745
Fix the "safe_name" attribute of PackageFile for backwards compatibility#745bhrutledge merged 2 commits intopypa:masterfrom
Conversation
e5641cf to
57a19f3
Compare
|
CC: @bhrutledge @jaraco |
0027889 to
92c78cb
Compare
Commit 0bd26af introduced a regression that was causing some namespace packages with dots in them fail to upload to PyPI. The reason is because `packaging.utils.canonicalize_name()` is not equivalent to `pkg_resources.safe_name()` as the former transforms the "." into "-", while the later only does it for non-alphanumeric/. characters. Closes: pypa#743
bhrutledge
left a comment
There was a problem hiding this comment.
Thanks for the fix, test, and changelog! One small suggestion for the docstring, and I'd still like to get sign-off from the Twine maintainer that made the original change.
Co-authored-by: Brian Rutledge <brian@bhrutledge.com>
jaraco
left a comment
There was a problem hiding this comment.
Looks good to me. This was my original instinct before converting to canonicalize name. Does this change remove the last dependency on packaging?
It seems so. I would recommend doing the removal in a different change to keep things clean but I can push some commit to remove |
Thanks @pablogsal. I'm going to merge this, then follow up with the removal of |
Commit 0bd26af introduced a regression
that was causing some namespace packages with dots in them fail to
upload to PyPI. The reason is because
packaging.utils.canonicalize_name()is not equivalent topkg_resources.safe_name()as the former transforms the "." into "-",while the later only does it for non-alphanumeric/. characters.
Closes: #743