Mirror of mitogen
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
Alex Willmer d2ca8a9423 master.ParentEnumerationMethod: Require matching pkg.__name__
Co-authored-by: Stefano Rivera <stefano@rivera.za.net>

When the requested module (e.g. ansible.module_utils.distro)
- is provided by another module *e.g. distro)
- that itself was a package (e.g. distro 1.7.0)

At runtime
- ansible/module_utils/distro/__init__.py executes
- if https://pypi.org/project/distro/ is present, it's loaded as
ansible.module_utils.distro
- otherwise ansible/module_utils/distro/_distro.py is loaded

ParentEnumerationMethod would wrongly use whatever was in
sys.modules['ansible.module_utils.distro]. Instead we should ascend to
the first parent that has fullname == sys.modules[fullname].__name__.
Then descend to the appropriate .py file on disk.

This bug didn't show up before because until distro 1.7.0 (Feb 2022) the
top-level distro module was a module (distro.py) not a package
(distro/__init__.py)

fixes #906
3 years ago
.ci ci: Drop Mac1014 jobs 3 years ago
.github chore: Add issue templates for 0.2 vs 0.3 releases 4 years ago
ansible_mitogen issue #874 support for ansible core 2.12 aka. ansible community 5.0 3 years ago
docs master.ParentEnumerationMethod: Require matching pkg.__name__ 3 years ago
examples Fix up another handful of LGTM errors. 5 years ago
mitogen master.ParentEnumerationMethod: Require matching pkg.__name__ 3 years ago
scripts remove unused imports flagged by lgtm 5 years ago
tests Revert "Revert "fixed tests for ansible 2.12"" 3 years ago
.gitignore Add tests/ansible/.*.pid to gitignore (for ansible_mitogen/process.py) 5 years ago
.lgtm.yml Whoops, merge together lgtm.yml and .lgtm.yml 5 years ago
LICENSE Bump copyright year and use generic author name (testing Travis) 4 years ago
MANIFEST.in setup.py: include LICENSE; closes #538. 6 years ago
README.md Abandon Travis CI We have no credits, and its a PITA to maintain two CI platforms. The tests running on Travis provide very little extra coverage vs Azure Pipelines alone 3 years ago
dev_requirements.txt Split dev_requirements.txt up according to test mode. 6 years ago
preamble_size.py mitogen.parent: Remove tabs from minimized first stage 3 years ago
run_tests Allow independant control of coverage erase and reporting 6 years ago
setup.cfg Declare universal wheel support 4 years ago
setup.py Fix Trove classifier, bump version 3 years ago
tox.ini run ansible 5 tests only w/ py39 3 years ago

README.md