-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
(aws_lambda_python): Poetry exported requirements not readable by pip #14201
Comments
@adamelmore can you please take a look? |
@l0b0 it seems like this is the culprit:
It's a best practice to pin versions in order to avoid unexpected updates. |
setuptools isn't included in the export from Poetry, because it's excluded from poetry.lock and the Poetry section of pyproject.toml. It looks like pip installs it anyway. So it looks like the way to fix this would be for CDK to either add some version of setuptools with hashes to the requirements.txt (risky) or to force |
Hi, any update on this issue? We've just encountered this too |
@l0b0 would you be interested to contribute a fix? |
Just to give some light into the matter, this problem is not technically an issue with the CDK but with pip. The issue was reported, solved and reverted, so we are still experiencing this issue: pypa/pip#9243 and pypa/pip#9644 My workaround was to remove the poetry.lock file and manually export to a requirements.txt file using The only thing that could be done while pip fixes its problem, is to have the possibility of telling to the CDK that during the export we want to include the flag That could be a workaround to solve this bug as well: #19232 |
…2351) Export poetry dependencies without hashes to prevent bundling failures when a dependency provides a hash. Without this flag, users relying on the Poetry python dependency manager need to manually export their own `requirements.txt` file, as described in #14201 Fixes #19232 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…s#22351) Export poetry dependencies without hashes to prevent bundling failures when a dependency provides a hash. Without this flag, users relying on the Poetry python dependency manager need to manually export their own `requirements.txt` file, as described in aws#14201 Fixes aws#19232 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…s#22351) Export poetry dependencies without hashes to prevent bundling failures when a dependency provides a hash. Without this flag, users relying on the Poetry python dependency manager need to manually export their own `requirements.txt` file, as described in aws#14201 Fixes aws#19232 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Fixed by #22351 |
|
Pip refuses to install the requirements generated by
poetry export
.Reproduction Steps
poetry init && poetry add jsonschema="*" pynamodb="*"
)cdk synth
What did you expect to happen?
The build should install the packages mentioned in poetry.lock.
What actually happened?
Environment
Other
Looks like it's this Poetry issue, which means one of these workarounds have to be used.
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: