Skip to content

Conversation

Viicos
Copy link
Member

@Viicos Viicos commented Mar 31, 2025

Change Summary

Fixes #11650.

Regression in #11247, the logic was somehow tweaked when moved to the GenerateSchema class, so it was restored to how it was before.

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-actions github-actions bot added the relnotes-fix Used for bugfixes. label Mar 31, 2025
Copy link

cloudflare-workers-and-pages bot commented Mar 31, 2025

Deploying pydantic-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: a071a50
Status: ✅  Deploy successful!
Preview URL: https://36bb88bf.pydantic-docs.pages.dev
Branch Preview URL: https://mapping-regression.pydantic-docs.pages.dev

View logs

@Viicos Viicos added the backport-2.11 Needs backport to 2.11 label Mar 31, 2025
Copy link

codspeed-hq bot commented Mar 31, 2025

CodSpeed Performance Report

Merging #11658 will not alter performance

Comparing mapping-regression (a071a50) with main (dfa6c67)

Summary

✅ 46 untouched benchmarks

Copy link
Contributor

github-actions bot commented Mar 31, 2025

Coverage report

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

Copy link
Contributor

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

LGTM with one comment

Comment on lines 6957 to 6958
Note - we still don't do a good job of handling subclasses, as we convert the input to a dict
via the MappingValidator annotation's schema.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this comment now out of date?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch -- well the MappingValidator is not a thing anymore but I think the comment is still relevant.

@Viicos Viicos enabled auto-merge (squash) April 2, 2025 20:36
@Viicos Viicos merged commit 34095c7 into main Apr 2, 2025
60 checks passed
@Viicos Viicos deleted the mapping-regression branch April 2, 2025 20:48
Viicos added a commit that referenced this pull request Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-2.11 Needs backport to 2.11 relnotes-fix Used for bugfixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression 2.10: Not properly validating disjunction of dataclasses (or TypedDict) that embed Mapping
2 participants