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

Subclass all single host url classes fromAnyUrl to preserve behavior from v2.9#10856

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 2 commits intomainfromany-url-base-type
Nov 18, 2024

Conversation

sydney-runkle
Copy link
Contributor

Addresses concerns from#10783 (comment)

sanderr reacted with thumbs up emoji
@github-actionsgithub-actionsbot added the relnotes-fixUsed for bugfixes. labelNov 15, 2024
@cloudflare-workers-and-pagesCloudflare Workers and Pages

Deploying pydantic-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit:48d1503
Status: ✅  Deploy successful!
Preview URL:https://4662b687.pydantic-docs.pages.dev
Branch Preview URL:https://any-url-base-type.pydantic-docs.pages.dev

View logs

@@ -475,10 +475,14 @@ class AnyUrl(_BaseUrl):
@property
def host(self) -> str:
"""The required URL host."""
return self._url.host # type: ignore
return self._url.host # pyright: ignore[reportReturnType]
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

cc@Viicos, using more explicit ignores :)

davidhewitt reacted with thumbs up emoji
Comment on lines -490 to -494
@property
def host(self) -> str:
"""The required URL host."""
return self._url.host # type: ignore

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

We can remove the addedhost specs that overrode thestr | None return type from_BaseUrl, asAnyUrl enforcesstr

Comment on lines +610 to +614
@property
def host(self) -> str | None: # pyright: ignore[reportIncompatibleMethodOverride]
"""The host part of the URL, or `None`."""
return self._url.host

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Have to add this for the case wherehost_required=Fals becauseAnyUrl hashost typed asstr, so we indicate the optional nature here.

@codspeed-hqCodSpeed HQ
Copy link

CodSpeed Performance Report

Merging#10856 willnot alter performance

Comparingany-url-base-type (48d1503) withmain (11d04f3)

Summary

✅ 44 untouched benchmarks

@github-actionsGitHub Actions
Copy link
Contributor

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  pydantic
  networks.py613,628,709
Project Total 

This report was generated bypython-coverage-comment-action

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.

Based on the surrounding discussion, this makes sense to me 👍

@sydney-runklesydney-runkle merged commit372d4e2 intomainNov 18, 2024
54 checks passed
@sydney-runklesydney-runkle deleted the any-url-base-type branchNovember 18, 2024 13:08
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@davidhewittdavidhewittdavidhewitt 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 participants
@sydney-runkle@davidhewitt

[8]ページ先頭

©2009-2025 Movatter.jp