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
Revert percent encoding in URLs. #4470
Conversation
This reverts commit e34ff92.
please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Sorry if this isn't the place to write this, but the now-reverted change was also what caused our DB connectivity problems because we used PostgresDsn to create a connection string for SQLAlchemy and the name of unix socket contained Was very hard to debug because on Google Cloud Run you only get |
agreed, it'll be out today, I'm wait for one PR, but if it's not in soon, I'll release. |
For anyone interested, I've just implemented URL parsing as part of pydantic-core for V2, see pydantic/pydantic-core#317. Feedback welcome. |
This reverts #4224.
fix #4458, fix #4468. Replaces #4469 and #4461.
There are a number of problems with #4224:
/
, this could also be fixed by Fix existing percent encoding #4469+
, this was reported in AnyUrl percent encoding (#3061) introduced v1.10.0 breaks database connection string #4468 and could also be fixed by Fix existing percent encoding #4469rebuild
for all URL validation, lots of tests fail, fixing those tests involves significant changes and we're well into the "this is not really suitable for a patch release" territory.Therefore after some consideration and discussion with other pydantic maintainers (and with a heavy heart), I've decided the best approach is to remove percentage encoding from URL logic until V2.
Long term (e.g. in V2) I think we should use an external library (either in python or rust) to perform URL parsing and validation.