Skip to content

Commit

Permalink
Drop Python 3.8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
stotko committed Nov 12, 2024
1 parent 21989de commit 591b29d
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 31 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: '**/*requirements.txt'
python-version: "3.12"
cache: "pip"
cache-dependency-path: "**/*requirements.txt"

- name: Install torch CPU-only version
run: python -m pip install -r .github/torch_cpu_requirements.txt
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: re-actors/alls-green@release/v1
with:
allowed-skips: publish
jobs: ${{ toJSON(needs) }}
- uses: re-actors/alls-green@release/v1
with:
allowed-skips: publish
jobs: ${{ toJSON(needs) }}
12 changes: 6 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
python: ["3.9", "3.10", "3.11", "3.12"]

name: "Python ${{ matrix.python }}"
runs-on: ubuntu-22.04
Expand All @@ -29,8 +29,8 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: 'pip'
cache-dependency-path: '**/*requirements.txt'
cache: "pip"
cache-dependency-path: "**/*requirements.txt"

- name: Install torch CPU-only version
run: python -m pip install -r .github/torch_cpu_requirements.txt
Expand All @@ -51,6 +51,6 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
8 changes: 4 additions & 4 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: re-actors/alls-green@release/v1
with:
allowed-skips: publish-test, publish
jobs: ${{ toJSON(needs) }}
- uses: re-actors/alls-green@release/v1
with:
allowed-skips: publish-test, publish
jobs: ${{ toJSON(needs) }}
14 changes: 7 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ['ubuntu-22.04', 'windows-2022']
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
os: ["ubuntu-22.04", "windows-2022"]
python: ["3.9", "3.10", "3.11", "3.12"]

name: "${{ matrix.os }} / Python ${{ matrix.python }}"
runs-on: ${{ matrix.os }}
Expand All @@ -30,8 +30,8 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: 'pip'
cache-dependency-path: '**/*requirements.txt'
cache: "pip"
cache-dependency-path: "**/*requirements.txt"

- name: Install torch CPU-only version
run: python -m pip install -r .github/torch_cpu_requirements.txt
Expand Down Expand Up @@ -60,6 +60,6 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ CharonLoad reduces the burden to start writing and experimenting with custom GPU

## Installation

CharonLoad requires **Python >=3.8** and can be installed from PyPI:
CharonLoad requires **Python >=3.9** and can be installed from PyPI:

```sh
pip install charonload
Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.4"
authors = [{ name = "Patrick Stotko", email = "[email protected]" }]
description = "Develop C++/CUDA extensions with PyTorch like Python scripts"
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9"
dependencies = [
"cmake>=3.27",
'ninja ; platform_system != "Windows"',
Expand All @@ -21,7 +21,6 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: C++",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down Expand Up @@ -92,7 +91,7 @@ line-length = 120
[tool.isort]
profile = "black"
multi_line_output = 3
py_version = 38
py_version = 39


[tool.docformatter]
Expand Down
3 changes: 2 additions & 1 deletion src/charonload/_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
import subprocess
import sys
from abc import ABC, abstractmethod
from typing import IO, TYPE_CHECKING, Iterable, Iterator, Literal
from typing import IO, TYPE_CHECKING, Literal

import colorama

from ._errors import CommandNotFoundError

if TYPE_CHECKING: # pragma: no cover
from collections.abc import Iterable, Iterator
from types import TracebackType

from ._compat.typing import Self
Expand Down
4 changes: 2 additions & 2 deletions src/charonload/_version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import importlib.metadata
from typing import Tuple, cast
from typing import cast


def _version() -> str:
Expand All @@ -15,7 +15,7 @@ def _is_compatible(ver1: str, ver2: str) -> bool:
def _str_to_tuple(ver: str) -> tuple[int, int, int]:
components = list(map(int, ver.split(".")))
components = [*components, 0, 0][:3]
return cast(Tuple[int, int, int], tuple(components)) # typing.Tuple required for Python 3.8
return cast(tuple[int, int, int], tuple(components))


def _same_minor_version(ver1: tuple[int, int, int], ver2: tuple[int, int, int]) -> bool:
Expand Down

0 comments on commit 591b29d

Please sign in to comment.