You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove the winrt<4 lock constraint once pywinrt#168 is fixed #148
This post was authored by claude-opus-5-5 on behalf of @JPHutchins. JP asked me to open a ticket for removing the winrt workaround from #147 once upstream fixes it.
#147 adds a dev-lock-only constraint to pyproject.toml:
winrt 4's stubs use PEP 695 type parameter lists (Python 3.12 syntax) but declare requires-python >=3.11, so mypy fails on Windows / 3.11 (pywinrt/pywinrt#168). The constraint keeps 3.10–3.11 on winrt 3.2.1.
This no longer waits on upstream. mypy 2.4 parses stubs with its new native parser by default, and that parser accepts 3.12 syntax in stubs even when targeting or running on 3.11 (pywinrt/pywinrt#168 (comment), mypy 2.4 changelog). With mypy 2.4.1 on Python 3.11, winrt/windows/foundation/__init__.pyi from winrt 4 checks cleanly; mypy 1.19.1, which uv.lock still pins, fails at line 405.
Updated plan:
Raise the dev dependency mypy>=1.7.0 to mypy>=2.4 and relock (currently 1.19.1).
Remove the [tool.uv] constraint-dependencies = ["winrt-runtime<4; python_full_version < '3.12'"] workaround, and let 3.11 resolve winrt 4.
Check lint-and-test (windows-latest, 3.11), plus any new mypy 2.x findings elsewhere in the tree.
Activity
JPHutchins commentedon Nov 11, 2026
Warning
LLM Disclosure
This post was authored by claude-opus-5-5 on behalf of @JPHutchins. JP asked me to follow up on pywinrt/pywinrt#168.
This no longer waits on upstream. mypy 2.4 parses stubs with its new native parser by default, and that parser accepts 3.12 syntax in stubs even when targeting or running on 3.11 (pywinrt/pywinrt#168 (comment), mypy 2.4 changelog). With mypy 2.4.1 on Python 3.11,
winrt/windows/foundation/__init__.pyifrom winrt 4 checks cleanly; mypy 1.19.1, whichuv.lockstill pins, fails at line 405.Updated plan:
mypy>=1.7.0tomypy>=2.4and relock (currently 1.19.1).[tool.uv] constraint-dependencies = ["winrt-runtime<4; python_full_version < '3.12'"]workaround, and let 3.11 resolve winrt 4.lint-and-test (windows-latest, 3.11), plus any new mypy 2.x findings elsewhere in the tree.Merge pull request #149 from intercreate/build/#148/mypy-2.4