From 5ed3bea3f9992ec6c3af229bda828c3e2bb60a66 Mon Sep 17 00:00:00 2001 From: Dan LaManna Date: Mon, 25 May 2026 12:53:49 -0400 Subject: [PATCH 1/2] Add Python 3.14 and drop 3.10/3.11 support Update the CI matrix, ruff target version, and packaging metadata to support Python 3.12-3.14. --- .github/workflows/ci.yml | 2 +- pyproject.toml | 2 +- setup.py | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index db1d4db..7cf3c68 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ["3.10", "3.11", "3.12", "3.13"] + python-version: ["3.12", "3.13", "3.14"] os: [ ubuntu-latest, windows-latest, macos-latest ] steps: - uses: actions/checkout@v3 diff --git a/pyproject.toml b/pyproject.toml index fa822c6..de03ce0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" [tool.ruff] line-length = 100 -target-version = "py39" +target-version = "py312" extend-exclude = ["typings"] [tool.ruff.lint] diff --git a/setup.py b/setup.py index b56be79..3efdceb 100644 --- a/setup.py +++ b/setup.py @@ -29,13 +29,12 @@ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Programming Language :: Python", ], - python_requires=">=3.10", + python_requires=">=3.12", packages=find_packages(), entry_points={"console_scripts": ["isic = isic_cli.cli:main"]}, install_requires=[ From 03ee6ec6754f8380fb08a777d77f1a7c2e015fe1 Mon Sep 17 00:00:00 2001 From: Dan LaManna Date: Mon, 25 May 2026 12:58:13 -0400 Subject: [PATCH 2/2] Fix linting errors from targeting py312 --- isic_cli/cli/__init__.py | 4 +--- isic_cli/cli/image.py | 2 +- isic_cli/cli/types.py | 16 ++++++++++++---- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/isic_cli/cli/__init__.py b/isic_cli/cli/__init__.py index 4ced449..056e43a 100644 --- a/isic_cli/cli/__init__.py +++ b/isic_cli/cli/__init__.py @@ -214,9 +214,7 @@ def main(): click.echo(f'isic-cli: v{get_version() or "-"}', err=True) click.echo(f"python: v{platform.python_version()}", err=True) - click.echo( - f"time: {datetime.datetime.now(tz=datetime.timezone.utc).isoformat()}", err=True - ) + click.echo(f"time: {datetime.datetime.now(tz=datetime.UTC).isoformat()}", err=True) click.echo(f"os: {platform.platform()}", err=True) click.echo(f"env: {env}", err=True) click.echo(f"user: {user}", err=True) diff --git a/isic_cli/cli/image.py b/isic_cli/cli/image.py index 7b030e4..9f80262 100644 --- a/isic_cli/cli/image.py +++ b/isic_cli/cli/image.py @@ -44,7 +44,7 @@ def cleanup_partially_downloaded_files(directory: Path) -> None: # its final destination after listing it but before unlinking. try: p.unlink(missing_ok=True) - except PermissionError: # noqa: PERF203 + except PermissionError: # frequently on windows this is raised. it appears like this could be caused by # antivirus or various indexers that attempt to use the file shortly after it's # created. diff --git a/isic_cli/cli/types.py b/isic_cli/cli/types.py index cc643d0..88ff534 100644 --- a/isic_cli/cli/types.py +++ b/isic_cli/cli/types.py @@ -50,7 +50,7 @@ def convert(self, value, param, ctx): for collection_id in collection_ids: try: get_collection(ctx.obj.session, collection_id) - except HTTPError as e: # noqa: PERF203 + except HTTPError as e: if e.response.status_code == 404: append = "" if not ctx.obj.user: @@ -82,13 +82,19 @@ def convert(self, value: str, param, ctx) -> str: except HTTPError as e: if e.response.status_code == 404: self.fail( - f"Collection {value} does not exist or you don't have access to it.", param, ctx + f"Collection {value} does not exist or you don't have access to it.", + param, + ctx, ) else: raise if collection["locked"] and not self.locked_okay: - click.secho(f'"{collection["name"]}" is locked for modifications.', err=True, fg="red") + click.secho( + f'"{collection["name"]}" is locked for modifications.', + err=True, + fg="red", + ) sys.exit(1) return value @@ -105,7 +111,9 @@ def convert(self, value: str, param, ctx) -> str: except HTTPError as e: if e.response.status_code == 404: self.fail( - f"Cohort {value} does not exist or you don't have access to it.", param, ctx + f"Cohort {value} does not exist or you don't have access to it.", + param, + ctx, ) else: raise