pydantic-core icon indicating copy to clipboard operation
pydantic-core copied to clipboard

Automatically URL encode passwords for `MultiHostUrl` when using the `build` method

Open ThomasLaPiana opened this issue 1 year ago • 8 comments

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

ThomasLaPiana avatar Jul 15 '24 14:07 ThomasLaPiana