From 74ad4033d12e1550fdcbb857bf21fe119f9a75d4 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Sat, 12 Apr 2025 02:27:31 +0900 Subject: [PATCH 1/3] chore: Support Python 3.13 --- .github/workflows/default.yml | 24 ++++++++++++------------ setup.cfg | 32 ++++++++++++++++---------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 49d7ed9..7e6d885 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -6,11 +6,11 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" cache: "pip" cache-dependency-path: | setup.cfg @@ -31,11 +31,11 @@ jobs: typecheck: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" cache: "pip" cache-dependency-path: | setup.cfg @@ -57,11 +57,11 @@ jobs: runs-on: ubuntu-latest # runs-on: self-hosted steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" cache: "pip" cache-dependency-path: | setup.cfg @@ -110,11 +110,11 @@ jobs: id-token: write runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" cache: "pip" cache-dependency-path: | setup.cfg diff --git a/setup.cfg b/setup.cfg index a37fffa..8707553 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,9 +14,9 @@ classifiers = Intended Audience :: Developers Programming Language :: Python Programming Language :: Python :: 3 - Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 Programming Language :: Python :: 3.12 + Programming Language :: Python :: 3.13 Operating System :: POSIX Operating System :: MacOS :: MacOS X Topic :: Software Development @@ -29,33 +29,33 @@ project_urls = package_dir = = src packages = find_namespace: -python_requires = >=3.10 +python_requires = >=3.11 setup_requires = - setuptools>=51.1.1 - wheel>=0.36.2 + setuptools>=70.0 + wheel>=0.45.1 install_requires = - protobuf~=4.25.3 - grpcio==1.62.2 - grpcio-tools==1.62.2 + protobuf~=6.30.2 + grpcio==1.71.0 + grpcio-tools==1.71.0 zip_safe = false include_package_data = true [options.extras_require] build = - wheel>=0.36.2 - twine>=3.4.1 + wheel>=0.45.1 + twine>=6.1.0 test = - pytest~=6.2.5 - pytest-asyncio~=0.16.0 - pytest-cov>=2.11 - pytest-mock>=3.5.0 + pytest~=8.3.5 + pytest-asyncio~=0.26.0 + pytest-cov>=6.1.1 + pytest-mock>=3.14.0 codecov dev = lint = - flake8>=4.0.1 - flake8-commas>=2.1 + flake8>=7.2.0 + flake8-commas>=4.0 typecheck = - mypy>=1.4.1 + mypy>=1.15.0 types-protobuf types-setuptools From 7851736380d6c297cd6c99bd02c483d12619cd57 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Sat, 12 Apr 2025 02:29:39 +0900 Subject: [PATCH 2/3] fix: use protobuf compatible with grpcio --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 8707553..1a8ad1d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -34,7 +34,7 @@ setup_requires = setuptools>=70.0 wheel>=0.45.1 install_requires = - protobuf~=6.30.2 + protobuf~=5.29.4 grpcio==1.71.0 grpcio-tools==1.71.0 zip_safe = false From dba655c2045b73bbfa278b0f5e6f3c5b5c51282b Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Sat, 12 Apr 2025 02:32:51 +0900 Subject: [PATCH 3/3] fix: broken ci --- .github/workflows/default.yml | 2 +- tests/test_lock.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 7e6d885..96e7521 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -76,7 +76,7 @@ jobs: docker run -d -p 2379:2379 -p 2380:2380 \ -v /tmp/etcd:/etcd-data \ --name backendai-etcd \ - quay.io/coreos/etcd:v3.4.1 \ + quay.io/coreos/etcd:v3.5.21 \ /usr/local/bin/etcd \ --name backendai-etcd \ --data-dir /etcd-data \ diff --git a/tests/test_lock.py b/tests/test_lock.py index 8a9d6f9..e47ab2f 100644 --- a/tests/test_lock.py +++ b/tests/test_lock.py @@ -12,20 +12,20 @@ async def test_lock(etcd: EtcdClient): queue: Queue[int] = Queue() async def _lock_task_1(queue: Queue[int]): - global lock_1_entered + # global lock_1_entered async with etcd.with_lock('/test/locka'): queue.put(1) await asyncio.sleep(10) async def _lock_task_2(queue: Queue[int]): - global lock_2_entered + # global lock_2_entered await asyncio.sleep(3) async with etcd.with_lock('/test/locka'): queue.put(2) await asyncio.sleep(10) async def _lock_task_3(queue: Queue[int]): - global lock_3_entered + # global lock_3_entered await asyncio.sleep(3) async with etcd.with_lock('/test/lockb'): queue.put(3)