From 05d233bcdfe33e4c702d57d4ddc8a256c0b341b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Taha=20=C3=96ztop?= Date: Thu, 20 Nov 2025 00:07:08 +0300 Subject: [PATCH] Add Python 3.12 and 3.13 support --- .github/workflows/lint-and-test.yml | 3 +++ pyproject.toml | 4 ++-- setup.py | 32 +++++++++++++++-------------- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/.github/workflows/lint-and-test.yml b/.github/workflows/lint-and-test.yml index d7132a4ff0..194518c8f1 100644 --- a/.github/workflows/lint-and-test.yml +++ b/.github/workflows/lint-and-test.yml @@ -239,11 +239,14 @@ jobs: - {PYTHON: 3.9, OS: ubuntu-latest, NAME: "CPython 3.9 (ubuntu)", EXPECT: "Linux"} - {PYTHON: "3.10", OS: ubuntu-latest, NAME: "CPython 3.10 (ubuntu)", EXPECT: "Linux"} - {PYTHON: "3.11", OS: ubuntu-latest, NAME: "CPython 3.11 (ubuntu)", EXPECT: "Linux"} + - {PYTHON: "3.12", OS: ubuntu-latest, NAME: "CPython 3.12 (ubuntu)", EXPECT: "Linux"} + - {PYTHON: "3.13", OS: ubuntu-latest, NAME: "CPython 3.13 (ubuntu)", EXPECT: "Linux"} - {PYTHON: 'pypy-3.7', OS: ubuntu-latest, NAME: "PyPy 3.7 (ubuntu)", EXPECT: "Linux"} - {PYTHON: 'pypy-3.8', OS: ubuntu-latest, NAME: "PyPy 3.8 (ubuntu)", EXPECT: "Linux"} - {PYTHON: 'pypy-3.9', OS: ubuntu-latest, NAME: "PyPy 3.9 (ubuntu)", EXPECT: "Linux"} - {PYTHON: 'pypy-3.10', OS: ubuntu-latest, NAME: "PyPy 3.10 (ubuntu)", EXPECT: "Linux"} - {PYTHON: '3.11', OS: macos-latest, NAME: "CPython 3.11 (macos)", EXPECT: "MacOS"} + - {PYTHON: '3.13', OS: macos-latest, NAME: "CPython 3.13 (macos)", EXPECT: "MacOS"} env: EXPECT: ${{ matrix.env.EXPECT }} PYTHON: ${{ matrix.env.PYTHON }} diff --git a/pyproject.toml b/pyproject.toml index f01695735c..9cd534a4dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.black] # Default line-length, but use explicit value here since used for isort & ruff line-length = 88 -target-version = ['py37'] +target-version = ['py37', 'py38', 'py39', 'py310', 'py311', 'py312', 'py313'] [tool.coverage.run] branch = true @@ -149,7 +149,7 @@ filterwarnings = [ [tool.ruff] line-length = 88 -target-version = "py37" +target-version = "py37" # Minimum supported version exclude = [ ".git", "__pycache__", diff --git a/setup.py b/setup.py index 16a702930c..4e06cb72b9 100644 --- a/setup.py +++ b/setup.py @@ -18,21 +18,21 @@ def long_description(): testing_minimal_deps = [ - "pytest>=7.4.0,<8.0.0", # 8.0.0 drops support for Python 3.7 - "pytest-mock>=3.10.0,<3.12.0", # 3.12.0 drops support for Python 3.7 + "pytest>=7.4.0", + "pytest-mock>=3.10.0", ] testing_plugin_deps = [ - "pytest-cov>=4.0.0,<5.0.0", # 5.0.0 drops support for Python 3.7 (6.0.0 drops 3.8) + "pytest-cov>=4.0.0", ] testing_deps = testing_minimal_deps + testing_plugin_deps linting_deps = [ - "isort~=5.11.0,<5.12.0", # 5.12.0 drops support for Python 3.7, 6.0.0 drops 3.8 - "black==23.3.0", # Later versions drop support for Python 3.7 - "ruff==0.0.267", - "codespell[toml]==2.2.5,<2.2.6", # 2.2.6 drops support for Python 3.7 + "isort>=5.11.0", + "black>=23.3.0", + "ruff>=0.0.267", + "codespell[toml]>=2.2.5", "typos>=1.32.0", ] @@ -42,7 +42,7 @@ def long_description(): typing_deps = [ "lxml-stubs", - "mypy~=1.8.0", # >=1.9.0 requires Python 3.8+, >=1.15.0 requires 3.9+ + "mypy>=1.8.0", "types-beautifulsoup4", "types-pygments", "types-python-dateutil", @@ -76,6 +76,8 @@ def long_description(): "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ], @@ -85,7 +87,7 @@ def long_description(): "Issues": "https://github.com/zulip/zulip-terminal/issues", "Hot Keys": "https://github.com/zulip/zulip-terminal/blob/main/docs/hotkeys.md", }, - python_requires=">=3.7, <3.12", + python_requires=">=3.7, <3.14", keywords="", packages=find_packages(exclude=["tests", "tests.*"]), zip_safe=True, @@ -106,15 +108,15 @@ def long_description(): tests_require=testing_deps, install_requires=[ "urwid~=2.1.2", - "zulip>=0.8.2,<0.9.0", # Next release, 0.9.0, requires Python 3.9 + "zulip>=0.8.2", "urwid_readline>=0.15.1", "beautifulsoup4>=4.13.4", - "lxml==4.9.4", - "pygments>=2.17.2,<2.18.0", # 2.18.0 will drop support for Python 3.7 - "typing_extensions~=4.5.0", + "lxml>=4.9.4", + "pygments>=2.17.2", + "typing_extensions>=4.5.0", "python-dateutil>=2.8.2", - "pytz>=2025", # Can use native support from Python 3.9 onwards - "tzlocal>=5.0,<5.1", # 5.1 will drop support for Python 3.7 + "pytz>=2025", + "tzlocal>=5.0", "pyperclip>=1.9.0", ], )