From 70ebfbf8b21c00c91dd166db057c3d3d301cb8e6 Mon Sep 17 00:00:00 2001 From: "Andres D. Molins" Date: Tue, 9 Jul 2024 11:56:16 +0200 Subject: [PATCH] Problem: Node operators with Python 3.12 version cannot install the package. Solution: Upgrade dependencies to be able to use Python 3.12. --- .github/workflows/pytest.yml | 4 ++-- pyproject.toml | 12 ++++++------ shell.nix | 14 +++++++------- tests/api/test_p2p.py | 2 +- tests/storage/test_store_message.py | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 8b904dbc7..06e0aa10e 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -33,11 +33,11 @@ jobs: # Fetch the whole history for all tags and branches (required for aleph.__version__) fetch-depth: 0 - - name: Set up Python 3.11 + - name: Set up Python 3.12 id: setup-python uses: actions/setup-python@v2 with: - python-version: 3.11 + python-version: 3.12 - name: Install latest Rust nightly toolchain uses: actions-rs/toolchain@v1 diff --git a/pyproject.toml b/pyproject.toml index 340c850c5..ef53bca90 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "hatchling.build" name = "pyaleph" dynamic = ["version"] description = "Reference implementation of Aleph.im next generation network of decentralized big data applications." -requires-python = ">=3.11,<3.12" +requires-python = ">=3.12,<3.13" readme = "README.md" license = { file = "LICENSE.txt" } authors = [ @@ -21,7 +21,7 @@ dependencies = [ "aiocache==0.12.2", "aiohttp-cors==0.7.0", "aiohttp-jinja2==1.5", - "aiohttp==3.8.4", + "aiohttp==3.9.5", "aioipfs@git+https://github.com/aleph-im/aioipfs.git@d671c79b2871bb4d6c8877ba1e7f3ffbe7d20b71", "alembic==1.12.1", "aleph-message==0.4.2", @@ -29,7 +29,7 @@ dependencies = [ "aleph-pytezos@git+https://github.com/aleph-im/aleph-pytezos.git@32dd1749a4773da494275709060632cbeba9a51b", "asyncpg==0.28.0", "base58>=1.0.3", - "coincurve==18.0.0", + "coincurve==20.0.0", "configmanager==1.35.1", "configparser==6.0.0", "cosmospy==6.0.0", @@ -48,13 +48,13 @@ dependencies = [ "pynacl==1.5.0", "python-dateutil==2.8.2", "pytz==2023.3", - "pyyaml==6.0", + "pyyaml==6.0.1", "redis[hiredis]==5.0.1", "requests==2.31.0", "secp256k1==0.14.0", "sentry-sdk==1.34.0", "setproctitle==1.3.3", - "sqlalchemy[mypy]==1.4.41", + "sqlalchemy[mypy]==1.4.52", "sqlalchemy-utils==0.38.3", "substrate-interface==1.7.4", "ujson==5.1.0", # required by aiocache @@ -185,7 +185,7 @@ all = [ ] [tool.mypy] -python_version = 3.11 +python_version = 3.12 mypy_path = "src" plugins = [ "sqlalchemy.ext.mypy.plugin", diff --git a/shell.nix b/shell.nix index 9d92da476..5fbc2e841 100644 --- a/shell.nix +++ b/shell.nix @@ -11,14 +11,14 @@ pkgs.mkShell { pkgs.hatch pkgs.rustup - pkgs.python311 - pkgs.python311Packages.virtualenv - pkgs.python311Packages.pip - pkgs.python311Packages.setuptools + pkgs.python312 + pkgs.python312Packages.virtualenv + pkgs.python312Packages.pip + pkgs.python312Packages.setuptools - pkgs.python311Packages.secp256k1 - pkgs.python311Packages.fastecdsa - pkgs.python311Packages.greenlet + pkgs.python312Packages.secp256k1 + pkgs.python312Packages.fastecdsa + pkgs.python312Packages.greenlet ]; shellHook = '' diff --git a/tests/api/test_p2p.py b/tests/api/test_p2p.py index 93e97df3b..8e626e94c 100644 --- a/tests/api/test_p2p.py +++ b/tests/api/test_p2p.py @@ -97,4 +97,4 @@ async def test_post_message_sync(ccn_api_client, mocker): assert pub_status["failed"] == [] # Check that we cleaned up the queue - assert mocked_queue.delete.called_once + mocked_queue.assert_called_once() diff --git a/tests/storage/test_store_message.py b/tests/storage/test_store_message.py index 00e029322..86416248e 100644 --- a/tests/storage/test_store_message.py +++ b/tests/storage/test_store_message.py @@ -104,7 +104,7 @@ async def test_handle_new_storage_file( assert stored_file.type == FileType.FILE assert stored_file.size == len(raw_content) - assert get_hash_content_mock.called_once + get_hash_content_mock.assert_called_once() @pytest.mark.asyncio