From a005998e82ae3910d75a73166be3c5f5450175bc Mon Sep 17 00:00:00 2001 From: bhimrazy Date: Mon, 10 Nov 2025 20:36:06 +0545 Subject: [PATCH 1/3] drop `3.9` --- .github/workflows/ci-checks.yml | 2 +- .github/workflows/ci-testing.yml | 2 +- pyproject.toml | 34 ++++++++------------------------ setup.py | 3 +-- 4 files changed, 11 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci-checks.yml b/.github/workflows/ci-checks.yml index 4fe3fe837..08c59d80c 100644 --- a/.github/workflows/ci-checks.yml +++ b/.github/workflows/ci-checks.yml @@ -30,7 +30,7 @@ jobs: testing-matrix: | { "os": ["ubuntu-latest", "macos-14", "windows-latest"], - "python-version": ["3.9", "3.10"] + "python-version": ["3.10", "3.11"] } check-docs: diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index ca415eccb..e9ab9eef1 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -19,7 +19,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-22.04", "macos-14", "windows-2022"] - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] exclude: - { os: "windows-2022", python-version: "3.13" } - { os: "windows-2022", python-version: "3.14" } diff --git a/pyproject.toml b/pyproject.toml index 81317cf38..834fa623a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,13 +13,10 @@ # limitations under the License. [build-system] -requires = [ - "setuptools", - "wheel", -] +requires = [ "setuptools", "wheel" ] [tool.ruff] -target-version = "py39" +target-version = "py310" line-length = 120 # Exclude a variety of commonly ignored directories. exclude = [ @@ -119,16 +116,8 @@ wrap-descriptions = 120 blank = true [tool.pytest.ini_options] -testpaths = [ - "tests", -] -norecursedirs = [ - ".git", - ".github", - "dist", - "build", - "docs", -] +testpaths = [ "tests" ] +norecursedirs = [ ".git", ".github", "dist", "build", "docs" ] addopts = [ "--strict-markers", "--doctest-modules", @@ -136,12 +125,8 @@ addopts = [ "--disable-pytest-warnings", "--ignore=legacy/checkpoints", ] -markers = [ - "cloud: Run the cloud tests for example", -] -filterwarnings = [ - "error::FutureWarning", -] +markers = [ "cloud: Run the cloud tests for example" ] +filterwarnings = [ "error::FutureWarning" ] xfail_strict = true junit_duration_report = "call" @@ -155,9 +140,7 @@ exclude_lines = [ ] [tool.mypy] -files = [ - "src", -] +files = [ "src" ] # This section is for folders with "-" as they are not valid python modules exclude = [ "src/litdata/utilities/_pytree.py", @@ -190,6 +173,5 @@ warn_no_return = "False" [[tool.mypy.overrides]] # the list can be generated with: # mypy --no-error-summary 2>&1 | tr ':' ' ' | awk '{print $1}' | sort | uniq | sed 's/\.py//g; s|src/||g; s|\/|\.|g' | xargs -I {} echo '"{}",' -module = [ -] +module = [ ] ignore_errors = "True" diff --git a/setup.py b/setup.py index e320d57d3..d391c1b77 100644 --- a/setup.py +++ b/setup.py @@ -71,7 +71,7 @@ def _prepare_extras(requirements_dir: str = _PATH_REQUIRES, skip_files: tuple = include_package_data=True, zip_safe=False, keywords=["deep learning", "pytorch", "AI", "streaming", "cloud", "data processing"], - python_requires=">=3.9", + python_requires=">=3.10", setup_requires=["wheel"], install_requires=_load_requirements(), extras_require=_prepare_extras(), @@ -95,7 +95,6 @@ def _prepare_extras(requirements_dir: str = _PATH_REQUIRES, skip_files: tuple = # Specify the Python versions you support here. In particular, ensure # that you indicate whether you support Python 2, Python 3 or both. "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", From 51634b8d023aa9ad6667e0e275d9f63bd6764c31 Mon Sep 17 00:00:00 2001 From: bhimrazy Date: Mon, 10 Nov 2025 20:39:09 +0545 Subject: [PATCH 2/3] add additional lint ignore rules for non-PEP 604 annotations --- pyproject.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 834fa623a..4a606d1ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,8 +45,10 @@ lint.extend-select = [ "SIM", # see: https://pypi.org/project/flake8-simplify ] lint.ignore = [ - "E731", # Do not assign a lambda expression, use a def - "S101", # todo: Use of `assert` detected + "E731", # Do not assign a lambda expression, use a def + "S101", # todo: Use of `assert` detected + "UP007", # todo: non-pep604-annotation-union + "UP045", # todo: non-pep604-annotation-optional ] lint.per-file-ignores."examples/**" = [ "D100", From 4a8bbd8196e8380f247fabea9d3baee3b835e405 Mon Sep 17 00:00:00 2001 From: bhimrazy Date: Mon, 10 Nov 2025 21:42:23 +0545 Subject: [PATCH 3/3] featspecify Python version for checks --- .github/workflows/ci-checks.yml | 1 + .github/workflows/docs-build.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/ci-checks.yml b/.github/workflows/ci-checks.yml index 08c59d80c..90dc12c01 100644 --- a/.github/workflows/ci-checks.yml +++ b/.github/workflows/ci-checks.yml @@ -37,6 +37,7 @@ jobs: uses: Lightning-AI/utilities/.github/workflows/check-docs.yml@main with: requirements-file: "requirements/docs.txt" + python-version: "3.10" check-md-links: uses: Lightning-AI/utilities/.github/workflows/check-md-links.yml@main diff --git a/.github/workflows/docs-build.yml b/.github/workflows/docs-build.yml index bbdcb8214..b36165296 100644 --- a/.github/workflows/docs-build.yml +++ b/.github/workflows/docs-build.yml @@ -11,6 +11,7 @@ jobs: uses: Lightning-AI/utilities/.github/workflows/check-docs.yml@main with: requirements-file: "requirements/docs.txt" + python-version: "3.10" # https://github.com/marketplace/actions/deploy-to-github-pages docs-deploy: