You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched GitHub for a duplicate issue and I'm sure this is something new
I have searched Google & StackOverflow for a solution and couldn't find anything
I have read and followed the docs and still think this is a bug
I am confident that the issue is with pydantic (not my code, or another library in the ecosystem like FastAPI or mypy)
Description
Hi!
I have two questions:
From docs "PostgresDsn: user info required, TLD not required, host required, as of V.10 PostgresDsn supports multiple hosts". User info required but postgresql docs has example "postgresql://host1:123,host2:456/somedb?target_session_attrs=any&application_name=myapp"
It seems PostgresDsn doesn't work properly with multiple hosts without TLD
PostgresDsn(...) has some slightly weird behaviour and isn't expected to work like this. I agree that this is very confusing, it should either work properly, or fail completely.
There are a whole host of problems with URL types see Revert percent encoding in URLs. #4470 for some explanation, basically we run some different logic only if there's a TLD, the problem as per Revert percent encoding in URLs. #4470 is that if we run that logic on all URLs, a whole bunch of tests fail.
The medium term solutions is to move to a dedicated URL validation library in V2, there is'nt really a good short term solution I'm afraid, you might be best to implement your own validation.
Initial Checks
Description
Hi!
I have two questions:
Thank you
Example Code
Python, Pydantic & OS Version
Affected Components
.dict()
and.json()
construct()
, pickling, private attributes, ORM modeThe text was updated successfully, but these errors were encountered: