bpo-40275: Add import_helper submodule in test.support by shihai1991 · Pull Request #20794 · python/cpython

Conversation

@shihai1991

remove the following functions, classes in import_helper:

  • import_module(), _ignore_deprecated_imports()
  • import_fresh_module(), _save_and_remove_module(), _save_and_block_module()
  • unload()
  • make_legacy_pyc()
  • forget()
  • CleanImport
  • DirsOnSysPath
  • modules_setup(), modules_cleanup()

https://bugs.python.org/issue40275

@shihai1991

@vstinner hI, victor. Should we leave DirsOnSysPath in support/init.py?
DirOnSysPath have no direct relation with import_module, right?

@vstinner

vstinner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. But I'm waiting for your feedback on DirsOnSysPath.

@shihai1991

LGTM. But I'm waiting for your feedback on DirsOnSysPath.

Ok, from the docs: A list of strings that specifies the search path for modules. so it make sense.

@shihai1991

Reviewers

@vstinner vstinner vstinner approved these changes

@brettcannon brettcannon Awaiting requested review from brettcannon

@encukou encukou Awaiting requested review from encukou

@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently

@ncoghlan ncoghlan Awaiting requested review from ncoghlan

@warsaw warsaw Awaiting requested review from warsaw

Labels