[issue40275] test.support has way too many imports

Serhiy Storchaka report at bugs.python.org
Sat May 16 15:29:56 EDT 2020


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I think that there is no much benefit in avoiding to import modules which are imported in libregrtest. In particular threading, subprocess, tempdir, os, fnmatch, etc. You should minimize import of test.libregrtest + test.support, not just test.support. BTW, libregrtests imports now much more modules than test.support.

Also, some modules, like bz2 are too small and do not have much dependencies. You will not save much on importing them lazily. On other hand, lazy import have its cost, so the real benefit will be even smaller.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40275>
_______________________________________


More information about the Python-bugs-list mailing list