Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions ci/tools/merge_cuda_core_wheels.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

Expand All @@ -27,10 +27,9 @@
import tempfile
import zipfile
from pathlib import Path
from typing import List


def run_command(cmd: List[str], cwd: Path | None = None, env: dict = os.environ) -> subprocess.CompletedProcess:
def run_command(cmd: list[str], cwd: Path | None = None, env: dict = os.environ) -> subprocess.CompletedProcess:
"""Run a command with error handling."""
print(f"Running: {' '.join(cmd)}")
if cwd:
Expand Down Expand Up @@ -78,7 +77,7 @@ def print_wheel_directory_structure(wheel_path: Path, filter_prefix: str = "cuda
print(f"Warning: Could not list wheel contents: {e}", file=sys.stderr)


def merge_wheels(wheels: List[Path], output_dir: Path, show_wheel_contents: bool = True) -> Path:
def merge_wheels(wheels: list[Path], output_dir: Path, show_wheel_contents: bool = True) -> Path:
"""Merge multiple wheels into a single wheel with version-specific binaries."""
print("\n=== Merging wheels ===", file=sys.stderr)
print(f"Input wheels: {[w.name for w in wheels]}", file=sys.stderr)
Expand Down
3 changes: 1 addition & 2 deletions cuda_core/tests/helpers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import functools
import os
from typing import Union

from cuda.core._utils.cuda_utils import handle_return
from cuda.pathfinder import get_cuda_path_or_home
Expand All @@ -23,7 +22,7 @@


@functools.cache
def supports_ipc_mempool(device_id: Union[int, object]) -> bool:
def supports_ipc_mempool(device_id: int | object) -> bool:
"""Return True if mempool IPC via POSIX file descriptor is supported.

Uses cuDeviceGetAttribute(CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES)
Expand Down
4 changes: 2 additions & 2 deletions cuda_python_test_helpers/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

[build-system]
Expand All @@ -12,7 +12,7 @@ description = "Shared test helpers for CUDA Python projects"
readme = {file = "README.md", content-type = "text/markdown"}
authors = [{ name = "NVIDIA Corporation" }]
license = "Apache-2.0"
requires-python = ">=3.9"
requires-python = ">=3.10"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Operating System :: POSIX :: Linux",
Expand Down
9 changes: 4 additions & 5 deletions toolshed/make_site_packages_libdirs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import re
import sys
from pathlib import Path
from typing import Dict, Set

sys.path.insert(0, str(Path(__file__).resolve().parent))
from _catalog_writer import load_catalog, update_specs, write_catalog
Expand All @@ -31,8 +30,8 @@ def _strip_site_packages_prefix(p: str) -> str:
return _SITE_PACKAGES_RE.sub("", p)


def _parse_lines_linux(lines: list[str]) -> Dict[str, Set[str]]:
d: Dict[str, Set[str]] = {}
def _parse_lines_linux(lines: list[str]) -> dict[str, set[str]]:
d: dict[str, set[str]] = {}
for raw in lines:
line = raw.strip()
if not line or line.startswith("#"):
Expand Down Expand Up @@ -63,9 +62,9 @@ def _extract_libname_from_dll(fname: str) -> str | None:
return name or None


def _parse_lines_windows(lines: list[str]) -> Dict[str, Set[str]]:
def _parse_lines_windows(lines: list[str]) -> dict[str, set[str]]:
"""Collect {libname: set(dirnames)} with deduped directories."""
m: Dict[str, Set[str]] = {}
m: dict[str, set[str]] = {}
for raw in lines:
line = raw.strip()
if not line or line.startswith("#"):
Expand Down
Loading