PHP 8.2.30
Preview: py312.py Size: 364 B
//opt/hc_python/lib/python3.12/site-packages/importlib_resources/tests/compat/py312.py

import contextlib

from .py39 import import_helper


@contextlib.contextmanager
def isolated_modules():
    """
    Save modules on entry and cleanup on exit.
    """
    (saved,) = import_helper.modules_setup()
    try:
        yield
    finally:
        import_helper.modules_cleanup(saved)


vars(import_helper).setdefault('isolated_modules', isolated_modules)

Directory Contents

Dirs: 1 × Files: 3

Name Size Perms Modified Actions
- drwxr-xr-x 2025-04-04 08:01:59
Edit Download
441 B lrw-r--r-- 2025-04-04 08:01:59
Edit Download
364 B lrw-r--r-- 2025-04-04 08:01:59
Edit Download
0 B lrw-r--r-- 2025-04-04 08:01:59
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).