Skip to content

feat(typing): support typing.ReadOnly for TypedDict schemas#4424

Merged
provinzkraut merged 5 commits intomainfrom
support-read-only
Oct 12, 2025
Merged

feat(typing): support typing.ReadOnly for TypedDict schemas#4424
provinzkraut merged 5 commits intomainfrom
support-read-only

Conversation

@sobolevn
Copy link
Copy Markdown
Member

Closes #4423

@sobolevn sobolevn requested review from a team as code owners October 11, 2025 11:12
@sobolevn sobolevn changed the title feat(ryping): support typing.ReadOnly for TypedDict schemas feat(typing): support typing.ReadOnly for TypedDict schemas Oct 11, 2025
@github-actions github-actions bot added area/docs This PR involves changes to the documentation size: small type/feat pr/external Triage Required 🏥 This requires triage labels Oct 11, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.83%. Comparing base (d478219) to head (efec046).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4424   +/-   ##
=======================================
  Coverage   97.83%   97.83%           
=======================================
  Files         296      296           
  Lines       15286    15286           
  Branches     1711     1711           
=======================================
  Hits        14955    14955           
  Misses        189      189           
  Partials      142      142           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@provinzkraut provinzkraut left a comment

Choose a reason for hiding this comment

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

Looks good!

I'm thinking we should document these small behaviours somewhere..

@provinzkraut provinzkraut enabled auto-merge (squash) October 11, 2025 13:01
@provinzkraut
Copy link
Copy Markdown
Member

We really need to do something about these CI timeouts.. https://github.com/litestar-org/litestar/actions/runs/18440384263/job/52539920154?pr=4424#step:10:118

@provinzkraut provinzkraut merged commit 749c332 into main Oct 12, 2025
27 checks passed
@provinzkraut provinzkraut deleted the support-read-only branch October 12, 2025 09:55
@github-actions
Copy link
Copy Markdown

Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/4424

provinzkraut pushed a commit that referenced this pull request Dec 13, 2025
@provinzkraut
Copy link
Copy Markdown
Member

@sobolevn I've cherry-picked this into the v2 branch, where it seems to fail under Python 3.8. Do you have any idea why?

https://github.com/litestar-org/litestar/actions/runs/20194318117/job/57976059886?pr=4524#step:11:505

@sobolevn
Copy link
Copy Markdown
Member Author

It might be a typing_extensions bug. We don't support 3.8 anymore: https://github.com/python/typing_extensions/blob/main/.github/workflows/ci.yml#L41

@provinzkraut
Copy link
Copy Markdown
Member

I'll check that out

@provinzkraut
Copy link
Copy Markdown
Member

Unfortunately that did not fix it

@provinzkraut
Copy link
Copy Markdown
Member

Got it. We're checking for __required_keys__, which was only added in 3.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs This PR involves changes to the documentation pr/external pr/internal size: small Triage Required 🏥 This requires triage type/feat

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement: support ReadOnly type for TypedDict

2 participants