diff --git a/cibuildwheel/oci_container.py b/cibuildwheel/oci_container.py index 207177df..92548849 100644 --- a/cibuildwheel/oci_container.py +++ b/cibuildwheel/oci_container.py @@ -21,7 +21,7 @@ from typing import IO, Literal, Self, assert_never from .ci import CIProvider, detect_ci_provider from .errors import OCIEngineTooOldError from .logger import log -from .typing import PathOrStr, PopenBytes +from .typing import PathOrStr from .util.cmd import call from .util.helpers import FlexibleVersion, parse_key_value_string, strtobool @@ -164,7 +164,7 @@ class OCIContainer: UTILITY_PYTHON = "/opt/python/cp39-cp39/bin/python" - process: PopenBytes + process: subprocess.Popen[bytes] bash_stdin: IO[bytes] bash_stdout: IO[bytes] diff --git a/cibuildwheel/typing.py b/cibuildwheel/typing.py index c9b76fde..026deeaa 100644 --- a/cibuildwheel/typing.py +++ b/cibuildwheel/typing.py @@ -1,24 +1,17 @@ from __future__ import annotations import os -import subprocess import typing -from typing import Final, Literal, Protocol, Union +from typing import Final, Literal, Protocol __all__ = ( "PLATFORMS", "PathOrStr", "PlatformName", - "PopenBytes", ) -if typing.TYPE_CHECKING: - PopenBytes = subprocess.Popen[bytes] - PathOrStr = str | os.PathLike[str] -else: - PopenBytes = subprocess.Popen - PathOrStr = Union[str, "os.PathLike[str]"] +PathOrStr = str | os.PathLike[str] PlatformName = Literal["linux", "macos", "windows", "pyodide"]