Skip to content

Conflicting dependencies in FastAPI example after #527 #538

@quiver

Description

@quiver

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
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions