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

Warn if registering virtual subclasses on Pydantic models#11669

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

Draft
Viicos wants to merge1 commit intomain
base:main
Choose a base branch
Loading
fromabc-checks

Conversation

Viicos
Copy link
Member

Change Summary

Fixes#11605.

I'll wait for the outcome ofpython/cpython#131914 as we might be able to conditionally have this logic depending on the Python version.

Related issue number

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist
  • Tests pass on CI
  • Documentation reflects the changes where applicable
  • My PR is ready to review,please add a comment including the phrase "please review" to assign reviewers

@github-actionsgithub-actionsbot added the relnotes-fixUsed for bugfixes. labelApr 1, 2025
@codspeed-hqCodSpeed HQ
Copy link

CodSpeed Performance Report

Merging#11669 willimprove performances by ×4.2

Comparingabc-checks (dd1bee6) withmain (6c38dc9)

Summary

⚡ 6 improvements
✅ 40 untouched benchmarks

Benchmarks breakdown

BenchmarkBASEHEADChange
test_efficiency_with_highly_nested_examples696.3 µs649.2 µs+7.26%
test_isinstance_basemodel26.7 ms6.3 ms×4.2
test_list_of_models_validation[__init__]80.5 µs76.4 µs+5.39%
test_list_of_models_validation[model_validate]78.7 µs74.3 µs+5.92%
test_simple_model_validation[model_validate]40.8 µs38.3 µs+6.76%
test_north_star_validate_python_strict22.7 ms21.6 ms+5.46%

@github-actionsGitHub Actions
Copy link
Contributor

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  pydantic/_internal
  _model_construction.py284-289
Project Total 

This report was generated bypython-coverage-comment-action

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
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.

pydantic using abc which can have memory and performance issues
1 participant
@Viicos

[8]ページ先頭

©2009-2025 Movatter.jp