At the moment, whenever there is change to typeshed, we test all stdlib and third-party packages in the same testing environment, using the --custom-typeshed-dir so that all packages can see each other. There are several practical problems with that:
My suggestion: Only run the tests for the third-party stubs that have actually changed, and run each test in a separate environment. This environment only has the requirements from METADATA.toml installed. This fixes the problems above and also means:
- The stubs will not be able to use features from stdlib that are not yet in the latest type checker distributions.
- Changes that depend on changes in another third-party stub need to wait until that change has been released. (Happens every three hours, so it shouldn't be too much of a problem.)
- Running the tests for all stubs will be slower, since each package needs its own venv installation.
At the moment, whenever there is change to typeshed, we test all stdlib and third-party packages in the same testing environment, using the
--custom-typeshed-dirso that all packages can see each other. There are several practical problems with that:requiresfields for correctness; all packages are always available.paramiko: Change dependencies ontypes-cryptography, allow using upstream type hints #5847, and the discussion in Allow non-types dependencies #5769 (all related tocryptography). (Except if we'd just install all non-types dependencies for all package into our venv.)My suggestion: Only run the tests for the third-party stubs that have actually changed, and run each test in a separate environment. This environment only has the requirements from
METADATA.tomlinstalled. This fixes the problems above and also means: