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
Updates to Url types for Pydantic V2 #6638
Conversation
PYD-171 TODO - Docs: URL Properties example
urls.md URL Properties
|
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, just some offhand thoughts which you can freely dismiss 😁
|
||
The above types (which all inherit from `AnyUrl`) will attempt to give descriptive errors when invalid URLs are | ||
provided: | ||
- [`AnyUrl`][pydantic.networks.AnyUrl]: any scheme allowed, top-level domain (TLD) not required, host required. |
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.
I wonder if it makes sense to tabulate these and maybe even generate the table programmatically?
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.
This is a good callout. I'll look into it today.
- `postgresql+psycopg2cffi` | ||
- `postgresql+py-postgresql` | ||
- `postgresql+pygresql` | ||
- [`MySQLDsn`][pydantic.networks.MySQLDsn]: scheme `mysql`, user info required, TLD not required, host required. |
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.
I wonder if we want to link to definitions of all of these, where possible? I assume it's easy enough for users to search for these though having links to e.g. mysql docs may be a nice touch? I suppose it's also a lot of effort to collect and maintain external links, so maybe not worthwhile.
Review and update Url types, removing outdated information and updating examples.
Change Summary
Related issue number
Closes PYD-171
Checklist
Selected Reviewer: @davidhewitt