From d9a526f43aa3c4d4082b1d6b36cd2b698867fbcd Mon Sep 17 00:00:00 2001 From: Steven Loria Date: Thu, 17 Oct 2024 23:00:14 -0400 Subject: [PATCH] Support Python 3.9-3.13 (#297) --- .github/workflows/build-release.yml | 8 ++++---- CHANGELOG.rst | 8 ++++++++ pyproject.toml | 4 ++-- tests/test_doitlive.py | 7 ++++--- tox.ini | 2 +- 5 files changed, 19 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 06606fa..4c12d89 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -13,8 +13,8 @@ jobs: fail-fast: false matrix: include: - - { name: "3.8-ipython8", python: "3.8", tox: py38-ipython8 } - - { name: "3.12-ipython8", python: "3.12", tox: py12-ipython8 } + - { name: "3.9-ipython8", python: "3.9", tox: py39-ipython8 } + - { name: "3.13-ipython8", python: "3.13", tox: py13-ipython8 } steps: - uses: actions/checkout@v4.0.0 - uses: actions/setup-python@v5 @@ -30,7 +30,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.13" - name: Install pypa/build run: python -m pip install build - name: Build a binary wheel and a source tarball @@ -53,7 +53,7 @@ jobs: - uses: actions/checkout@v4.0.0 - uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.13" - run: python -m pip install tox - run: python -m tox -elint publish-to-pypi: diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8df96d4..868b21f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,14 @@ Changelog --------- +5.2.0 (unreleased) +****************** + +Other changes: + +- Drop support for Python 3.8. +- Test against Python 3.13. + 5.1.0 (2024-02-02) ****************** diff --git a/pyproject.toml b/pyproject.toml index 92f3bef..ac05ad7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,15 +10,15 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "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", "Environment :: Console", ] keywords = ["doitlive", "cli", "live", "coding", "presentations", "shell"] -requires-python = ">=3.8" +requires-python = ">=3.9" dependencies = [ "click>=8.0,<9", "click-completion>=0.3.1", diff --git a/tests/test_doitlive.py b/tests/test_doitlive.py index af76b09..f2611e2 100644 --- a/tests/test_doitlive.py +++ b/tests/test_doitlive.py @@ -300,9 +300,10 @@ def test_record_content(self, runner): assert 'echo "bar"' in content def test_header_content(self, runner): - with recording_session(runner, args=["--shell", "/bin/bash"]), open( - "session.sh" - ) as fp: + with ( + recording_session(runner, args=["--shell", "/bin/bash"]), + open("session.sh") as fp, + ): content = fp.read() assert "#doitlive shell: /bin/bash" in content diff --git a/tox.ini b/tox.ini index e87822b..d239629 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = lint,docs,py3{8,9,10,11,12}-ipython8 +envlist = lint,docs,py3{9,10,11,12,13}-ipython8 [testenv] deps: