From 17a5eb0f601b2b8bd35214a6aa9329b0da2ac324 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Thu, 1 Oct 2026 18:24:35 +0300 Subject: [PATCH] Drop support for EOL Python 3.10 --- .github/workflows/test.yml | 2 +- pyproject.toml | 3 +-- src/blurb/_versions.py | 18 +----------------- tests/test_parser.py | 2 +- tox.ini | 2 +- 5 files changed, 5 insertions(+), 22 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 96e5c5e..c070633 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"] + python-version: ["3.11", "3.12", "3.13", "3.14", "3.15"] steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 diff --git a/pyproject.toml b/pyproject.toml index 23a6389..301e8d7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,12 +13,11 @@ maintainers = [ { name = "Python Core Team" } ] authors = [ { name = "Larry Hastings", email = "larry@hastings.org" }, ] -requires-python = ">=3.10" +requires-python = ">=3.11" classifiers = [ "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", diff --git a/src/blurb/_versions.py b/src/blurb/_versions.py index c3e03eb..e4d326e 100644 --- a/src/blurb/_versions.py +++ b/src/blurb/_versions.py @@ -1,23 +1,7 @@ from __future__ import annotations import glob -import sys - -if sys.version_info[:2] >= (3, 11): - from contextlib import chdir -else: - import os - - class chdir: - def __init__(self, path: str, /) -> None: - self.path = path - - def __enter__(self) -> None: - self.previous_cwd = os.getcwd() - os.chdir(self.path) - - def __exit__(self, *args) -> None: - os.chdir(self.previous_cwd) +from contextlib import chdir def glob_versions() -> list[str]: diff --git a/tests/test_parser.py b/tests/test_parser.py index 1b063e3..89a255a 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -1,10 +1,10 @@ import glob import os +from contextlib import chdir import pytest from blurb._blurb_file import Blurbs -from blurb._versions import chdir class TestParserPasses: diff --git a/tox.ini b/tox.ini index 4868997..80c441e 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ requires = tox>=4.32 env_list = - py{310-315} + py{311-315} [testenv] extras =