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
Private repository dependency isn't exported with sha256 hash #1631
Note xoipy, which has md5s specified. The repository itself provides the SHA256 sums, though I have not yet found the code that actually pulls those down, so I can't confirm that poetry is receiving them. If/when I do, I will update this report.
Reacted by adawalli, Aviram Hassan, pauleikis, robpob10, goistjt, Alan Parker Lue, Ani Hatzis, Tom Howard, Chad, Ross Bayer and 6 more
Note xoipy, which has md5s specified. The repository itself provides the SHA256 sums, though I have not yet found the code that actually pulls those down, so I can't confirm that poetry is receiving them. If/when I do, I will update this report.
Did you find any work around @petergaultney ? This is burning my team badly as well....
I've been blocked by this problem too, and have had a look into it.
In my case, the private repo is hosted on jfrog artifactory, and the problem is ultimately caused by an artifactory bug. To briefly describe this what happens:
To get PyPi hashes, poetry uses the hashes built into the data outputted by the PyPi API.
eg, if you run curl https://pypi.org/simple/requests/, you'll see data that looks like requests-2.9.2-py2.py3-none-any.whl#sha256=22a8c72dfc7fc18db1aca6784e97a638e9d09abe2cd387be473f88bd6dcba22f - it has the sha256 available in the URL.
Querying the api of PyPi hosted on jfrog artifactory however, gives you data that look like myproject-4.0.0-py3-none-any.whl#md5=01fd95237bsdhjkshe2cf869 - the inbuilt hash is in the md5 format (this is the jfrog artifactory bug), so that's what poetry takes.
pipenv tackles this problem by streaming the file to compute the SHA256 (see _get_file_hash() and open_local_or_remote_file()) whenever the SHA256 is unavailable.
If you want a workaround to using pip to install the wheels, just download the wheels using wget etc instead of pip, and do the checksum manually.
Next actions:
If the poetry devs think that pipenv's compute-it-yourself hash solution is acceptable, I'd like to submit a pull request doing that for cases where the SHA256 is unavailable in the PyPi API output. Please let me know if you think this is a worthwhile approach.
I recommend commenting on this https://www.jfrog.com/jira/browse/RTFACT-18495 ARTIFACTORY issue and voting - JFROG hasn't even responded, so it seems like it needs a bit more attention.
I think it would be a really nice feature if poetry generated hashes when they weren't present. @robpob10 have you drafted anything up? I'd love to help move this forward
in my case I am using gemfury to store packages.
I am getting the md5 hash in the lock file, but the "poetry export" command refusing to export this type of hash.
Any chance to add this ability?
in my case I am using gemfury to store packages.
I am getting the md5 hash in the lock file, but the "poetry export" command refusing to export this type of hash.
Any chance to add this ability?
Similar issue here. Appears to be related to non pypi repos. Not sure exporting md5 would be useful since pip would refuse to install it with a md5 hash.
Activity
adawalli commentedon Dec 10, 2019
Did you find any work around @petergaultney ? This is burning my team badly as well....
robpob10 commentedon Feb 10, 2020
I've been blocked by this problem too, and have had a look into it.
In my case, the private repo is hosted on jfrog artifactory, and the problem is ultimately caused by an artifactory bug. To briefly describe this what happens:
curl https://pypi.org/simple/requests/, you'll see data that looks likerequests-2.9.2-py2.py3-none-any.whl#sha256=22a8c72dfc7fc18db1aca6784e97a638e9d09abe2cd387be473f88bd6dcba22f- it has thesha256available in the URL.myproject-4.0.0-py3-none-any.whl#md5=01fd95237bsdhjkshe2cf869- the inbuilt hash is in themd5format (this is the jfrog artifactory bug), so that's what poetry takes.Solutions:
pipenvtackles this problem by streaming the file to compute the SHA256 (see_get_file_hash()andopen_local_or_remote_file()) whenever the SHA256 is unavailable.pipto install the wheels, just download the wheels usingwgetetc instead ofpip, and do the checksum manually.Next actions:
poetrydevs think thatpipenv's compute-it-yourself hash solution is acceptable, I'd like to submit a pull request doing that for cases where the SHA256 is unavailable in the PyPi API output. Please let me know if you think this is a worthwhile approach.adawalli commentedon Feb 10, 2020
I recommend commenting on this https://www.jfrog.com/jira/browse/RTFACT-18495 ARTIFACTORY issue and voting - JFROG hasn't even responded, so it seems like it needs a bit more attention.
thoward27 commentedon May 1, 2020
I think it would be a really nice feature if poetry generated hashes when they weren't present. @robpob10 have you drafted anything up? I'd love to help move this forward
cpvandehey commentedon May 1, 2020
I'd also be interested in helping this move forward as it seems to be a blocker in our suggested workflow with poetry.
repository/legacy: calculate sha256 if unavailable
repository/legacy: calculate sha256 if unavailable
timorkal commentedon Feb 26, 2021
in my case I am using gemfury to store packages.
I am getting the md5 hash in the lock file, but the "poetry export" command refusing to export this type of hash.
Any chance to add this ability?
jmahlik commentedon Mar 3, 2021
Similar issue here. Appears to be related to non pypi repos. Not sure exporting md5 would be useful since pip would refuse to install it with a md5 hash.
jmahlik commentedon Mar 3, 2021
Is seems this could be a good use case for a plugin if it doesn't make its way in to core?
#3733
repository/legacy: calculate sha256 if unavailable
repository/legacy: calculate sha256 if unavailable
repository/legacy: calculate sha256 if unavailable
matejsp commentedon Jun 15, 2022
Just for reference same issue with Nexus: https://issues.sonatype.org/browse/NEXUS-24127
github-actions commentedon Mar 1, 2024
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.