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

building: force the runtime hook execution order based on filenames #7012

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Commits on Aug 2, 2022

  1. building: force the runtime hook execution order based on filenames

    Force the execution order of runtime hooks that are tied to
    imported modules and packages by sorting them by their filename
    (basename). This gives us stable and predictable execution order;
    up until now, the order depended on the order modules appeared
    in the modulegraph, i.e., on the order of imports made in the
    program.
    
    It also gives us the ability to force execution of some hooks
    before other hooks, and conversely, force execution of some hooks
    after all other hooks, by giving them appropriate names.
    
    For example, a runtime hook named `pyi_rth_000_00_mymod_early.py`
    should be executed first (right after custom runtime hooks), while
    the one named `pyi_rth_zzz_00_mymod_late.py` should be executed last;
    regardless of the names used by potential 3rd party runtime hooks,
    as long as they adhere to the `pyi_rth_` prefix.
    rokm committed Aug 2, 2022
    Configuration menu
    Copy the full SHA
    0de212f View commit details
    Browse the repository at this point in the history