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

⬆ Bump Starlette to version 0.22.0 to fix bad encoding for query parameters in TestClient #5659

Merged
merged 2 commits into from Nov 27, 2022

Conversation

azogue
Copy link
Contributor

@azogue azogue commented Nov 18, 2022

Update starlette to v0.22.0 to fix issue with TestClient doing an extra unquote in the URL query

(encode/starlette#1952 and encode/starlette#1953), introduced with the (tests)-Breaking change in v0.21.0 with the swap from requests.Session to httpx.Client for the TestClient

closes #5646

@github-actions
Copy link
Contributor

📝 Docs preview for commit d42a417 at: https://6377916021146403d9d10c6f--fastapi.netlify.app

Copy link
Contributor

@iudeen iudeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

And thanks for the test too :)

@papb
Copy link
Contributor

papb commented Nov 25, 2022

This will be great for the fix on GZipMiddleware too!

@lovasoa
Copy link

lovasoa commented Nov 26, 2022

Thank you @azogue ! I spent forever tracking back a broken test to this issue ! Is there something missing for this PR to be merged ?

@azogue
Copy link
Contributor Author

azogue commented Nov 27, 2022

Is there something missing for this PR to be merged ?

@lovasoa, I don't know :(

If there is, I could do it if pointed to 🥺

Release notes are filled with GH Actions, I think, and there is no 'milestone' tracking to add it for the next patch

I suppose it will be merged soon 🤞

We are using fastAPI in production with 0.85.1, waiting for the fix to update it, after adapting the test suite with the TestClient change.

The only thing I would do different is to unpin the starlette dependency, at least to ^0.22.0, instead of setting a fixed version each time, but I can understand the reasons behind, so I just changed the version, maintaining the hard link ==

@tiangolo tiangolo changed the title 📦️ Bump starlette to fix bad encoding issue #5646 ⬆ Bump Starlette to version 0.22.0 to fix bad encoding for query parameters in TestClient Nov 27, 2022
@tiangolo tiangolo merged commit 46974c5 into tiangolo:master Nov 27, 2022
@tiangolo
Copy link
Owner

Great job @azogue! Thanks for adding a test for it! 🙇

And thanks everyone for the interactions, especially @iudeen that I see you reviewed it, and added a comment letting me know you checked the code and test 😉 🍪

This is available in FastAPI 0.88.0, just released. 🚀

@papb
Copy link
Contributor

papb commented Nov 27, 2022

at least to ^0.22.0,

@azogue I would be in favor of that too, but you know that means >=0.22.0 && <0.23.0, right? If it was previously set to ^0.21.0 instead of ==0.21.0, it would still need the update anyway, because 0.22.0 is not covered by ^0.21.0.

@azogue azogue deleted the fix/extra-unquote-on-query-params branch November 28, 2022 07:25
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.

Bad encoding in query parameters with new TestClient using httpx.Client
5 participants