-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with filename for wheel with epoch version #6466
Comments
That seems to be what the spec says should be done: https://peps.python.org/pep-0427/#escaping-and-unicode
(I think you are confusing hyphens and underscores in your report, I don't think hyphens should be introduced) |
Yeah, it's an underscore, that was a typo. Unfortunately, that does break installing with the latest pip. Is there any way to make that work? |
I dunno, I'm curious about whether PEP-427 is really the final word here. If it is then I guess you should report this to pip. However I could believe that there's more to be said about this and that poetry might not be right. Would be interesting to know what other tooling does when building a wheel with a version that contains an epoch, or to see any published examples on pypi of such a wheel... |
I've also submitted this to pip, hopefully we can figure out which implementation is correct. |
|
Then I expect an MR fixing this would be welcome I see you've linked above to some truly ancient code, the fix should now be over in poetry-core, something like this
|
Sounds like we should just do |
I'm now pretty sure that the version being passed to |
…#6476) When you already have a `Version` in hand, `normalize_version(version.text)` is a very roundabout way of calling `version.to_string()`: it re-parses the version text to give you the same `Version` you already had and then calls `to_string()` on that. https://github.com/python-poetry/poetry-core/blob/37cee90a5dd4c7ee2c5ee836216ba813242b3ade/src/poetry/core/utils/helpers.py#L27-L28 Then calling `escape_version()` on such a version is actually counter-productive, per #6466. Similar changes can and should be made over in poetry-core, but it should be safe to merge this before that is done.
…#6476) When you already have a `Version` in hand, `normalize_version(version.text)` is a very roundabout way of calling `version.to_string()`: it re-parses the version text to give you the same `Version` you already had and then calls `to_string()` on that. https://github.com/python-poetry/poetry-core/blob/37cee90a5dd4c7ee2c5ee836216ba813242b3ade/src/poetry/core/utils/helpers.py#L27-L28 Then calling `escape_version()` on such a version is actually counter-productive, per #6466. Similar changes can and should be made over in poetry-core, but it should be safe to merge this before that is done. (cherry picked from commit a14a93d)
…#6476) When you already have a `Version` in hand, `normalize_version(version.text)` is a very roundabout way of calling `version.to_string()`: it re-parses the version text to give you the same `Version` you already had and then calls `to_string()` on that. https://github.com/python-poetry/poetry-core/blob/37cee90a5dd4c7ee2c5ee836216ba813242b3ade/src/poetry/core/utils/helpers.py#L27-L28 Then calling `escape_version()` on such a version is actually counter-productive, per #6466. Similar changes can and should be made over in poetry-core, but it should be safe to merge this before that is done. (cherry picked from commit a14a93d)
fixed in python-poetry/poetry-core#469, this can be closed |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).Issue
When using a version number such as "1!1.0.0", the wheels generated by poetry have a filename with "1_1.0.0". This causes pip install to crash with the following error:
"ERROR: Could not build wheels for *, which is required to install pyproject.toml-based projects".
I believe that the following regular expression is at fault as it replaces the
!
with_
:poetry/poetry/masonry/builders/wheel.py
Lines 197 to 203 in 6fe7f54
The text was updated successfully, but these errors were encountered: