Skip to content

Push down constraints in unions involving MISSING sentinel#12908

Merged
Viicos merged 2 commits intomainfrom
vp/missing-sentinel-constraint-pushdown
Mar 26, 2026
Merged

Push down constraints in unions involving MISSING sentinel#12908
Viicos merged 2 commits intomainfrom
vp/missing-sentinel-constraint-pushdown

Conversation

@Viicos
Copy link
Copy Markdown
Member

@Viicos Viicos commented Mar 10, 2026

Change Summary

Fixes #12971.

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

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Mar 10, 2026

@Viicos Viicos force-pushed the vp/missing-sentinel-constraint-pushdown branch from 94b53e1 to ddd1e96 Compare March 10, 2026 13:18
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Mar 10, 2026

Merging this PR will degrade performance by 7.76%

❌ 1 regressed benchmark
✅ 211 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
test_tagged_union_with_callable_discriminator_schema_generation 1.1 ms 1.1 ms -7.76%

Comparing vp/missing-sentinel-constraint-pushdown (165e90d) with main (1a37a3d)

Open in CodSpeed

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 10, 2026

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  pydantic
  json_schema.py
  pydantic/_internal
  _generate_schema.py
  _schema_gather.py
  pydantic-core/python/pydantic_core
  core_schema.py
Project Total  

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

@Viicos Viicos force-pushed the vp/missing-sentinel-constraint-pushdown branch from ddd1e96 to f980bf7 Compare March 10, 2026 13:40
@Viicos Viicos merged commit 94dd544 into main Mar 26, 2026
82 of 83 checks passed
@Viicos Viicos deleted the vp/missing-sentinel-constraint-pushdown branch March 26, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unexpected behaviour when combining pattern and MISSING

2 participants