pydantic-core
pydantic-core copied to clipboard
Automatically URL encode passwords for `MultiHostUrl` when using the `build` method
Change Summary
When using the build method on MultiHostUrl, despite knowing explicitly what the password was there was no automatic URL encoding. This PR automatically encodes the provided password so that the user doesn't have to beforehand.
Related issue number
fix https://github.com/pydantic/pydantic/issues/8061 fix https://github.com/pydantic/pydantic-core/issues/1078
Checklist
- [X] Unit tests for the changes exist
- [ ] Documentation reflects the changes where applicable
- [ ] Pydantic tests pass with this
pydantic-core(except for expected changes) - [ ] My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers