Skip to content

Conflicting dependencies in FastAPI example after #527 #538

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

Closed
quiver opened this issue Nov 17, 2024 · 2 comments · Fixed by #539
Closed

Conflicting dependencies in FastAPI example after #527 #538

quiver opened this issue Nov 17, 2024 · 2 comments · Fixed by #539

Comments

@quiver
Copy link

quiver commented Nov 17, 2024

The FastAPI example at https://github.com/awslabs/aws-lambda-web-adapter/blob/main/examples/fastapi/ is experiencing conflicting dependencies after the update to Starlette 0.40 in PR #527.

The issue seems to stem from the version bump of Starlette from 0.36.3 to 0.40. Other similar examples, such as aws-lambda-web-adapter/tree/main/examples/fastapi-response-streaming, are not affected as they retain the older Starlette version.

This repository just provides examples and 0.36.3 is the latest release in the 0.36.x line. Would it be possible to revert the change made in #527 to avoid breaking changes in the examples? This would ensure compatibility with the current example codebase.

how to reproduce

$ cde /path/to/aws-lambda-web-adapter/examples/fastapi/app
$ docker build .

...
 => ERROR [stage-0 5/6] RUN python -m pip install -r requirements.txt
...
6.405 INFO: pip is looking at multiple versions of fastapi to determine which version is compatible with other requirements. This could take a while.
6.410 ERROR: Cannot install -r requirements.txt (line 5) and starlette==0.40.0 because these package versions have conflicting dependencies.
6.413
6.413 The conflict is caused by:
6.413     The user requested starlette==0.40.0
6.413     fastapi 0.109.2 depends on starlette<0.37.0 and >=0.36.3
6.413
6.413 To fix this you could try to:
6.413 1. loosen the range of package versions you've specified
6.413 2. remove package versions to allow pip to attempt to solve the dependency conflict
6.413
6.709
6.709 [notice] A new release of pip is available: 24.2 -> 24.3.1
6.709 [notice] To update, run: pip install --upgrade pip
6.710 ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
...

@bnusunny
Copy link
Contributor

Thanks for reporting this issue. I will fix the examples soon.

@quiver
Copy link
Author

quiver commented Nov 17, 2024

Pending PR that will cause the same conflict.

#533

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

Successfully merging a pull request may close this issue.

2 participants