Repository navigation
Closed
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtype-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Proposal:
The code in Lib/test/libregrtest already has a smattering of type hints in it, but doesn't currently pass type checking. @vstinner, the primary maintainer of libregrtest, expressed interest to me in seeing whether we could run mypy on libregrtest in CI.
This issue is for tracking progress towards that.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Linked PRs
- gh-109413: libregrtest: Add and improve type annotations #109405
- gh-109413: Fix some trivial mypy nitpicks in libregrtest #109454
- gh-109413: Add a custom script for running mypy on libregrtest #109464
- gh-109413 Improve the mypy config file for libregrtest #109518
- gh-109413: Run mypy on
libregrtestin CI #112558 - gh-109413: libregrtest: enable mypy's
--strict-optionalcheck on most files #112586 - gh-109413: regrtest: add WorkerRunTests class #112588
- [3.12] gh-109413: regrtest: add WorkerRunTests class (GH-112588) #112593
- [3.11] gh-109413: regrtest: add WorkerRunTests class (GH-112588) #112594
- [3.12] gh-109413: libregrtest: enable mypy's
--strict-optionalcheck on most files (#112586) #112602 - [3.11] [3.12] gh-109413: libregrtest: enable mypy's
--strict-optionalcheck on most files (GH-112586) (GH-112602) #112603 - [3.12] gh-109413: libregrtest: Backport
.py-file changes from #112558 (#112558) #112605 - [3.11] [3.12] gh-109413: libregrtest: Backport
.py-file changes from GH-112558 (GH-112605) #112607 - gh-109413: Add more type hints to
libregrtest#126352 - [3.13] gh-109413: Add more type hints to
libregrtest(GH-126352) #126388 - [3.12] gh-109413: Add more type hints to
libregrtest(GH-126352) #126389 - gh-109413: Enable
strict_optionalforlibregrtest/main.py#126394 - [3.13] gh-109413: Enable
strict_optionalforlibregrtest/main.py(GH-126394) #126802 - gh-109413: Enable
strict_optional = trueforlibregrtest/run_workers#126855 - [3.13] gh-109413: Enable
strict_optional = trueforlibregrtest/run_workers(GH-126855) #126967 - gh-109413: Enable mypy's
disallow_any_genericssetting when checkinglibregrtest#127033 - [3.13] gh-109413: Enable mypy's
disallow_any_genericssetting when checkinglibregrtest(GH-127033) #127034 - gh-109413: Fix libregrtest get_running() #127153
- [3.13] gh-109413: Fix libregrtest get_running() (GH-127153) #127157
Metadata
Metadata
Assignees
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtype-featureA feature request or enhancementA feature request or enhancement
Activity
AlexWaygood commentedon Sep 14, 2023
We currently do not have any projects inside the
Lib/directory that are mypy-checked in CI: currently, all the mypy-checked projects we have in CPython live in theTools/. If we want to actually run mypy on libregrtest in CI, I think it should be discussed on Discourse first, to check if anybody has any objections to this idea.gh-109413: libregrtest: Add and improve type annotations (#109405)
[-]libregrtest: Improve type hints; explore running mypy on CI[/-][+]libregrtest: Improve type hints; explore running mypy in CI[/+]pythongh-109413: Fix some trivial mypy nitpicks in libregrtest
gh-109413: Fix some trivial mypy nitpicks in libregrtest (#109454)
gh-109413: Improve mypy config for libregrtest (#109518)
pythongh-109413: Improve mypy config for libregrtest (python#109518)
gh-109413: Run mypy on `libregrtest` in CI (#112558)
pythongh-109413: libregrtest: enable mypy's `--strict-optional` check…
pythongh-109413: regrtest: add WorkerRunTests class
gh-109413: regrtest: add WorkerRunTests class (#112588)
pythongh-109413: regrtest: add WorkerRunTests class (pythonGH-112588)
pythongh-109413: regrtest: add WorkerRunTests class (pythonGH-112588)
41 remaining items
pythongh-109413: Fix libregrtest get_running() (pythonGH-127153)
[3.13] gh-109413: Fix libregrtest get_running() (GH-127153) (#127157)
[3.13] gh-109413: Enable mypy's `disallow_any_generics` setting when …
pythongh-109413: Add more type hints to `libregrtest` (python#126352)
pythongh-109413: Enable `strict_optional` for `libregrtest/main.py` (p…
[3.13] gh-109413: Add more type hints to `libregrtest` (GH-126352) (#…
pythongh-109413: Add more type hints to `libregrtest` (python#126352)
pythongh-109413: Enable `strict_optional` for `libregrtest/main.py` (p…
pythongh-109413: Enable `strict_optional = true` for `libregrtest/run…
pythongh-109413: Enable mypy's `disallow_any_generics` setting when c…
pythongh-109413: Fix libregrtest get_running() (python#127153)
hugovk commentedon Jul 5, 2026
More to do here, or can we close this issue?
vstinner commentedon Jul 6, 2026
IMO this issue can be closed. libregrtest is now well covered by mypy.
AlexWaygood commentedon Jul 6, 2026
There are still lots of config options that would ideally be made stricter on this package, but I don't have the energy to work on that right now, and there's little point leaving this open if nobody else does either, so I also support it being closed :-)