Skip to content

feat(typing): parametrize App by default req/resp types on 3.13+#2591

Merged
vytas7 merged 6 commits intofalconry:masterfrom
vytas7:2586-typevar-defaults
Jan 21, 2026
Merged

feat(typing): parametrize App by default req/resp types on 3.13+#2591
vytas7 merged 6 commits intofalconry:masterfrom
vytas7:2586-typevar-defaults

Conversation

@vytas7
Copy link
Member

@vytas7 vytas7 commented Jan 11, 2026

Thanks for the idea @jap, I took a stab @ implementing this.

Fixes #2586.

@vytas7 vytas7 requested review from CaselIT and kgriffs January 11, 2026 20:00
@codecov
Copy link

codecov bot commented Jan 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (6de14de) to head (8db697a).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #2591   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           64        64           
  Lines         7874      7875    +1     
  Branches      1078      1078           
=========================================
+ Hits          7874      7875    +1     

☔ 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.

@vytas7 vytas7 mentioned this pull request Jan 21, 2026
Copy link
Member

@CaselIT CaselIT left a comment

Choose a reason for hiding this comment

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

looks ok!

if is_sink:
params = m.groupdict() # type: ignore[union-attr]
responder = obj
responder = obj # type: ignore[assignment,unused-ignore]
Copy link
Member

Choose a reason for hiding this comment

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

why is this ignore needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Our typing is inexact, and not parametrized properly either, but this is masked on <=3.12 by earlier ignores/casts. On, 3.13 it applies the default leading to further mismatch, as I understand.

Copy link
Member

Choose a reason for hiding this comment

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

Oh ok, so we have a type warning only in some python version.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, only in 3.13+

@vytas7 vytas7 merged commit 587bffd into falconry:master Jan 21, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

typing changes in 4.2 require code changes

2 participants