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

Restore support for Python 3.9 #21

Merged
merged 7 commits into from
May 3, 2024
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/checks-and-builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
needs: check-style
runs-on: ubuntu-latest
container:
image: rapidsai/ci-conda:latest
image: rapidsai/ci-conda:cuda12.2.2-ubuntu22.04-py3.9
env:
PUBLISH: "${{ inputs.publish }}"
steps:
Expand All @@ -42,7 +42,7 @@ jobs:
needs: check-style
runs-on: ubuntu-latest
container:
image: rapidsai/ci-wheel:latest
image: rapidsai/ci-wheel:cuda12.2.2-ubuntu20.04-py3.9
env:
PUBLISH: "${{ inputs.publish }}"
RAPIDS_CONDA_TOKEN: ${{ secrets.CONDA_RAPIDSAI_WHEELS_NIGHTLY_TOKEN }}
Expand Down
10 changes: 6 additions & 4 deletions rapids_build_backend/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@
from .utils import _get_pyproject

if TYPE_CHECKING:
from typing import Callable
from typing import Callable, Union

# config options can be one of these types...
config_val_type = str | bool | None
config_val_type = Union[str, bool, None]

# ... or a callable that returns one of those or some other mutable types
mutable_config_val_type = list[str]
config_val_callable = Callable[[], config_val_type | mutable_config_val_type]
config_val_callable = Callable[[], Union[config_val_type, mutable_config_val_type]]

config_options_type = dict[str, tuple[config_val_type | config_val_callable, bool]]
config_options_type = dict[
str, tuple[Union[config_val_type, config_val_callable], bool]
]


class Config:
Expand Down
3 changes: 2 additions & 1 deletion rapids_build_backend/impls.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from contextlib import contextmanager
from functools import lru_cache
from importlib import import_module
from typing import Union

import rapids_dependency_file_generator
import tomli_w
Expand Down Expand Up @@ -99,7 +100,7 @@ def _get_cuda_suffix(require_cuda=False) -> str:


@lru_cache
def _get_git_commit() -> str | None:
def _get_git_commit() -> Union[str, None]:
"""Get the current git commit.

Returns None if git is not in the PATH or if it fails to find the commit.
Expand Down