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

Unnecessary tight version constraint limits FastAPI versions #136

Closed
graipher opened this issue May 2, 2022 · 3 comments
Closed

Unnecessary tight version constraint limits FastAPI versions #136

graipher opened this issue May 2, 2022 · 3 comments

Comments

@graipher
Copy link

graipher commented May 2, 2022

Due to this line in the pyproject.toml file:

fastapi = "^0.38.1"

FastAPI versions newer than 0.38 cannot be used with this (current version of FastAPI is 0.75.2). When explicitly requesting a higher version the version solving fails (using poetry):

$ poetry update
Updating dependencies
Resolving dependencies... (0.0s)

  SolverProblemError

  Because prometheus-fastapi-instrumentator (5.8.0) depends on fastapi (>=0.38.1,<0.39.0)
   and no versions of prometheus-fastapi-instrumentator match >5.8.0,<6.0.0, prometheus-fastapi-instrumentator (>=5.8.0,<6.0.0) requires fastapi (>=0.38.1,<0.39.0).
  So, because my-repo depends on both fastapi (^0.75.0) and prometheus-fastapi-instrumentator (^5.8.0), version solving failed.

One solution would be relaxing the requirements:

fastapi = "^0.38"

or

fastapi = ">=0.38.1, <1.0.0"
@alexted
Copy link

alexted commented May 3, 2022

Yeah, i have the same problem with current version of library - FastAPI and all dependent libraries have rolled back to the Stone Age. I have to manually specify the versions of the required libraries, but then prometheus-fastapi-instrumentator rolls back to the previous version, because they are "too new" for it...

@graipher
Copy link
Author

graipher commented May 3, 2022

I hot-fixed it by requiring "^5.7.1 for prometheus-fastapi-instrumentator in my repository for now. But an actual fix would be nice of course.

github-actions bot pushed a commit that referenced this issue May 3, 2022
### [5.8.1](v5.8.0...v5.8.1) (2022-05-03)

### Bug Fixes

* **deps:** regression too strict version requirements [#136](#136) ([36bc045](36bc045))
@trallnag
Copy link
Owner

trallnag commented May 3, 2022

Thanks for raising the issue

@trallnag trallnag closed this as completed May 3, 2022
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

3 participants