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

Add support for python 3.11 #119

Closed
laurentS opened this issue Nov 8, 2022 · 6 comments · Fixed by #125
Closed

Add support for python 3.11 #119

laurentS opened this issue Nov 8, 2022 · 6 comments · Fixed by #125

Comments

@laurentS
Copy link
Owner

laurentS commented Nov 8, 2022

Now that it's officially released, we should add support for it, as it's full of good stuff 🥝 🍓 🍏

@sanders41
Copy link
Collaborator

I saw 3.11 was failing in CI. I testing bumping the fastapi and starlette dev dependencies to fastapi = "^0.86.0" and starlette = "^0.20.4", and the tests pass on 3.11 after that.

I also tested with fastapi = "^0.88.0" and starlette = "^0.22.0". This works, but requires httpx to also be installed as a dev dependency.

I wasn't sure if there is a specific reason the fastapi and starlette dependencies are being held back to the older versions. If not I'm happy to open a PR bumping them and adding 3.11 back to CI.

@laurentS
Copy link
Owner Author

Nice find, thanks for looking into it @sanders41 !
I think the only reason we're keeping very loose version requirements on those is so that users with outdated installs can still get successful dependency resolutions. I think we could do different version requirements depending on the version of python, poetry allows that.
Does that seem ok to you?

@sanders41
Copy link
Collaborator

FastAPI and Starlette are dev only dependencies so the versions listed are only used for testing, really only the version in the poetry.lock gets used. This is currently 0.61.2 for fastapi and 0.13.6 for starlette. If those dev dependencies are updated end users can still install any version they want. To verify this is true I looked at the current fastapi requirement (^0.61.0), then ran pip install slowapi fastapi==0.60.0 (notice the fastapi version is less than what is allowed in the pyproject.toml and everything installed without issue.

None of this is to say I won't update the dependencies with python specific versions. If that is still your preference I will certainly do that, I just wanted to make sure first.

@laurentS
Copy link
Owner Author

laurentS commented Jan 9, 2023

Hi @sanders41 sorry for the delay in getting back to you. 🎅 and stuff :)
Thanks for checking all this. Clearly I need to brush up my dependency versioning knowledge! I'd vote for updating dependencies if it doesn't break anything, and avoiding different version requirements if possible to avoid extra complexities.
Are you keen on opening a PR with these changes?

@sanders41
Copy link
Collaborator

No worries on the delay, hope 🎅 was good this year :)

PR here to update the dev dependencies for 3.11 #125

@smittysmee
Copy link

@laurentS Bump on the PR!

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.

3 participants