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

Dependency conflicts with typing_extensions #15

Open
leandrodamascena opened this issue Jan 3, 2024 · 0 comments
Open

Dependency conflicts with typing_extensions #15

leandrodamascena opened this issue Jan 3, 2024 · 0 comments

Comments

@leandrodamascena
Copy link

Hello, Momento team! I hope things are going well there!

I'm trying to use this library with Powertools for AWS Lambda (Python) to create some tests/examples. I see that you are pinning the typing-extensions library to version 4.5.0 and this creates a dependency resolution conflict because Powertools requires typing-extensions<5.0.0 and >=4.6.2. I'm wondering if there is any special reason to pin this library or if you could update this project to allow typing-extensions >= 4.5.0.

I cloned this project and updated typing_extensions to allow versions greater than 4.5.0 and it worked perfectly.

ERROR

❯ pip install momento-redis==0.1.2 aws-lambda-powertools==2.30.0
Collecting momento-redis==0.1.2
  Using cached momento_redis-0.1.2-py3-none-any.whl (12 kB)
Collecting aws-lambda-powertools==2.30.0
  Using cached aws_lambda_powertools-2.30.0-py3-none-any.whl (707 kB)
Requirement already satisfied: momento==1.7.1 in ./.venv/lib/python3.9/site-packages (from momento-redis==0.1.2) (1.7.1)
Requirement already satisfied: typing-extensions==4.5.0 in ./.venv/lib/python3.9/site-packages (from momento-redis==0.1.2) (4.5.0)
Requirement already satisfied: redis==4.6.0 in ./.venv/lib/python3.9/site-packages (from momento-redis==0.1.2) (4.6.0)
INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of momento-redis to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install aws-lambda-powertools==2.30.0 and momento-redis==0.1.2 because these package versions have conflicting dependencies.

The conflict is caused by:
    momento-redis 0.1.2 depends on typing-extensions==4.5.0
    aws-lambda-powertools 2.30.0 depends on typing-extensions<5.0.0 and >=4.6.2

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

Project Update

❯ cat pyproject.toml|grep typing
typing-extensions = "^4.5.0"
❯ poetry show |grep typing
mypy               0.971    Optional static typing for Python
typing-extensions  4.7.1    Backported and Experimental Type Hints for Pyth...
❯ make test               
================================================================================================================================================== test session starts ==================================================================================================================================================
platform linux -- Python 3.11.3, pytest-7.4.0, pluggy-1.2.0
rootdir: /tmp/momentoaaa/momento-python-redis-client
configfile: pyproject.toml
plugins: asyncio-0.19.0
asyncio: mode=Mode.STRICT
collected 62 items                                                                                                                                                                                                                                                                                                      

tests/test_clients.py ..............................................................                                                                                                                                                                                                                              [100%]

============================================================================================================================================= 62 passed in 65.70s (0:01:05) =============================================================================================================================================

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant