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

Leverage importlib.reload for reloading modules #11679

Merged
merged 8 commits into from Sep 13, 2023

Commits on Sep 7, 2023

  1. Leverage importlib.reload for reloading modules

    Rather than directly manipulating `sys.modules` ourselves, rely on
    `importlib.reload` to do it, as it works in more cases (particularly for
    Rust extension modules built with PyO3).
    
    Also, import modules with `typing.TYPE_CHECKING` set to `False` first,
    and reload them with it set to `True`. This way, if the reload fails,
    things are likely to still be in a valid state from the first,
    successful import.
    godlygeek committed Sep 7, 2023
    Copy the full SHA
    c727fcc View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2023

  1. Copy the full SHA
    ca51520 View commit details
    Browse the repository at this point in the history
  2. Add escape hatch

    AA-Turner committed Sep 13, 2023
    Copy the full SHA
    e909d52 View commit details
    Browse the repository at this point in the history
  3. Cython

    AA-Turner committed Sep 13, 2023
    Copy the full SHA
    159ac90 View commit details
    Browse the repository at this point in the history
  4. KeyError

    AA-Turner committed Sep 13, 2023
    Copy the full SHA
    98c53e0 View commit details
    Browse the repository at this point in the history
  5. Merge branch 'master' into leverage_importlib_reload

    # Conflicts:
    #	tests/test_ext_autodoc.py
    AA-Turner committed Sep 13, 2023
    Copy the full SHA
    5320222 View commit details
    Browse the repository at this point in the history
  6. CHANGES

    AA-Turner committed Sep 13, 2023
    Copy the full SHA
    6fb5d9c View commit details
    Browse the repository at this point in the history
  7. Swap

    AA-Turner committed Sep 13, 2023
    Copy the full SHA
    ec974cd View commit details
    Browse the repository at this point in the history