Skip to content
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 CDK Python: Cant run pipenv update #19844

Closed
ofiriluz opened this issue Apr 10, 2022 · 8 comments
Closed

AWS CDK Python: Cant run pipenv update #19844

ofiriluz opened this issue Apr 10, 2022 · 8 comments
Labels
bug This issue is a bug. effort/small Small work item – less than a day of effort p1

Comments

@ofiriluz
Copy link

Describe the bug

Hi,

For some reason, it seems that something in one of aws cdk deps caused an issue that prevents locking on pipenv

Currently i have the following Pipfile as a test:

[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[packages]
"aws-cdk.core" = "*"

[requires]
python_version = "3.8"

When running "pipenv update --dev" the locking fails on "exceptiongroup" not having any released version, as such:

Locking [dev-packages] dependencies…
Locking [packages] dependencies…
✘ Locking Failed!
[pipenv.exceptions.ResolutionFailure]:   File "/Users/Ofir.Iluz/Desktop/workspace/tests/.venv/lib/python3.8/site-packages/pipenv/resolver.py", line 61, in resolve
[pipenv.exceptions.ResolutionFailure]:       return resolve_deps(
[pipenv.exceptions.ResolutionFailure]:   File "/Users/Ofir.Iluz/Desktop/workspace/tests/.venv/lib/python3.8/site-packages/pipenv/utils.py", line 718, in resolve_deps
[pipenv.exceptions.ResolutionFailure]:       resolved_tree, hashes, markers_lookup, resolver = actually_resolve_deps(
[pipenv.exceptions.ResolutionFailure]:   File "/Users/Ofir.Iluz/Desktop/workspace/tests/.venv/lib/python3.8/site-packages/pipenv/utils.py", line 480, in actually_resolve_deps
[pipenv.exceptions.ResolutionFailure]:       resolved_tree = resolver.resolve()
[pipenv.exceptions.ResolutionFailure]:   File "/Users/Ofir.Iluz/Desktop/workspace/tests/.venv/lib/python3.8/site-packages/pipenv/utils.py", line 395, in resolve
[pipenv.exceptions.ResolutionFailure]:       raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]:       pipenv.exceptions.ResolutionFailure: ERROR: ERROR: Could not find a version that matches exceptiongroup
[pipenv.exceptions.ResolutionFailure]:       Skipped pre-versions: 0.0.0a0, 0.0.0a0, 1.0.0rc1, 1.0.0rc1, 1.0.0rc2, 1.0.0rc2
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
 Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: ERROR: Could not find a version that matches exceptiongroup
Skipped pre-versions: 0.0.0a0, 0.0.0a0, 1.0.0rc1, 1.0.0rc1, 1.0.0rc2, 1.0.0rc2
There are incompatible versions in the resolved dependencies.
[pipenv.exceptions.ResolutionFailure]:       return resolve_deps(
[pipenv.exceptions.ResolutionFailure]:   File "/Users/Ofir.Iluz/Desktop/workspace/tests/.venv/lib/python3.8/site-packages/pipenv/utils.py", line 718, in resolve_deps
[pipenv.exceptions.ResolutionFailure]:       resolved_tree, hashes, markers_lookup, resolver = actually_resolve_deps(
[pipenv.exceptions.ResolutionFailure]:   File "/Users/Ofir.Iluz/Desktop/workspace/tests/.venv/lib/python3.8/site-packages/pipenv/utils.py", line 480, in actually_resolve_deps
[pipenv.exceptions.ResolutionFailure]:       resolved_tree = resolver.resolve()
[pipenv.exceptions.ResolutionFailure]:   File "/Users/Ofir.Iluz/Desktop/workspace/tests/.venv/lib/python3.8/site-packages/pipenv/utils.py", line 395, in resolve
[pipenv.exceptions.ResolutionFailure]:       raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]:       pipenv.exceptions.ResolutionFailure: ERROR: ERROR: Could not find a version that matches exceptiongroup
[pipenv.exceptions.ResolutionFailure]:       Skipped pre-versions: 0.0.0a0, 0.0.0a0, 1.0.0rc1, 1.0.0rc1, 1.0.0rc2, 1.0.0rc2
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
 Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: ERROR: Could not find a version that matches exceptiongroup
Skipped pre-versions: 0.0.0a0, 0.0.0a0, 1.0.0rc1, 1.0.0rc1, 1.0.0rc2, 1.0.0rc2
There are incompatible versions in the resolved dependencies.

This has only started happening on the past day (9th of april)
Note that i have tried a few different versions of CDK, so i am not really sure from which sub dependency this happens

Any help would be appreciated

Thanks

Expected Behavior

Pipenv update manages to lock versions on CDK consumptions in python

Current Behavior

Pipenv fails to lock versions on CDK consumptions in python

Reproduction Steps

Use the following pipenv file:

[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[packages]
"aws-cdk.core" = "*"

[requires]
python_version = "3.8"

Run:

pipenv update --dev

Possible Solution

Currently adding "exceptiongroup" directly on the pipfile and then running:

pipenv update --dev --pre exceptiongroup

works, since it locks the dev version of the package

Additional Information/Context

No response

CDK CLI Version

2.12.0

Framework Version

No response

Node.js Version

16.8.0

OS

Mac

Language

Python

Language Version

3.8

Other information

No response

@ofiriluz ofiriluz added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 10, 2022
@github-actions github-actions bot added the @aws-cdk/aws-appsync Related to AWS AppSync label Apr 10, 2022
@ofiriluz
Copy link
Author

any update on that?
cattrs seems to have fixed the issue, but it needs an upgrade here as well afaik

@ryparker ryparker added p1 effort/small Small work item – less than a day of effort labels Apr 26, 2022
@jonathanposadaRL
Copy link

Running into the same issue. @ofiriluz what was the solution for you? Did you lock a specific version of cattrs?

@peterwoodworth peterwoodworth removed the needs-triage This issue or PR still needs to be triaged. label Apr 27, 2022
@mpekalski
Copy link

Same problem here. Locking version of excetpiongroup in Pipfile

exceptiongroup ="==1.0.0rc4"

fixed the issue.

@smeikalr
Copy link

@mpekalski Thank you, the fix worked for me.

However, it has the drawback of adding an explicit dependency and it invalidates the Pipfile.Lock. Therefore, @otaviomacedo do you plan to fix the issue?

@smeikalr
Copy link

Note: Updating to pipenv, version 2022.6.7 fixed the issue.

@ntachukwu
Copy link
Contributor

I can't recreate this issue. Can this be verified if it has been fixed?

@otaviomacedo otaviomacedo removed their assignment Jun 27, 2022
@MrArnoldPalmer MrArnoldPalmer removed the @aws-cdk/aws-appsync Related to AWS AppSync label Oct 31, 2022
@Leo10Gama
Copy link
Member

I'm also unable to recreate the issue, so it's likely been fixed with the updated pipenv version. Closing this, but if the problem persists, please feel free to open another issue.

Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. effort/small Small work item – less than a day of effort p1
Projects
None yet
Development

No branches or pull requests

10 participants