Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

master.ParentEnumerationMethod: Require matching pkg.__name__ #913

Merged
merged 6 commits into from
Mar 29, 2022

Commits on Mar 28, 2022

  1. Fix Trove classifier, bump version

    fixes mitogen-hq#891
    
    (cherry picked from commit 1a84184)
    moreati authored and willmerae committed Mar 28, 2022
    Configuration menu
    Copy the full SHA
    e8c3fe7 View commit details
    Browse the repository at this point in the history
  2. Start v0.3.3 development

    willmerae committed Mar 28, 2022
    Configuration menu
    Copy the full SHA
    5b8f7dd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    60c4ae5 View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2022

  1. Configuration menu
    Copy the full SHA
    0fa0a93 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    47699e1 View commit details
    Browse the repository at this point in the history
  3. master.ParentEnumerationMethod: Require matching pkg.__name__

    Co-authored-by: Stefano Rivera <[email protected]>
    
    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 mitogen-hq#906
    willmerae committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    d2ca8a9 View commit details
    Browse the repository at this point in the history