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
Running stubtest from mypy main on typeshed produces:
error: not checking stubs due to mypy build errors:
stdlib/asyncio/events.pyi:23: note: class asyncio.unix_events.AbstractChildWatcher is deprecated: Deprecated as of Python 3.12; will be removed in Python 3.14 [deprecated]
stdlib/unittest/__init__.pyi:53: note: function unittest.loader.findTestCases is deprecated: Deprecated in Python 3.11; removal scheduled for Python 3.13 [deprecated]
stdlib/unittest/__init__.pyi:53: note: function unittest.loader.getTestCaseNames is deprecated: Deprecated in Python 3.11; removal scheduled for Python 3.13 [deprecated]
stdlib/unittest/__init__.pyi:53: note: function unittest.loader.makeSuite is deprecated: Deprecated in Python 3.11; removal scheduled for Python 3.13 [deprecated]
Which is not very useful. Maybe we should suppress deprecated in typeshed's configuration or in stubtest in general.
Activity
JelleZijlstra commentedon Oct 21, 2024
(I added a topic-pep-702 label, @tyralla fyi.)
hauntsaninja commentedon Oct 21, 2024
I think suppressing all deprecated errors in stubs could make sense
JelleZijlstra commentedon Oct 22, 2024
I feel that might be too much; if we deprecate something in
_typeshed, we'd want mypy to tell stub authors about it.hauntsaninja commentedon Oct 22, 2024
We could just special case typeshed stubs in particular then (mypy already does this in a few places)
(And in general that feels niche / for type-only programs removals don't feel too much more disruptive than deprecations)
tyralla commentedon Oct 22, 2024
Do you mean just extending the current
warn_deprecatedmethod like this?If so (and if it works, not checked so far), I could modify PR #17926 accordingly, which still suffers under typeshed issues.
(Thanks for the new label, @JelleZijlstra.)
hauntsaninja commentedon Oct 22, 2024
Yup!
tyralla commentedon Oct 22, 2024
Seems I am starting to learn some Mypy slang ;-)
tyralla commentedon Nov 1, 2025
Done as decided in #17926 a long time ago.