-
Notifications
You must be signed in to change notification settings - Fork 55
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
Hashes are not being produced for private packages when exporting a requirements file. #136
Comments
I am also experiencing this. The issue is related to python-poetry/poetry#1631 - what's happening under the hood, I think, is that your |
In fact there are no hashes corresponding to the private package at all in the lock file. So I guess the bug is related to the lock file, but not quite how you envisaged it.
It's been flagged as a bug so let's see what happens. |
Ah, that's interesting. I should have said "I would guess" this is related to python-poetry/poetry#1631. :) |
I see this same behavior when using artifactory, in case the actual private repository matters - I would imagine it shouldn't though, since the "simple" api is being used. |
Perhaps I am not understanding, but this option is already supported directly in poetry (at least on the new RC's. |
Hi, apologies for leaving it so long before replying, firstly. One thing drives out another, I'm sure you know how it is! The I guess we should leave the issue open, however, because ideally the lock file should contain the hash(es) for the private repository? |
I'm having a similar issue when using
Exported
Expected entry in
As you can see, this is also an instance of python-poetry/poetry#897 |
For anyone else still hitting this issue with internal repositories that only provide MD5 hashes, the workaround I used (from this comment) was:
This generates SHA256 hashes for packages which don't already have them. Note that this is strictly worse than using just poetry because it drops any platform-specific dependencies that apply to a platform other than what you're using to run |
python-poetry/poetry#4740 should resolve this once I get it ready for review. The code should be 100% working (please test the branch and make sure it generates hashes for your MD5-only legacy repos. I'm still working on full test coverage before it's ready for merge.). |
I grabbed the branch from the linked PR and still wasn't able to
|
Sorry if I was unclear -- poetry should be generating sha256 hashes for packages that don't have a sha256 hash pre-generated for them by the repo. It shouldn't ever pass through a md5 hash. It looks like you're still not getting a hash for |
Not sure this wanted transferring - isn't the conclusion of the above thread that
ie the export plugin will just export whatever's in the lock file, poetry proper ought to have made sure that there's a sha256 hash in that lock file |
Having said which it's also true that the exporter has
|
but that last bit duplicates python-poetry/poetry#20 |
Hi,
no hash is being created in the
requirements.txt
file when I runpoetry export -f requirements.txt
. This meanspip
fails when it reads the file. It's fine,pip
actually gives me the hash to insert into the file, however it would be great if Poetry did it in the first place.Also, what might be good is to have something like a
--no-hashes
argument for exporting, so that no hashes are added to the requirements file. My understanding is that ifpip
can't find any hashes at all, it won't complain about missing ones.The text was updated successfully, but these errors were encountered: