From b2e0c6f8bd79b9fbd7af98a98c50f6162e970de7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 20 Mar 2025 20:11:27 +0000 Subject: [PATCH 1/4] chore(deps): update dependency python to 3.13 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c3406a9..9df2f28 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: - name: Set up Python uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 with: - python-version: "3.9" + python-version: "3.13" - id: cache uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2 From 51a3b1c1e0ece6e941bc7973a84e847ce53eac7b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 20 Mar 2025 20:12:04 +0000 Subject: [PATCH 2/4] chore(deps): update dependency python to 3.13 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c3406a9..9df2f28 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: - name: Set up Python uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 with: - python-version: "3.9" + python-version: "3.13" - id: cache uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2 From 3fb44dcc652408be8770bff94fe17335de2b0dc7 Mon Sep 17 00:00:00 2001 From: James Kachel Date: Thu, 20 Mar 2025 15:13:27 -0500 Subject: [PATCH 3/4] `pkg_resources` was deprecated in Python 3.12, switch to `packaging` instead --- release.py | 4 ++-- requirements.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/release.py b/release.py index a311e8f..6c47ea0 100644 --- a/release.py +++ b/release.py @@ -4,7 +4,7 @@ import os from subprocess import CalledProcessError -from pkg_resources import parse_version +from packaging.version import parse from async_subprocess import ( call, @@ -235,7 +235,7 @@ async def release( working_dir=working_dir, readonly=False, ) - if parse_version(old_version) >= parse_version(new_version): + if parse(old_version) >= parse(new_version): raise ReleaseException( f"old version is {old_version} but the new version {new_version} is not newer" ) diff --git a/requirements.txt b/requirements.txt index 15f9f74..414cc24 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,3 +4,4 @@ requests sentry-sdk tornado virtualenv +packaging From f5961cfec44eb28e0eb52ad76a6596164fbf3be0 Mon Sep 17 00:00:00 2001 From: James Kachel Date: Fri, 21 Mar 2025 08:15:46 -0500 Subject: [PATCH 4/4] Update publish.py to explicitly install setuptools setuptools is not installed by default in a venv when using Python 3.12 or higher. Below that, it'll already be there so install just won't do anything. --- publish.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/publish.py b/publish.py index aee86f4..cc3ddac 100644 --- a/publish.py +++ b/publish.py @@ -57,9 +57,11 @@ async def upload_with_twine( } python_path = os.path.join(virtualenv_dir, "bin", "python") + pip_path = os.path.join(virtualenv_dir, "bin", "pip") twine_path = os.path.join(virtualenv_dir, "bin", "twine") # Create source distribution and wheel. + await call([pip_path, "install", "setuptools"], env=environ, cwd=project_dir) await call([python_path, "setup.py", "sdist"], env=environ, cwd=project_dir) await call([python_path, "setup.py", "bdist_wheel"], env=environ, cwd=project_dir) dist_files = os.listdir(os.path.join(project_dir, "dist"))