-
First Check
Commit to Help
Example Codefrom fastapi.testclient import TestClient
TestClient(app, headers={...}) DescriptionFastAPI re-exports starlette starlette has recently fixed the starlette has made a release Thus, as a dev, I can't use the latest "features" or more like reasonable expectations for the TestClient. A newcomer would read the docs / source code and would expect TestClient to accept headers kwarg and get confused why that's rejected. Thus, the question: is there a reason to pin a specific version of starlette? Operating SystemOther Operating System DetailsAn issue with any OS. FastAPI Version0.88.0 Python Version3.10, etc. Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
If Starlette released a change that FastAPI did not support and you did not pin the version every install would break and cause everyone to have to pin starlette which is not desirable. Generally in library(which fastapi is) code you should pin your dependencies, or use a lock file to ensure that the library is getting a version of its dependencies that it is known to support. For a library having known working code for a specific version is more important than features. |
Beta Was this translation helpful? Give feedback.
-
I guess as long as both FastAPI and Starlette are in the 0.x.x series, we just have to live with that. P.S. I kinda wish that FastAPI at least would graduate, because SemVer has a gotcha for 0.x.x that most devs are not aware of. At least I was not and my peers were not. |
Beta Was this translation helpful? Give feedback.
-
Conceptually, yes. |
Beta Was this translation helpful? Give feedback.
-
Just ran into this.
Looks like the options are:
|
Beta Was this translation helpful? Give feedback.
Conceptually, yes.