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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin fastapi test version to 0.87.0 #2647

Merged
merged 4 commits into from Nov 14, 2022
Merged

Pin fastapi test version to 0.87.0 #2647

merged 4 commits into from Nov 14, 2022

Conversation

freddyaboulton
Copy link
Collaborator

@freddyaboulton freddyaboulton commented Nov 14, 2022

Description

Looks like the new fastapi version (0.87.0, released yesterday) has a hard pin on starlette 0.21.0 which introduces breaking changes to the testclient.

tiangolo/fastapi#5471

Rather than putting a pin in the version in requirements.txt (which would force all users to upgrade fastapi/starlette versions), I am only putting a pin in the version of fastapi installed for the unit tests.

Checklist:

  • I have performed a self-review of my own code
  • I have added a short summary of my change to the CHANGELOG.md
  • My code follows the style guidelines of this project
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

A note about the CHANGELOG

Hello 馃憢 and thank you for contributing to Gradio!

All pull requests must update the change log located in CHANGELOG.md, unless the pull request is labeled with the "no-changelog-update" label.

Please add a brief summary of the change to the Upcoming Release > Full Changelog section of the CHANGELOG.md file and include
a link to the PR (formatted in markdown) and a link to your github profile (if you like). For example, "* Added a cool new feature by [@myusername](link-to-your-github-profile) in [PR 11111](https://github.com/gradio-app/gradio/pull/11111)".

If you would like to elaborate on your change further, feel free to include a longer explanation in the other sections.
If you would like an image/gif/video showcasing your feature, it may be best to edit the CHANGELOG file using the
GitHub web UI since that lets you upload files directly via drag-and-drop.

@abidlabs
Copy link
Member

@freddyaboulton should we update the tests themselves instead to use the latest version of fastapi? Don't have a strong opinion, but looks like there is a handy bump tool

@freddyaboulton
Copy link
Collaborator Author

@abidlabs Either works but not both. Either we do >=0.87 or ==0.86.0 in requirements.in. Given that the only difference is in TestClient I didn't see the need to upgrade and change the code. What do you think/prefer? We can also upgrade later if we want if we don't upgrade now. This won't be user facing.

@abidlabs
Copy link
Member

My preference would be to upgrade if it's not a lot of work, so that we are up-to-date in our version of fastapi. But I agree with you, either could work for now

@github-actions
Copy link
Contributor

All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-2647-all-demos

@freddyaboulton freddyaboulton marked this pull request as ready for review November 14, 2022 18:13
@freddyaboulton freddyaboulton changed the title Pin fastapi test version to 0.86.0 Pin fastapi test version to 0.87.0 Nov 14, 2022
@freddyaboulton
Copy link
Collaborator Author

@abidlabs Upgraded to 0.87 instead!

@abidlabs
Copy link
Member

Cool LGTM thanks @freddyaboulton!

@freddyaboulton freddyaboulton merged commit 06353ca into main Nov 14, 2022
@freddyaboulton freddyaboulton deleted the fix-fastapi-version branch November 14, 2022 19:31
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 this pull request may close these issues.

None yet

2 participants