Commit Graph

2 Commits (c54dc50bd7de1175efea2794f034685fa4082100)

Author SHA1 Message Date
Felix Fontein 380be7581e
Address compat issue for collection loading on py26 (#68219) (#69402)
* Address compat issue for collection loading on py26

* Move import_module shim to utils for compat across the codebase

* Enable collection tests on py2.6

* Update changelog fragment

* Simplify code using sys.moduls

* Move compat to module_utils/compat/importlib

* Add back errantly deleted newline

* Remove hack comment

Co-Authored-By: Matt Clay <matt@mystile.com>

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit da3a90e88e)

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
Matt Clay b1ba759862 Fix plugin names for collection plugins. (#60317)
* Fix plugin names for collection plugins.

Add an integration test to verify plugin __name__ is correct for collection plugins.

* Fix collection loader PEP 302 compliance.

The `find_module` function now returns `None` if the module cannot be found. Previously it would return `self` for modules which did not exist.

Returning a loader from `find_module` which cannot find the module will result in import errors on Python 2.x when using implicit relative imports.

* add changelog

* sanity/units/merge fixes

(cherry picked from commit 1c64dba3c9)
5 years ago