From b1bec138033385653f42606a95af79a184dd08a5 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sat, 19 Oct 2024 17:13:49 +0300 Subject: [PATCH] Drop support for Python 3.8 (#122) --- .github/workflows/tests.yml | 6 ++---- pyproject.toml | 3 +-- sphinxlint/rst.py | 4 ++-- tox.ini | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 71777ee67..1cad23ea0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,14 +19,12 @@ jobs: matrix: # when adding new versions, update the one used to test # friend projects below to the latest one - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] os: [ubuntu-latest, macos-latest, windows-latest] test-set: [base] include: - {python-version: "3.13", os: ubuntu-latest, test-set: friend-projects} - exclude: - # TODO Add Windows when regex wheel available for 3.13 - - {os: windows-latest, python-version: "3.13"} + - {python-version: "3.13", os: windows-latest, test-set: friend-projects} steps: - uses: actions/checkout@v4 diff --git a/pyproject.toml b/pyproject.toml index a686e8176..31898e6e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,14 +14,13 @@ authors = [ {name = "Georg Brandl", email = "georg@python.org"}, {name = "Julien Palard", email = "julien@palard.fr"}, ] -requires-python = ">= 3.8" +requires-python = ">= 3.9" classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Python Software Foundation License", "Natural Language :: English", "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", diff --git a/sphinxlint/rst.py b/sphinxlint/rst.py index 2b35a9b04..4c8c02617 100644 --- a/sphinxlint/rst.py +++ b/sphinxlint/rst.py @@ -5,7 +5,7 @@ - All compiled regexes are suffixed by _RE """ -from functools import lru_cache +from functools import cache import regex as re @@ -153,7 +153,7 @@ UNICODE_ALLOWED_AFTER_INLINE_MARKUP = r"\p{Pe}\p{Pi}\p{Pf}\p{Pd}\p{Po}" -@lru_cache(maxsize=None) +@cache def inline_markup_gen(start_string, end_string, extra_allowed_before=""): """Generate a regex matching an inline markup. diff --git a/tox.ini b/tox.ini index e616fc791..b69aaa890 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ requires = tox>=4.2 env_list = lint - py{py3, 313, 312, 311, 310, 39, 38} + py{py3, 313, 312, 311, 310, 39} [testenv] extras =