Skip to content

Commit

Permalink
Drop Python 3.9 support (#6040)
Browse files Browse the repository at this point in the history
Contributes to rapidsai/build-planning#88

Finishes the work of dropping Python 3.9 support.

This project stopped building / testing against Python 3.9 as of rapidsai/shared-workflows#235.
This PR updates configuration and docs to reflect that.

## Notes for Reviewers

### How I tested this

Checked that there were no remaining uses like this:

```shell
git grep -E '3\.9'
git grep '39'
git grep 'py39'
```

And similar for variations on Python 3.8 (to catch things that were missed the last time this was done).

Authors:
  - James Lamb (https://github.com/jameslamb)

Approvers:
  - Bradley Dice (https://github.com/bdice)

URL: #6040
  • Loading branch information
jameslamb authored Aug 23, 2024
1 parent 4587f6a commit 2398624
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 16 deletions.
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ dependencies:
- pytest-cov
- pytest-xdist
- pytest==7.*
- python>=3.9,<3.12
- python>=3.10,<3.12
- raft-dask==24.10.*,>=0.0.0a0
- rapids-build-backend>=0.3.0,<0.4.0.dev0
- rapids-dask-dependency==24.10.*,>=0.0.0a0
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-125_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ dependencies:
- pytest-cov
- pytest-xdist
- pytest==7.*
- python>=3.9,<3.12
- python>=3.10,<3.12
- raft-dask==24.10.*,>=0.0.0a0
- rapids-build-backend>=0.3.0,<0.4.0.dev0
- rapids-dask-dependency==24.10.*,>=0.0.0a0
Expand Down
6 changes: 1 addition & 5 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -462,10 +462,6 @@ dependencies:
specific:
- output_types: conda
matrices:
- matrix:
py: "3.9"
packages:
- python=3.9
- matrix:
py: "3.10"
packages:
Expand All @@ -476,7 +472,7 @@ dependencies:
- python=3.11
- matrix:
packages:
- python>=3.9,<3.12
- python>=3.10,<3.12
test_libcuml:
common:
- output_types: conda
Expand Down
8 changes: 2 additions & 6 deletions python/cuml/cuml/internals/available_devices.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2022-2023, NVIDIA CORPORATION.
# Copyright (c) 2022-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -16,12 +16,8 @@
from cuml.internals.device_support import GPU_ENABLED
from cuml.internals.safe_imports import gpu_only_import_from, UnavailableError

try:
from functools import cache # requires Python >= 3.9
except ImportError:
from functools import lru_cache

cache = lru_cache(maxsize=None)
from functools import cache


def gpu_available_no_context_creation():
Expand Down
5 changes: 2 additions & 3 deletions python/cuml/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ authors = [
{ name = "NVIDIA Corporation" },
]
license = { text = "Apache 2.0" }
requires-python = ">=3.9"
requires-python = ">=3.10"
dependencies = [
"cudf==24.10.*,>=0.0.0a0",
"cupy-cuda11x>=12.0.0",
Expand All @@ -102,7 +102,6 @@ dependencies = [
classifiers = [
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
Expand Down Expand Up @@ -134,7 +133,7 @@ Documentation = "https://docs.rapids.ai/api/cuml/stable/"

[tool.black]
line-length = 79
target-version = ["py39"]
target-version = ["py310"]
include = '\.py?$'
force-exclude = '''
_stop_words\.py |
Expand Down

0 comments on commit 2398624

Please sign in to comment.