Skip to content

Conversation

Viicos
Copy link
Member

@Viicos Viicos commented Mar 20, 2025

We forgot to remove the discriminator metadata info when cleaning schemas, and this led to critical issues when such schemas are referenced in other places as the deferred discriminator application logic would happen twice.

Fixes #11587.

Change Summary

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 20, 2025
Copy link

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

Deploying pydantic-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: d7523cc
Status: ✅  Deploy successful!
Preview URL: https://f349ce6c.pydantic-docs.pages.dev
Branch Preview URL: https://deferred-disc-cleanup.pydantic-docs.pages.dev

View logs

Copy link

codspeed-hq bot commented Mar 20, 2025

CodSpeed Performance Report

Merging #11591 will not alter performance

Comparing deferred-disc-cleanup (d7523cc) with main (69b2b63)

Summary

✅ 46 untouched benchmarks

Copy link
Contributor

github-actions bot commented Mar 20, 2025

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  pydantic/_internal
  _generate_schema.py
  _validate_call.py
Project Total  

This report was generated by python-coverage-comment-action

We forgot to remove the discriminator metadata info when cleaning
schemas, and this led to critical issues when such schemas are
referenced in other places as the deferred discriminator application
logic would happen twice.
@Viicos Viicos force-pushed the deferred-disc-cleanup branch from de5bb84 to d7523cc Compare March 20, 2025 13:31
@Viicos Viicos merged commit ed2764b into main Mar 26, 2025
62 checks passed
@Viicos Viicos deleted the deferred-disc-cleanup branch March 26, 2025 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes-fix Used for bugfixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression in size of pydantic core schemas and corresponding model_json_schema() call time
2 participants