Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix url constraint application#10922

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
sydney-runkle merged 4 commits intomainfromurls-str-constraints
Nov 21, 2024
Merged

Conversation

sydney-runkle
Copy link
Contributor

@github-actionsgithub-actionsbot added the relnotes-fixUsed for bugfixes. labelNov 21, 2024
@codspeed-hqCodSpeed HQ
Copy link

codspeed-hqbot commentedNov 21, 2024
edited
Loading

CodSpeed Performance Report

Merging#10922 willnot alter performance

Comparingurls-str-constraints (21b2401) withmain (22a9af2)

Summary

✅ 46 untouched benchmarks

@github-actionsGitHub Actions
Copy link
Contributor

github-actionsbot commentedNov 21, 2024
edited
Loading

Coverage report

This PR does not seem to contain any modification to coverable code.

Copy link
Contributor

@davidhewittdavidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Seems correct with one simplification.

Copy link
Member

@ViicosViicos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Looks good, hopefully we'll soon be able to rework this annotation application because the function-wrap check is quite unfortunate

sydney-runkle reacted with thumbs up emoji
@antazoey
Copy link

I used to be able to use FileURL for AnyUrl in my models (I have a field that can literally be AnyUrl, including file ones)... Should I make a separate issue or does this also fix that? Is there a way we can have a test for that use-case?

@sydney-runkle
Copy link
ContributorAuthor

Looks good, hopefully we'll soon be able to rework this annotation application because the function-wrap check is quite unfortunate

yes, very much so, I'd like to rework the url types more - I think we could still reconsider validation on init, or at least go about it in a different way

@cloudflare-workers-and-pagesCloudflare Workers and Pages
Copy link

cloudflare-workers-and-pagesbot commentedNov 21, 2024
edited
Loading

Deploying pydantic-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit:21b2401
Status: ✅  Deploy successful!
Preview URL:https://4e7b8150.pydantic-docs.pages.dev
Branch Preview URL:https://urls-str-constraints.pydantic-docs.pages.dev

View logs

@sydney-runkle
Copy link
ContributorAuthor

@antazoey,

The issue is thatAnyUrl requires a host, whereasFileUrl does not. So perhaps you can get the desired result withAnyUrl | FileUrl as your type?

@sydney-runklesydney-runkleenabled auto-merge (squash)November 21, 2024 17:43
@sydney-runklesydney-runkle merged commit73509ed intomainNov 21, 2024
52 checks passed
@sydney-runklesydney-runkle deleted the urls-str-constraints branchNovember 21, 2024 17:48
@antazoey
Copy link

@antazoey,

The issue is thatAnyUrl requires a host, whereasFileUrl does not. So perhaps you can get the desired result withAnyUrl | FileUrl as your type?

OK I can do that. Is host required now only on 2.10 or was it required before but just not failing validation?

sydney-runkle added a commit that referenced this pull requestNov 22, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@davidhewittdavidhewittdavidhewitt approved these changes

@ViicosViicosViicos approved these changes

Assignees
No one assigned
Labels
relnotes-fixUsed for bugfixes.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2.10: URL types issues (application of constraints)
4 participants
@sydney-runkle@antazoey@davidhewitt@Viicos

[8]ページ先頭

©2009-2025 Movatter.jp