8000 Revert "Fix default port for mongosrv DSNs (#6827)" by Kludex · Pull Request #7116 · pydantic/pydantic · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@Kludex
Copy link
Member
@Kludex Kludex commented Aug 14, 2023

Since we are reverting that PR, the idea is that we recommend doing the following for #6774:

from typing import Annotated

from pydantic.networks import UrlConstraints
from pydantic_core import MultiHostUrl

MongoSRVDsn = Annotated[MultiHostUrl, UrlConstraints(allowed_schemes=['mongodb+srv'])]

Related issue number

Notes

@dmontagu mentioned that we should keep the tests that were added. So I'll add on the next commit... Added.

Selected Reviewer: @davidhewitt

@cloudflare-workers-and-pages
Copy link
cloudflare-workers-and-pages bot commented Aug 14, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: a815afc
Status: ✅  Deploy successful!
Preview URL: https://114fd 8000 311.pydantic-docs2.pages.dev
Branch Preview URL: https://revert-union-mongodsn-2.pydantic-docs2.pages.dev

View logs

@Kludex
Copy link
Member Author
Kludex commented Aug 14, 2023

please review

@kikones34
Copy link

What was the reasoning for this reversion? Without the fix, the MongoDsn validator produces invalid mongo URIs when given a mongo+srv URI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MongoDsn.build gives AttributeError

5 participants

0