PHP 8.0.30
Preview: command_context.py Size: 774 B
/opt/cloudlinux/venv/lib/python3.11/site-packages/pip/_internal/cli/command_context.py

from contextlib import ExitStack, contextmanager
from typing import ContextManager, Generator, TypeVar

_T = TypeVar("_T", covariant=True)


class CommandContextMixIn:
    def __init__(self) -> None:
        super().__init__()
        self._in_main_context = False
        self._main_context = ExitStack()

    @contextmanager
    def main_context(self) -> Generator[None, None, None]:
        assert not self._in_main_context

        self._in_main_context = True
        try:
            with self._main_context:
                yield
        finally:
            self._in_main_context = False

    def enter_context(self, context_provider: ContextManager[_T]) -> _T:
        assert self._in_main_context

        return self._main_context.enter_context(context_provider)

Directory Contents

Dirs: 1 × Files: 13

Name Size Perms Modified Actions
- drwxr-xr-x 2026-07-22 02:19:43
Edit Download
6.70 KB lrw-r--r-- 2026-06-16 08:49:16
Edit Download
8.09 KB lrw-r--r-- 2026-06-16 08:49:16
Edit Download
29.40 KB lrw-r--r-- 2026-06-16 08:49:16
Edit Download
774 B lrw-r--r-- 2026-06-16 08:49:16
Edit Download
5.50 KB lrw-r--r-- 2026-06-16 08:49:16
Edit Download
2.75 KB lrw-r--r-- 2026-06-16 08:49:16
Edit Download
4.24 KB lrw-r--r-- 2026-06-16 08:49:16
Edit Download
10.57 KB lrw-r--r-- 2026-06-16 08:49:16
Edit Download
2.66 KB lrw-r--r-- 2026-06-16 08:49:16
Edit Download
11.96 KB lrw-r--r-- 2026-06-16 08:49:16
Edit Download
5.00 KB lrw-r--r-- 2026-06-16 08:49:16
Edit Download
116 B lrw-r--r-- 2026-06-16 08:49:16
Edit Download
132 B lrw-r--r-- 2026-06-16 08:49:16
Edit Download

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