From d4e04086e55f93af717cd5df189f04dba3a88b9e Mon Sep 17 00:00:00 2001 From: Francis CLAIRICIA-ROSE-CLAIRE-JOSEPHINE Date: Sun, 4 Aug 2024 00:31:37 +0200 Subject: [PATCH] Updated pdm, dev dependencies, and pre-commit pinned versions --- .github/actions/setup-tox/action.yml | 2 +- .pre-commit-config.yaml | 6 +- .readthedocs.yaml | 2 +- .../servers/easynetwork_tcp_echoserver.py | 2 +- benchmark_server/servers/requirements.txt | 2 +- .../example1.py | 2 +- .../incremental_serializer/example2.py | 2 +- pdm.lock | 270 ++++++++++-------- pyproject.toml | 2 +- src/easynetwork/lowlevel/_stream.py | 2 +- .../lowlevel/api_async/backend/abc.py | 4 +- src/easynetwork/lowlevel/futures.py | 4 +- src/easynetwork/protocol.py | 4 +- src/easynetwork/serializers/abc.py | 2 +- src/easynetwork/serializers/base_stream.py | 6 +- src/easynetwork/serializers/composite.py | 2 +- src/easynetwork/serializers/json.py | 2 +- src/easynetwork/serializers/line.py | 2 +- .../serializers/wrapper/compressor.py | 2 +- .../test_communication/serializer.py | 4 +- tests/unit_test/base.py | 4 +- .../test_api/test_server/test_misc.py | 4 +- .../test_endpoints/test_stream/base.py | 2 +- tests/unit_test/test_protocol.py | 4 +- tests/unit_test/test_serializers/test_abc.py | 4 +- .../test_endpoints/test_stream/base.py | 2 +- tests/unit_test/test_tools/test_asyncgen.py | 4 +- tests/unit_test/test_tools/test_stream.py | 4 +- 28 files changed, 189 insertions(+), 163 deletions(-) diff --git a/.github/actions/setup-tox/action.yml b/.github/actions/setup-tox/action.yml index 2d4b1af8..9581ee50 100644 --- a/.github/actions/setup-tox/action.yml +++ b/.github/actions/setup-tox/action.yml @@ -14,7 +14,7 @@ runs: shell: bash - uses: pdm-project/setup-pdm@v4 with: - version: '2.16.1' + version: '2.17.3' python-version: ${{ inputs.python-version }} ### setup-pdm cache seems broken. See https://github.com/pdm-project/setup-pdm/issues/43 # cache: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cb635239..5988d126 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ ci: repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.16.0 + rev: v3.17.0 hooks: - id: pyupgrade args: ['--py311-plus'] @@ -22,7 +22,7 @@ repos: - id: isort args: ['--filter-files', '--settings-file', 'pyproject.toml'] - repo: https://github.com/psf/black - rev: '24.4.2' + rev: '24.8.0' hooks: - id: black args: ['--config', 'pyproject.toml'] @@ -46,7 +46,7 @@ repos: types: [] # Overwrite with empty in order to fallback to types_or types_or: [python, pyi] - repo: https://github.com/pdm-project/pdm - rev: '2.16.1' + rev: '2.17.3' hooks: - id: pdm-lock-check - id: pdm-export diff --git a/.readthedocs.yaml b/.readthedocs.yaml index fe683030..f7545c82 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -6,7 +6,7 @@ build: python: "3.11" jobs: post_create_environment: - - pip install --no-cache-dir pdm==2.16.1 + - pip install --no-cache-dir pdm==2.17.3 - pdm config check_update false - pdm use -f $READTHEDOCS_VIRTUALENV_PATH post_install: diff --git a/benchmark_server/servers/easynetwork_tcp_echoserver.py b/benchmark_server/servers/easynetwork_tcp_echoserver.py index 2a64af4f..11f283ad 100755 --- a/benchmark_server/servers/easynetwork_tcp_echoserver.py +++ b/benchmark_server/servers/easynetwork_tcp_echoserver.py @@ -21,7 +21,7 @@ class NoSerializer(BufferedIncrementalPacketSerializer[bytes, bytes, memoryview]): __slots__ = () - def incremental_serialize(self, packet: bytes) -> Generator[bytes, None, None]: + def incremental_serialize(self, packet: bytes) -> Generator[bytes]: yield packet def incremental_deserialize(self) -> Generator[None, bytes, tuple[bytes, bytes]]: diff --git a/benchmark_server/servers/requirements.txt b/benchmark_server/servers/requirements.txt index 53ea1af7..a291818f 100644 --- a/benchmark_server/servers/requirements.txt +++ b/benchmark_server/servers/requirements.txt @@ -2,7 +2,7 @@ # Please do not edit it manually. asyncio-dgram==2.1.2 -attrs==23.2.0 +attrs==24.1.0 cffi==1.16.0 idna==3.7 outcome==1.3.0.post0 diff --git a/docs/source/_include/examples/howto/serializers/buffered_incremental_serializer/example1.py b/docs/source/_include/examples/howto/serializers/buffered_incremental_serializer/example1.py index 99c449c1..b92a2357 100644 --- a/docs/source/_include/examples/howto/serializers/buffered_incremental_serializer/example1.py +++ b/docs/source/_include/examples/howto/serializers/buffered_incremental_serializer/example1.py @@ -41,7 +41,7 @@ def deserialize(self, data: bytes) -> ReceivedPacket: except (UnicodeError, json.JSONDecodeError) as exc: raise DeserializeError("JSON decode error") from exc - def incremental_serialize(self, packet: SentPacket) -> Generator[bytes, None, None]: + def incremental_serialize(self, packet: SentPacket) -> Generator[bytes]: yield self._dump(packet) + b"\r\n" def incremental_deserialize(self) -> Generator[None, bytes, tuple[ReceivedPacket, bytes]]: diff --git a/docs/source/_include/examples/howto/serializers/incremental_serializer/example2.py b/docs/source/_include/examples/howto/serializers/incremental_serializer/example2.py index df74ba77..544bc188 100644 --- a/docs/source/_include/examples/howto/serializers/incremental_serializer/example2.py +++ b/docs/source/_include/examples/howto/serializers/incremental_serializer/example2.py @@ -36,7 +36,7 @@ def deserialize(self, data: bytes) -> ReceivedPacket: except (UnicodeError, json.JSONDecodeError) as exc: raise DeserializeError("JSON decode error") from exc - def incremental_serialize(self, packet: SentPacket) -> Generator[bytes, None, None]: + def incremental_serialize(self, packet: SentPacket) -> Generator[bytes]: yield self._dump(packet) + b"\r\n" def incremental_deserialize(self) -> Generator[None, bytes, tuple[ReceivedPacket, bytes]]: diff --git a/pdm.lock b/pdm.lock index f33eb402..bad0eb96 100644 --- a/pdm.lock +++ b/pdm.lock @@ -3,9 +3,12 @@ [metadata] groups = ["default", "bandit", "benchmark-servers", "benchmark-servers-deps", "build", "cbor", "coverage", "dev", "doc", "flake8", "format", "micro-benchmark", "msgpack", "mypy", "pre-commit", "test", "test-trio", "tox", "trio", "types-msgpack", "uvloop"] -strategy = ["cross_platform", "inherit_metadata"] -lock_version = "4.4.2" -content_hash = "sha256:2146760187db05141fd8cf8be7dd1ef03fb5ea3bb60078b832e1898d184bd97f" +strategy = ["inherit_metadata"] +lock_version = "4.5.0" +content_hash = "sha256:1b80719e2b5aeccbd3fc7688f2139ec1335e93b13057431aa7e47cd0c1a66ab2" + +[[metadata.targets]] +requires_python = ">=3.11" [[package]] name = "alabaster" @@ -25,8 +28,10 @@ requires_python = ">=3.8" summary = "High level compatibility layer for multiple asynchronous event loop implementations" groups = ["dev"] dependencies = [ + "exceptiongroup>=1.0.2; python_version < \"3.11\"", "idna>=2.8", "sniffio>=1.1", + "typing-extensions>=4.1; python_version < \"3.11\"", ] files = [ {file = "anyio-4.4.0-py3-none-any.whl", hash = "sha256:c1b2d8f46a8a812513012e1107cb0e68c17159a7a594208005a57dc776e1bdc7"}, @@ -78,13 +83,16 @@ files = [ [[package]] name = "attrs" -version = "23.2.0" +version = "24.1.0" requires_python = ">=3.7" summary = "Classes Without Boilerplate" groups = ["benchmark-servers-deps", "test-trio", "trio"] +dependencies = [ + "importlib-metadata; python_version < \"3.8\"", +] files = [ - {file = "attrs-23.2.0-py3-none-any.whl", hash = "sha256:99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1"}, - {file = "attrs-23.2.0.tar.gz", hash = "sha256:935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30"}, + {file = "attrs-24.1.0-py3-none-any.whl", hash = "sha256:377b47448cb61fea38533f671fba0d0f8a96fd58facd4dc518e3dac9dbea0905"}, + {file = "attrs-24.1.0.tar.gz", hash = "sha256:adbdec84af72d38be7628e353a09b6a6790d15cd71819f6e9d7b0faa8a125745"}, ] [[package]] @@ -107,6 +115,9 @@ version = "2.15.0" requires_python = ">=3.8" summary = "Internationalization utilities" groups = ["doc"] +dependencies = [ + "pytz>=2015.7; python_version < \"3.9\"", +] files = [ {file = "Babel-2.15.0-py3-none-any.whl", hash = "sha256:08706bdad8d0a3413266ab61bd6c34d0c28d6e1e7badf40a2cebe67644e2e1fb"}, {file = "babel-2.15.0.tar.gz", hash = "sha256:8daf0e265d05768bc6c7a314cf1321e9a123afc328cc635c18622a2f30a04413"}, @@ -157,7 +168,7 @@ files = [ [[package]] name = "black" -version = "24.4.2" +version = "24.8.0" requires_python = ">=3.8" summary = "The uncompromising code formatter." groups = ["format"] @@ -167,18 +178,20 @@ dependencies = [ "packaging>=22.0", "pathspec>=0.9.0", "platformdirs>=2", + "tomli>=1.1.0; python_version < \"3.11\"", + "typing-extensions>=4.0.1; python_version < \"3.11\"", ] files = [ - {file = "black-24.4.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:257d724c2c9b1660f353b36c802ccece186a30accc7742c176d29c146df6e474"}, - {file = "black-24.4.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bdde6f877a18f24844e381d45e9947a49e97933573ac9d4345399be37621e26c"}, - {file = "black-24.4.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e151054aa00bad1f4e1f04919542885f89f5f7d086b8a59e5000e6c616896ffb"}, - {file = "black-24.4.2-cp311-cp311-win_amd64.whl", hash = "sha256:7e122b1c4fb252fd85df3ca93578732b4749d9be076593076ef4d07a0233c3e1"}, - {file = "black-24.4.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:accf49e151c8ed2c0cdc528691838afd217c50412534e876a19270fea1e28e2d"}, - {file = "black-24.4.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:88c57dc656038f1ab9f92b3eb5335ee9b021412feaa46330d5eba4e51fe49b04"}, - {file = "black-24.4.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:be8bef99eb46d5021bf053114442914baeb3649a89dc5f3a555c88737e5e98fc"}, - {file = "black-24.4.2-cp312-cp312-win_amd64.whl", hash = "sha256:415e686e87dbbe6f4cd5ef0fbf764af7b89f9057b97c908742b6008cc554b9c0"}, - {file = "black-24.4.2-py3-none-any.whl", hash = "sha256:d36ed1124bb81b32f8614555b34cc4259c3fbc7eec17870e8ff8ded335b58d8c"}, - {file = "black-24.4.2.tar.gz", hash = "sha256:c872b53057f000085da66a19c55d68f6f8ddcac2642392ad3a355878406fbd4d"}, + {file = "black-24.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:fb6e2c0b86bbd43dee042e48059c9ad7830abd5c94b0bc518c0eeec57c3eddc1"}, + {file = "black-24.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:837fd281f1908d0076844bc2b801ad2d369c78c45cf800cad7b61686051041af"}, + {file = "black-24.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:62e8730977f0b77998029da7971fa896ceefa2c4c4933fcd593fa599ecbf97a4"}, + {file = "black-24.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:72901b4913cbac8972ad911dc4098d5753704d1f3c56e44ae8dce99eecb0e3af"}, + {file = "black-24.8.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:7c046c1d1eeb7aea9335da62472481d3bbf3fd986e093cffd35f4385c94ae368"}, + {file = "black-24.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:649f6d84ccbae73ab767e206772cc2d7a393a001070a4c814a546afd0d423aed"}, + {file = "black-24.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2b59b250fdba5f9a9cd9d0ece6e6d993d91ce877d121d161e4698af3eb9c1018"}, + {file = "black-24.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:6e55d30d44bed36593c3163b9bc63bf58b3b30e4611e4d88a0c3c239930ed5b2"}, + {file = "black-24.8.0-py3-none-any.whl", hash = "sha256:972085c618ee94f402da1af548a4f218c754ea7e5dc70acb168bfaca4c2542ed"}, + {file = "black-24.8.0.tar.gz", hash = "sha256:2500945420b6784c38b9ee885af039f5e7471ef284ab03fa35ecdde4688cd83f"}, ] [[package]] @@ -189,8 +202,10 @@ summary = "A simple, correct Python build frontend" groups = ["benchmark-servers", "build"] dependencies = [ "colorama; os_name == \"nt\"", + "importlib-metadata>=4.6; python_full_version < \"3.10.2\"", "packaging>=19.1", "pyproject-hooks", + "tomli>=1.1.0; python_version < \"3.11\"", ] files = [ {file = "build-1.2.1-py3-none-any.whl", hash = "sha256:75e10f767a433d9a86e50d83f418e83efc18ede923ee5ff7df93b6cb0306c5d4"}, @@ -391,6 +406,7 @@ summary = "Composable command line interface toolkit" groups = ["dev", "format"] dependencies = [ "colorama; platform_system == \"Windows\"", + "importlib-metadata; python_version < \"3.8\"", ] files = [ {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, @@ -435,7 +451,6 @@ files = [ {file = "coverage-7.6.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:76d5f82213aa78098b9b964ea89de4617e70e0d43e97900c2778a50856dac605"}, {file = "coverage-7.6.0-cp312-cp312-win32.whl", hash = "sha256:3c59105f8d58ce500f348c5b56163a4113a440dad6daa2294b5052a10db866da"}, {file = "coverage-7.6.0-cp312-cp312-win_amd64.whl", hash = "sha256:ca5d79cfdae420a1d52bf177de4bc2289c321d6c961ae321503b2ca59c17ae67"}, - {file = "coverage-7.6.0-pp38.pp39.pp310-none-any.whl", hash = "sha256:6fe885135c8a479d3e37a7aae61cbd3a0fb2deccb4dda3c25f92a49189f766d6"}, {file = "coverage-7.6.0.tar.gz", hash = "sha256:289cc803fa1dc901f84701ac10c9ee873619320f2f9aff38794db4a4a0268d51"}, ] @@ -448,6 +463,7 @@ summary = "Code coverage measurement for Python" groups = ["test"] dependencies = [ "coverage==7.6.0", + "tomli; python_full_version <= \"3.11.0a6\"", ] files = [ {file = "coverage-7.6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c7b525ab52ce18c57ae232ba6f7010297a87ced82a2383b1afd238849c1ff933"}, @@ -470,13 +486,12 @@ files = [ {file = "coverage-7.6.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:76d5f82213aa78098b9b964ea89de4617e70e0d43e97900c2778a50856dac605"}, {file = "coverage-7.6.0-cp312-cp312-win32.whl", hash = "sha256:3c59105f8d58ce500f348c5b56163a4113a440dad6daa2294b5052a10db866da"}, {file = "coverage-7.6.0-cp312-cp312-win_amd64.whl", hash = "sha256:ca5d79cfdae420a1d52bf177de4bc2289c321d6c961ae321503b2ca59c17ae67"}, - {file = "coverage-7.6.0-pp38.pp39.pp310-none-any.whl", hash = "sha256:6fe885135c8a479d3e37a7aae61cbd3a0fb2deccb4dda3c25f92a49189f766d6"}, {file = "coverage-7.6.0.tar.gz", hash = "sha256:289cc803fa1dc901f84701ac10c9ee873619320f2f9aff38794db4a4a0268d51"}, ] [[package]] name = "cryptography" -version = "42.0.8" +version = "43.0.0" requires_python = ">=3.7" summary = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." groups = ["dev", "test"] @@ -484,38 +499,25 @@ dependencies = [ "cffi>=1.12; platform_python_implementation != \"PyPy\"", ] files = [ - {file = "cryptography-42.0.8-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:81d8a521705787afe7a18d5bfb47ea9d9cc068206270aad0b96a725022e18d2e"}, - {file = "cryptography-42.0.8-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:961e61cefdcb06e0c6d7e3a1b22ebe8b996eb2bf50614e89384be54c48c6b63d"}, - {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e3ec3672626e1b9e55afd0df6d774ff0e953452886e06e0f1eb7eb0c832e8902"}, - {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e599b53fd95357d92304510fb7bda8523ed1f79ca98dce2f43c115950aa78801"}, - {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:5226d5d21ab681f432a9c1cf8b658c0cb02533eece706b155e5fbd8a0cdd3949"}, - {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:6b7c4f03ce01afd3b76cf69a5455caa9cfa3de8c8f493e0d3ab7d20611c8dae9"}, - {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:2346b911eb349ab547076f47f2e035fc8ff2c02380a7cbbf8d87114fa0f1c583"}, - {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:ad803773e9df0b92e0a817d22fd8a3675493f690b96130a5e24f1b8fabbea9c7"}, - {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:2f66d9cd9147ee495a8374a45ca445819f8929a3efcd2e3df6428e46c3cbb10b"}, - {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:d45b940883a03e19e944456a558b67a41160e367a719833c53de6911cabba2b7"}, - {file = "cryptography-42.0.8-cp37-abi3-win32.whl", hash = "sha256:a0c5b2b0585b6af82d7e385f55a8bc568abff8923af147ee3c07bd8b42cda8b2"}, - {file = "cryptography-42.0.8-cp37-abi3-win_amd64.whl", hash = "sha256:57080dee41209e556a9a4ce60d229244f7a66ef52750f813bfbe18959770cfba"}, - {file = "cryptography-42.0.8-cp39-abi3-macosx_10_12_universal2.whl", hash = "sha256:dea567d1b0e8bc5764b9443858b673b734100c2871dc93163f58c46a97a83d28"}, - {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c4783183f7cb757b73b2ae9aed6599b96338eb957233c58ca8f49a49cc32fd5e"}, - {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a0608251135d0e03111152e41f0cc2392d1e74e35703960d4190b2e0f4ca9c70"}, - {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:dc0fdf6787f37b1c6b08e6dfc892d9d068b5bdb671198c72072828b80bd5fe4c"}, - {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:9c0c1716c8447ee7dbf08d6db2e5c41c688544c61074b54fc4564196f55c25a7"}, - {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:fff12c88a672ab9c9c1cf7b0c80e3ad9e2ebd9d828d955c126be4fd3e5578c9e"}, - {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:cafb92b2bc622cd1aa6a1dce4b93307792633f4c5fe1f46c6b97cf67073ec961"}, - {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:31f721658a29331f895a5a54e7e82075554ccfb8b163a18719d342f5ffe5ecb1"}, - {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b297f90c5723d04bcc8265fc2a0f86d4ea2e0f7ab4b6994459548d3a6b992a14"}, - {file = "cryptography-42.0.8-cp39-abi3-win32.whl", hash = "sha256:2f88d197e66c65be5e42cd72e5c18afbfae3f741742070e3019ac8f4ac57262c"}, - {file = "cryptography-42.0.8-cp39-abi3-win_amd64.whl", hash = "sha256:fa76fbb7596cc5839320000cdd5d0955313696d9511debab7ee7278fc8b5c84a"}, - {file = "cryptography-42.0.8-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:ba4f0a211697362e89ad822e667d8d340b4d8d55fae72cdd619389fb5912eefe"}, - {file = "cryptography-42.0.8-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:81884c4d096c272f00aeb1f11cf62ccd39763581645b0812e99a91505fa48e0c"}, - {file = "cryptography-42.0.8-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:c9bb2ae11bfbab395bdd072985abde58ea9860ed84e59dbc0463a5d0159f5b71"}, - {file = "cryptography-42.0.8-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:7016f837e15b0a1c119d27ecd89b3515f01f90a8615ed5e9427e30d9cdbfed3d"}, - {file = "cryptography-42.0.8-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5a94eccb2a81a309806027e1670a358b99b8fe8bfe9f8d329f27d72c094dde8c"}, - {file = "cryptography-42.0.8-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:dec9b018df185f08483f294cae6ccac29e7a6e0678996587363dc352dc65c842"}, - {file = "cryptography-42.0.8-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:343728aac38decfdeecf55ecab3264b015be68fc2816ca800db649607aeee648"}, - {file = "cryptography-42.0.8-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:013629ae70b40af70c9a7a5db40abe5d9054e6f4380e50ce769947b73bf3caad"}, - {file = "cryptography-42.0.8.tar.gz", hash = "sha256:8d09d05439ce7baa8e9e95b07ec5b6c886f548deb7e0f69ef25f64b3bce842f2"}, + {file = "cryptography-43.0.0-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:64c3f16e2a4fc51c0d06af28441881f98c5d91009b8caaff40cf3548089e9c74"}, + {file = "cryptography-43.0.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3dcdedae5c7710b9f97ac6bba7e1052b95c7083c9d0e9df96e02a1932e777895"}, + {file = "cryptography-43.0.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d9a1eca329405219b605fac09ecfc09ac09e595d6def650a437523fcd08dd22"}, + {file = "cryptography-43.0.0-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:ea9e57f8ea880eeea38ab5abf9fbe39f923544d7884228ec67d666abd60f5a47"}, + {file = "cryptography-43.0.0-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:9a8d6802e0825767476f62aafed40532bd435e8a5f7d23bd8b4f5fd04cc80ecf"}, + {file = "cryptography-43.0.0-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:cc70b4b581f28d0a254d006f26949245e3657d40d8857066c2ae22a61222ef55"}, + {file = "cryptography-43.0.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:4a997df8c1c2aae1e1e5ac49c2e4f610ad037fc5a3aadc7b64e39dea42249431"}, + {file = "cryptography-43.0.0-cp37-abi3-win32.whl", hash = "sha256:6e2b11c55d260d03a8cf29ac9b5e0608d35f08077d8c087be96287f43af3ccdc"}, + {file = "cryptography-43.0.0-cp37-abi3-win_amd64.whl", hash = "sha256:31e44a986ceccec3d0498e16f3d27b2ee5fdf69ce2ab89b52eaad1d2f33d8778"}, + {file = "cryptography-43.0.0-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:7b3f5fe74a5ca32d4d0f302ffe6680fcc5c28f8ef0dc0ae8f40c0f3a1b4fca66"}, + {file = "cryptography-43.0.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac1955ce000cb29ab40def14fd1bbfa7af2017cca696ee696925615cafd0dce5"}, + {file = "cryptography-43.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:299d3da8e00b7e2b54bb02ef58d73cd5f55fb31f33ebbf33bd00d9aa6807df7e"}, + {file = "cryptography-43.0.0-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:ee0c405832ade84d4de74b9029bedb7b31200600fa524d218fc29bfa371e97f5"}, + {file = "cryptography-43.0.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:cb013933d4c127349b3948aa8aaf2f12c0353ad0eccd715ca789c8a0f671646f"}, + {file = "cryptography-43.0.0-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:fdcb265de28585de5b859ae13e3846a8e805268a823a12a4da2597f1f5afc9f0"}, + {file = "cryptography-43.0.0-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:2905ccf93a8a2a416f3ec01b1a7911c3fe4073ef35640e7ee5296754e30b762b"}, + {file = "cryptography-43.0.0-cp39-abi3-win32.whl", hash = "sha256:47ca71115e545954e6c1d207dd13461ab81f4eccfcb1345eac874828b5e3eaaf"}, + {file = "cryptography-43.0.0-cp39-abi3-win_amd64.whl", hash = "sha256:0663585d02f76929792470451a5ba64424acc3cd5227b03921dab0e2f27b1709"}, + {file = "cryptography-43.0.0.tar.gz", hash = "sha256:b88075ada2d51aa9f18283532c9f60e72170041bba88d7f37e49cbb10275299e"}, ] [[package]] @@ -591,6 +593,8 @@ requires_python = ">=3.6" summary = "Helpful functions for Python 🐍 🛠️" groups = ["doc"] dependencies = [ + "importlib-metadata>=3.6.0; python_version < \"3.9\"", + "importlib-resources>=3.0.0; python_version < \"3.9\"", "natsort>=7.0.1", "typing-extensions>=3.7.4.1", ] @@ -689,6 +693,9 @@ version = "0.14.0" requires_python = ">=3.7" summary = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" groups = ["dev"] +dependencies = [ + "typing-extensions; python_version < \"3.8\"", +] files = [ {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, @@ -733,6 +740,7 @@ dependencies = [ "packaging>=23.2", "pathspec>=0.10.1", "pluggy>=1.0.0", + "tomli>=1.2.2; python_version < \"3.11\"", "trove-classifiers", ] files = [ @@ -796,6 +804,7 @@ summary = "A featureful, immutable, and correct URL for Python." groups = ["dev"] dependencies = [ "idna>=2.5", + "typing; python_version < \"3.5\"", ] files = [ {file = "hyperlink-21.0.0-py2.py3-none-any.whl", hash = "sha256:e6b14c37ecb73e89c77d78cdb4c2cc8f3fb59a885c5b3f819ff4ed80f25af1b4"}, @@ -837,16 +846,17 @@ files = [ [[package]] name = "importlib-metadata" -version = "8.0.0" +version = "8.2.0" requires_python = ">=3.8" summary = "Read metadata from Python packages" groups = ["dev", "micro-benchmark"] dependencies = [ + "typing-extensions>=3.6.4; python_version < \"3.8\"", "zipp>=0.5", ] files = [ - {file = "importlib_metadata-8.0.0-py3-none-any.whl", hash = "sha256:15584cf2b1bf449d98ff8a6ff1abef57bf20f3ac6454f431736cd3e660921b2f"}, - {file = "importlib_metadata-8.0.0.tar.gz", hash = "sha256:188bd24e4c346d3f0a933f275c2fec67050326a856b9a359881d7c2a697e8812"}, + {file = "importlib_metadata-8.2.0-py3-none-any.whl", hash = "sha256:11901fa0c2f97919b288679932bb64febaeacf289d18ac84dd68cb2e74213369"}, + {file = "importlib_metadata-8.2.0.tar.gz", hash = "sha256:72e8d4399996132204f9a16dcc751af254a48f8d1b20b9ff0f98d4a8f901e73d"}, ] [[package]] @@ -901,7 +911,7 @@ files = [ [[package]] name = "jaraco-functools" -version = "4.0.1" +version = "4.0.2" requires_python = ">=3.8" summary = "Functools like those found in stdlib" groups = ["dev"] @@ -909,8 +919,8 @@ dependencies = [ "more-itertools", ] files = [ - {file = "jaraco.functools-4.0.1-py3-none-any.whl", hash = "sha256:3b24ccb921d6b593bdceb56ce14799204f473976e2a9d4b15b04d0f2c2326664"}, - {file = "jaraco_functools-4.0.1.tar.gz", hash = "sha256:d33fa765374c0611b52f8b3a795f8900869aa88c84769d4d1746cd68fb28c3e8"}, + {file = "jaraco.functools-4.0.2-py3-none-any.whl", hash = "sha256:c9d16a3ed4ccb5a889ad8e0b7a343401ee5b2a71cee6ed192d3f68bc351e94e3"}, + {file = "jaraco_functools-4.0.2.tar.gz", hash = "sha256:3460c74cd0d32bf82b9576bbb3527c4364d5b27a21f5158a62aed6c4b42e23f5"}, ] [[package]] @@ -941,13 +951,14 @@ files = [ [[package]] name = "keyring" -version = "25.2.1" +version = "25.3.0" requires_python = ">=3.8" summary = "Store and access your passwords safely." groups = ["dev"] dependencies = [ "SecretStorage>=3.2; sys_platform == \"linux\"", "importlib-metadata>=4.11.4; python_version < \"3.12\"", + "importlib-resources; python_version < \"3.9\"", "jaraco-classes", "jaraco-context", "jaraco-functools", @@ -955,8 +966,8 @@ dependencies = [ "pywin32-ctypes>=0.2.0; sys_platform == \"win32\"", ] files = [ - {file = "keyring-25.2.1-py3-none-any.whl", hash = "sha256:2458681cdefc0dbc0b7eb6cf75d0b98e59f9ad9b2d4edd319d18f68bdca95e50"}, - {file = "keyring-25.2.1.tar.gz", hash = "sha256:daaffd42dbda25ddafb1ad5fec4024e5bbcfe424597ca1ca452b299861e49f1b"}, + {file = "keyring-25.3.0-py3-none-any.whl", hash = "sha256:8d963da00ccdf06e356acd9bf3b743208878751032d8599c6cc89eb51310ffae"}, + {file = "keyring-25.3.0.tar.gz", hash = "sha256:8d85a1ea5d6db8515b59e1c5d1d1678b03cf7fc8b8dcfb1651e8c4a524eb42ef"}, ] [[package]] @@ -1081,27 +1092,28 @@ files = [ [[package]] name = "mypy" -version = "1.10.1" +version = "1.11.1" requires_python = ">=3.8" summary = "Optional static typing for Python" groups = ["mypy"] dependencies = [ "mypy-extensions>=1.0.0", - "typing-extensions>=4.1.0", + "tomli>=1.1.0; python_version < \"3.11\"", + "typing-extensions>=4.6.0", ] files = [ - {file = "mypy-1.10.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bd6f629b67bb43dc0d9211ee98b96d8dabc97b1ad38b9b25f5e4c4d7569a0c6a"}, - {file = "mypy-1.10.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a1bbb3a6f5ff319d2b9d40b4080d46cd639abe3516d5a62c070cf0114a457d84"}, - {file = "mypy-1.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8edd4e9bbbc9d7b79502eb9592cab808585516ae1bcc1446eb9122656c6066f"}, - {file = "mypy-1.10.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6166a88b15f1759f94a46fa474c7b1b05d134b1b61fca627dd7335454cc9aa6b"}, - {file = "mypy-1.10.1-cp311-cp311-win_amd64.whl", hash = "sha256:5bb9cd11c01c8606a9d0b83ffa91d0b236a0e91bc4126d9ba9ce62906ada868e"}, - {file = "mypy-1.10.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d8681909f7b44d0b7b86e653ca152d6dff0eb5eb41694e163c6092124f8246d7"}, - {file = "mypy-1.10.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:378c03f53f10bbdd55ca94e46ec3ba255279706a6aacaecac52ad248f98205d3"}, - {file = "mypy-1.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bacf8f3a3d7d849f40ca6caea5c055122efe70e81480c8328ad29c55c69e93e"}, - {file = "mypy-1.10.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:701b5f71413f1e9855566a34d6e9d12624e9e0a8818a5704d74d6b0402e66c04"}, - {file = "mypy-1.10.1-cp312-cp312-win_amd64.whl", hash = "sha256:3c4c2992f6ea46ff7fce0072642cfb62af7a2484efe69017ed8b095f7b39ef31"}, - {file = "mypy-1.10.1-py3-none-any.whl", hash = "sha256:71d8ac0b906354ebda8ef1673e5fde785936ac1f29ff6987c7483cfbd5a4235a"}, - {file = "mypy-1.10.1.tar.gz", hash = "sha256:1f8f492d7db9e3593ef42d4f115f04e556130f2819ad33ab84551403e97dd4c0"}, + {file = "mypy-1.11.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:7b6343d338390bb946d449677726edf60102a1c96079b4f002dedff375953fc5"}, + {file = "mypy-1.11.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e4fe9f4e5e521b458d8feb52547f4bade7ef8c93238dfb5bbc790d9ff2d770ca"}, + {file = "mypy-1.11.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:886c9dbecc87b9516eff294541bf7f3655722bf22bb898ee06985cd7269898de"}, + {file = "mypy-1.11.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:fca4a60e1dd9fd0193ae0067eaeeb962f2d79e0d9f0f66223a0682f26ffcc809"}, + {file = "mypy-1.11.1-cp311-cp311-win_amd64.whl", hash = "sha256:0bd53faf56de9643336aeea1c925012837432b5faf1701ccca7fde70166ccf72"}, + {file = "mypy-1.11.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f39918a50f74dc5969807dcfaecafa804fa7f90c9d60506835036cc1bc891dc8"}, + {file = "mypy-1.11.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0bc71d1fb27a428139dd78621953effe0d208aed9857cb08d002280b0422003a"}, + {file = "mypy-1.11.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b868d3bcff720dd7217c383474008ddabaf048fad8d78ed948bb4b624870a417"}, + {file = "mypy-1.11.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a707ec1527ffcdd1c784d0924bf5cb15cd7f22683b919668a04d2b9c34549d2e"}, + {file = "mypy-1.11.1-cp312-cp312-win_amd64.whl", hash = "sha256:64f4a90e3ea07f590c5bcf9029035cf0efeae5ba8be511a8caada1a4893f5525"}, + {file = "mypy-1.11.1-py3-none-any.whl", hash = "sha256:0624bdb940255d2dd24e829d99a13cfeb72e4e9031f9492148f410ed30bcab54"}, + {file = "mypy-1.11.1.tar.gz", hash = "sha256:f404a0b069709f18bbdb702eb3dcfe51910602995de00bd39cea3050b5772d08"}, ] [[package]] @@ -1210,7 +1222,7 @@ files = [ [[package]] name = "plotly" -version = "5.22.0" +version = "5.23.0" requires_python = ">=3.8" summary = "An open-source, interactive data visualization library for Python" groups = ["benchmark-servers"] @@ -1219,8 +1231,8 @@ dependencies = [ "tenacity>=6.2.0", ] files = [ - {file = "plotly-5.22.0-py3-none-any.whl", hash = "sha256:68fc1901f098daeb233cc3dd44ec9dc31fb3ca4f4e53189344199c43496ed006"}, - {file = "plotly-5.22.0.tar.gz", hash = "sha256:859fdadbd86b5770ae2466e542b761b247d1c6b49daed765b95bb8c7063e7469"}, + {file = "plotly-5.23.0-py3-none-any.whl", hash = "sha256:76cbe78f75eddc10c56f5a4ee3e7ccaade7c0a57465546f02098c0caed6c2d1a"}, + {file = "plotly-5.23.0.tar.gz", hash = "sha256:89e57d003a116303a34de6700862391367dd564222ab71f8531df70279fc0193"}, ] [[package]] @@ -1236,7 +1248,7 @@ files = [ [[package]] name = "pre-commit" -version = "3.7.1" +version = "3.8.0" requires_python = ">=3.9" summary = "A framework for managing and maintaining multi-language pre-commit hooks." groups = ["pre-commit"] @@ -1248,8 +1260,8 @@ dependencies = [ "virtualenv>=20.10.0", ] files = [ - {file = "pre_commit-3.7.1-py2.py3-none-any.whl", hash = "sha256:fae36fd1d7ad7d6a5a1c0b0d5adb2ed1a3bda5a21bf6c3e5372073d7a11cd4c5"}, - {file = "pre_commit-3.7.1.tar.gz", hash = "sha256:8ca3ad567bc78a4972a3f1a477e94a79d4597e8140a6e0b651c5e33899c3654a"}, + {file = "pre_commit-3.8.0-py2.py3-none-any.whl", hash = "sha256:9a90a53bf82fdd8778d58085faf8d83df56e40dfe18f45b19446e26bf1b3a63f"}, + {file = "pre_commit-3.8.0.tar.gz", hash = "sha256:8bb6494d4a20423842e198980c9ecf9f96607a07ea29549e180eef9ae80fe7af"}, ] [[package]] @@ -1348,6 +1360,7 @@ summary = "API to interact with the python pyproject.toml based projects" groups = ["tox"] dependencies = [ "packaging>=24.1", + "tomli>=2.0.1; python_version < \"3.11\"", ] files = [ {file = "pyproject_api-1.7.1-py3-none-any.whl", hash = "sha256:2dc1654062c2b27733d8fd4cdda672b22fe8741ef1dde8e3a998a9547b071eeb"}, @@ -1373,9 +1386,12 @@ summary = "pytest: simple powerful testing with Python" groups = ["micro-benchmark", "test", "test-trio"] dependencies = [ "colorama; sys_platform == \"win32\"", + "exceptiongroup>=1.0.0rc8; python_version < \"3.11\"", + "importlib-metadata>=0.12; python_version < \"3.8\"", "iniconfig", "packaging", "pluggy<2.0,>=0.12", + "tomli>=1.0.0; python_version < \"3.11\"", ] files = [ {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, @@ -1403,8 +1419,10 @@ requires_python = ">=3.7" summary = "A ``pytest`` fixture for benchmarking code. It will group the tests into rounds that are calibrated to the chosen timer." groups = ["micro-benchmark"] dependencies = [ + "pathlib2; python_version < \"3.4\"", "py-cpuinfo", "pytest>=3.8", + "statistics; python_version < \"3.4\"", ] files = [ {file = "pytest-benchmark-4.0.0.tar.gz", hash = "sha256:fb0785b83efe599a6a956361c0691ae1dbb5318018561af10f3e915caa0048d1"}, @@ -1579,6 +1597,7 @@ groups = ["bandit", "dev"] dependencies = [ "markdown-it-py>=2.2.0", "pygments<3.0.0,>=2.13.0", + "typing-extensions<5.0,>=4.0.0; python_version < \"3.9\"", ] files = [ {file = "rich-13.7.1-py3-none-any.whl", hash = "sha256:4edbae314f59eb482f54e9e30bf00d33350aaa94f4bfcd4e9e3110e64d0d7222"}, @@ -1669,7 +1688,7 @@ name = "sniffio" version = "1.3.1" requires_python = ">=3.7" summary = "Sniff out which async library your code is running under" -groups = ["benchmark-servers-deps", "default", "dev", "test-trio", "trio"] +groups = ["default", "benchmark-servers-deps", "dev", "test-trio", "trio"] files = [ {file = "sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2"}, {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, @@ -1708,7 +1727,7 @@ files = [ [[package]] name = "sphinx" -version = "7.4.5" +version = "7.4.7" requires_python = ">=3.9" summary = "Python documentation generator" groups = ["doc"] @@ -1720,6 +1739,7 @@ dependencies = [ "colorama>=0.4.6; sys_platform == \"win32\"", "docutils<0.22,>=0.20", "imagesize>=1.3", + "importlib-metadata>=6.0; python_version < \"3.10\"", "packaging>=23.0", "requests>=2.30.0", "snowballstemmer>=2.2", @@ -1729,10 +1749,11 @@ dependencies = [ "sphinxcontrib-jsmath", "sphinxcontrib-qthelp", "sphinxcontrib-serializinghtml>=1.1.9", + "tomli>=2; python_version < \"3.11\"", ] files = [ - {file = "sphinx-7.4.5-py3-none-any.whl", hash = "sha256:9f135d8c1d277db67be514be579c4c4a26c8c0e962219aaca5a721b04bd6d0d8"}, - {file = "sphinx-7.4.5.tar.gz", hash = "sha256:a4abe5385bf856df094c1e6cadf24a2351b12057be3670b99a12c05a01d209f5"}, + {file = "sphinx-7.4.7-py3-none-any.whl", hash = "sha256:c2419e2135d11f1951cd994d6eb18a1835bd8fdd8429f9ca375dc1f3281bd239"}, + {file = "sphinx-7.4.7.tar.gz", hash = "sha256:242f92a7ea7e6c5b406fdc2615413890ba9f699114a9c09192d7dfead2ee9cfe"}, ] [[package]] @@ -1837,6 +1858,7 @@ dependencies = [ "sphinx>=3.2.0", "tabulate>=0.8.7", "typing-extensions!=3.10.0.1,>=3.7.4.3", + "typing-inspect>=0.6.0; python_version < \"3.8\"", ] files = [ {file = "sphinx_toolbox-3.7.0-py3-none-any.whl", hash = "sha256:9ea800fb6b2ecc5f382ab3547b415029fe9603b0b7eeb4c15c5da77c1eb5f21a"}, @@ -1845,35 +1867,35 @@ files = [ [[package]] name = "sphinxcontrib-applehelp" -version = "1.0.8" +version = "2.0.0" requires_python = ">=3.9" summary = "sphinxcontrib-applehelp is a Sphinx extension which outputs Apple help books" groups = ["doc"] files = [ - {file = "sphinxcontrib_applehelp-1.0.8-py3-none-any.whl", hash = "sha256:cb61eb0ec1b61f349e5cc36b2028e9e7ca765be05e49641c97241274753067b4"}, - {file = "sphinxcontrib_applehelp-1.0.8.tar.gz", hash = "sha256:c40a4f96f3776c4393d933412053962fac2b84f4c99a7982ba42e09576a70619"}, + {file = "sphinxcontrib_applehelp-2.0.0-py3-none-any.whl", hash = "sha256:4cd3f0ec4ac5dd9c17ec65e9ab272c9b867ea77425228e68ecf08d6b28ddbdb5"}, + {file = "sphinxcontrib_applehelp-2.0.0.tar.gz", hash = "sha256:2f29ef331735ce958efa4734873f084941970894c6090408b079c61b2e1c06d1"}, ] [[package]] name = "sphinxcontrib-devhelp" -version = "1.0.6" +version = "2.0.0" requires_python = ">=3.9" summary = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp documents" groups = ["doc"] files = [ - {file = "sphinxcontrib_devhelp-1.0.6-py3-none-any.whl", hash = "sha256:6485d09629944511c893fa11355bda18b742b83a2b181f9a009f7e500595c90f"}, - {file = "sphinxcontrib_devhelp-1.0.6.tar.gz", hash = "sha256:9893fd3f90506bc4b97bdb977ceb8fbd823989f4316b28c3841ec128544372d3"}, + {file = "sphinxcontrib_devhelp-2.0.0-py3-none-any.whl", hash = "sha256:aefb8b83854e4b0998877524d1029fd3e6879210422ee3780459e28a1f03a8a2"}, + {file = "sphinxcontrib_devhelp-2.0.0.tar.gz", hash = "sha256:411f5d96d445d1d73bb5d52133377b4248ec79db5c793ce7dbe59e074b4dd1ad"}, ] [[package]] name = "sphinxcontrib-htmlhelp" -version = "2.0.5" +version = "2.1.0" requires_python = ">=3.9" summary = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" groups = ["doc"] files = [ - {file = "sphinxcontrib_htmlhelp-2.0.5-py3-none-any.whl", hash = "sha256:393f04f112b4d2f53d93448d4bce35842f62b307ccdc549ec1585e950bc35e04"}, - {file = "sphinxcontrib_htmlhelp-2.0.5.tar.gz", hash = "sha256:0dc87637d5de53dd5eec3a6a01753b1ccf99494bd756aafecd74b4fa9e729015"}, + {file = "sphinxcontrib_htmlhelp-2.1.0-py3-none-any.whl", hash = "sha256:166759820b47002d22914d64a075ce08f4c46818e17cfc9470a9786b759b19f8"}, + {file = "sphinxcontrib_htmlhelp-2.1.0.tar.gz", hash = "sha256:c9e2916ace8aad64cc13a0d233ee22317f2b9025b9cf3295249fa985cc7082e9"}, ] [[package]] @@ -1903,24 +1925,24 @@ files = [ [[package]] name = "sphinxcontrib-qthelp" -version = "1.0.7" +version = "2.0.0" requires_python = ">=3.9" summary = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp documents" groups = ["doc"] files = [ - {file = "sphinxcontrib_qthelp-1.0.7-py3-none-any.whl", hash = "sha256:e2ae3b5c492d58fcbd73281fbd27e34b8393ec34a073c792642cd8e529288182"}, - {file = "sphinxcontrib_qthelp-1.0.7.tar.gz", hash = "sha256:053dedc38823a80a7209a80860b16b722e9e0209e32fea98c90e4e6624588ed6"}, + {file = "sphinxcontrib_qthelp-2.0.0-py3-none-any.whl", hash = "sha256:b18a828cdba941ccd6ee8445dbe72ffa3ef8cbe7505d8cd1fa0d42d3f2d5f3eb"}, + {file = "sphinxcontrib_qthelp-2.0.0.tar.gz", hash = "sha256:4fe7d0ac8fc171045be623aba3e2a8f613f8682731f9153bb2e40ece16b9bbab"}, ] [[package]] name = "sphinxcontrib-serializinghtml" -version = "1.1.10" +version = "2.0.0" requires_python = ">=3.9" summary = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)" groups = ["doc"] files = [ - {file = "sphinxcontrib_serializinghtml-1.1.10-py3-none-any.whl", hash = "sha256:326369b8df80a7d2d8d7f99aa5ac577f51ea51556ed974e7716cfd4fca3f6cb7"}, - {file = "sphinxcontrib_serializinghtml-1.1.10.tar.gz", hash = "sha256:93f3f5dc458b91b192fe10c397e324f262cf163d79f3282c158e8436a2c4511f"}, + {file = "sphinxcontrib_serializinghtml-2.0.0-py3-none-any.whl", hash = "sha256:6e2cb0eef194e10c27ec0023bfeb25badbbb5868244cf5bc5bdc04e4464bf331"}, + {file = "sphinxcontrib_serializinghtml-2.0.0.tar.gz", hash = "sha256:e9d912827f872c029017a53f0ef2180b327c3f7fd23c87229f7a8e8b70031d4d"}, ] [[package]] @@ -1961,13 +1983,13 @@ files = [ [[package]] name = "tenacity" -version = "8.5.0" +version = "9.0.0" requires_python = ">=3.8" summary = "Retry code until it succeeds" groups = ["benchmark-servers"] files = [ - {file = "tenacity-8.5.0-py3-none-any.whl", hash = "sha256:b594c2a5945830c267ce6b79a166228323ed52718f30302c1359836112346687"}, - {file = "tenacity-8.5.0.tar.gz", hash = "sha256:8bc6c0c8a09b31e6cad13c47afbed1a567518250a9a171418582ed8d9c20ca78"}, + {file = "tenacity-9.0.0-py3-none-any.whl", hash = "sha256:93de0c98785b27fcf659856aa9f54bfbd399e29969b0621bc7f762bd441b4539"}, + {file = "tenacity-9.0.0.tar.gz", hash = "sha256:807f37ca97d62aa361264d497b0e31e92b8027044942bfa756160d908320d73b"}, ] [[package]] @@ -2007,6 +2029,7 @@ dependencies = [ "platformdirs>=4.2.2", "pluggy>=1.5", "pyproject-api>=1.7.1", + "tomli>=2.0.1; python_version < \"3.11\"", "virtualenv>=20.26.3", ] files = [ @@ -2021,6 +2044,7 @@ requires_python = ">=3.7" summary = "A plugin for tox that utilizes PDM as the package manager and installer" groups = ["tox"] dependencies = [ + "tomli; python_version < \"3.11\"", "tox>=4.0", ] files = [ @@ -2037,6 +2061,7 @@ groups = ["benchmark-servers-deps", "test-trio", "trio"] dependencies = [ "attrs>=23.2.0", "cffi>=1.14; os_name == \"nt\" and implementation_name != \"pypy\"", + "exceptiongroup; python_version < \"3.11\"", "idna", "outcome", "sniffio>=1.3.0", @@ -2110,29 +2135,29 @@ files = [ [[package]] name = "uv" -version = "0.2.26" +version = "0.2.33" requires_python = ">=3.8" summary = "An extremely fast Python package installer and resolver, written in Rust." groups = ["dev"] files = [ - {file = "uv-0.2.26-py3-none-linux_armv6l.whl", hash = "sha256:98e6b8940edd7f4822dca3093f55491b75841524639d91ab6629aea0bcb3a0cf"}, - {file = "uv-0.2.26-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:fd3e850921f0d51d093aaeb76d190829eefdc0345439b8f6c06103a0463cc451"}, - {file = "uv-0.2.26-py3-none-macosx_11_0_arm64.whl", hash = "sha256:3117aabd606cbe70a3a1589301ce14d578f3f62a46025b26e251b664b01b3728"}, - {file = "uv-0.2.26-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl", hash = "sha256:ad76f6143549ed02a255a877c9e01491cc5d6af5aa4b6ad676d2d8e5a46efa33"}, - {file = "uv-0.2.26-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b2d927097f200b7853f3d0ae3d701d130c5944d99e15ff9ddefc57533268f526"}, - {file = "uv-0.2.26-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffb9ce3b96b31219c922395adce4c48a898f51b5574198e24d64c4f8185ad320"}, - {file = "uv-0.2.26-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:33d844ef545e519079954a4f3508c7e33106aa59f980ec30e481b5bafc558d71"}, - {file = "uv-0.2.26-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:04c0ad71a802562b9523265816f21851698709088ffea9662b00d66255aabc88"}, - {file = "uv-0.2.26-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:86d9d60b5d6e7713dfc8c7058242417e226129fc7a92b98c9ce0afc0ea22a74d"}, - {file = "uv-0.2.26-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65120080bbd2f2ce47e92f6065e223f2f416feb3a323ea9574d3e993b7ebde9f"}, - {file = "uv-0.2.26-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:c1ba6064f8bff59e3e6a7c59cf27ce4cffc6bf2eed1777134522b65c562f9206"}, - {file = "uv-0.2.26-py3-none-musllinux_1_1_armv7l.whl", hash = "sha256:cb5dee6c397e6d2a9190362610ba80421a5a8ee17ba4c9548dbb2b19bcca46fd"}, - {file = "uv-0.2.26-py3-none-musllinux_1_1_i686.whl", hash = "sha256:df3093d85c83a537245b7e3d9faab5010ddba6258d87b98bd4a357e21ee0e6d8"}, - {file = "uv-0.2.26-py3-none-musllinux_1_1_ppc64le.whl", hash = "sha256:4c995d120cb71aa7a44506a49133924f22396b26170fe6c43725801c82f30134"}, - {file = "uv-0.2.26-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:c274408c7ee8a828bb65688baa2ca0555f7dcb211f648280d0dfe507e9b77bff"}, - {file = "uv-0.2.26-py3-none-win32.whl", hash = "sha256:5accd1a614e437b3a0a5781282bc25ef727192d786ff35b917f30921f1b4eee0"}, - {file = "uv-0.2.26-py3-none-win_amd64.whl", hash = "sha256:05949e0135d5093d555f17ca6701e5939547d8a656bec003b7986e3540533348"}, - {file = "uv-0.2.26.tar.gz", hash = "sha256:692d31a61460e7cc176ca4c67152fe2fa0591b1c62f00db12002090b117c465d"}, + {file = "uv-0.2.33-py3-none-linux_armv6l.whl", hash = "sha256:42b65bbf78b5186a40ea4423fab030fb01c9354432a7c0a3b5db67a3f4e246c5"}, + {file = "uv-0.2.33-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:181ccdb22058465c6690dca22e506fec234dcae5bcbe6389fd5330971910250e"}, + {file = "uv-0.2.33-py3-none-macosx_11_0_arm64.whl", hash = "sha256:ace6cb8383203fdfeaf8dbbc1ecb3bb945e040ca10558e233b63c84af82f6636"}, + {file = "uv-0.2.33-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl", hash = "sha256:86f6237102deedbb17201804eb821833c5bad3f551f16f2695ae2b85e9f066de"}, + {file = "uv-0.2.33-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ede51de6795f9571b182c104d6078690c3a10b3fbe6fcf414b2e38c8d394e575"}, + {file = "uv-0.2.33-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:02ed3b62049ea1f40404d33a02a69d3808f3b0e001e5565938804ca76beafbc4"}, + {file = "uv-0.2.33-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:73031edf35195289f02f6f1a603c512b57c8f921cb62fd442dbb63fd2a77c801"}, + {file = "uv-0.2.33-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2fe685e73f198b2630e08e89ece0d858d58646a038a6d9cb2b06126dcca856d1"}, + {file = "uv-0.2.33-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fb6f282ac92fbc05e82fa3a93e6515ad5b044e8c845ba16d815b5889799eebd1"}, + {file = "uv-0.2.33-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:48cfdb8efd237eb00086b8f0d0dc7281e517fd8afb55f698538087379bf45a8d"}, + {file = "uv-0.2.33-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:8eba96cbff1bc492c270e143235b39cfbe6dddebd842228ea14124d6b7d944e8"}, + {file = "uv-0.2.33-py3-none-musllinux_1_1_armv7l.whl", hash = "sha256:90b74796ce75594e63345c8e090fbac832a8f6db876691ae2b57b0b8d6011559"}, + {file = "uv-0.2.33-py3-none-musllinux_1_1_i686.whl", hash = "sha256:676231a93001db051ecf98cb380f2d48d3f6b95add66ff4546073e30911a737a"}, + {file = "uv-0.2.33-py3-none-musllinux_1_1_ppc64le.whl", hash = "sha256:744eb9743e4b850af5de9f3c727d84a60a763ae0f4f5183dcdfa8a065879694d"}, + {file = "uv-0.2.33-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:37924a3b502117fd74b1ddf08e9288b397da7895dd8cad46005422eefffe6e88"}, + {file = "uv-0.2.33-py3-none-win32.whl", hash = "sha256:dbe497a1a16be9569d42cf4a7562e14bb3c3d9b33cc65e59095f1c3f8ab983df"}, + {file = "uv-0.2.33-py3-none-win_amd64.whl", hash = "sha256:93c45d07ab440c03f2796540d646c34e58b4707feebfb9f70ded1306830408b0"}, + {file = "uv-0.2.33.tar.gz", hash = "sha256:714351e10f27e41052897e26cd4acfe66e35250903fdc20f762d29461cf3ec4a"}, ] [[package]] @@ -2167,6 +2192,7 @@ groups = ["dev", "pre-commit", "tox"] dependencies = [ "distlib<1,>=0.3.7", "filelock<4,>=3.12.2", + "importlib-metadata>=6.6; python_version < \"3.8\"", "platformdirs<5,>=3.9.1", ] files = [ diff --git a/pyproject.toml b/pyproject.toml index ffed016b..1b61cc1f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,7 +86,7 @@ format = [ "black>=22.6.0", ] mypy = [ - "mypy~=1.10", + "mypy~=1.11", ] types-msgpack = [ "msgpack-types>=0.2.0", diff --git a/src/easynetwork/lowlevel/_stream.py b/src/easynetwork/lowlevel/_stream.py index a593bfcd..f5b6abd9 100644 --- a/src/easynetwork/lowlevel/_stream.py +++ b/src/easynetwork/lowlevel/_stream.py @@ -44,7 +44,7 @@ def __init__(self, protocol: AnyStreamProtocolType[_T_SentPacket, Any]) -> None: _check_any_protocol(protocol) self.__protocol: AnyStreamProtocolType[_T_SentPacket, Any] = protocol - def generate(self, packet: _T_SentPacket) -> Generator[bytes, None, None]: + def generate(self, packet: _T_SentPacket) -> Generator[bytes]: try: yield from self.__protocol.generate_chunks(packet) except Exception as exc: diff --git a/src/easynetwork/lowlevel/api_async/backend/abc.py b/src/easynetwork/lowlevel/api_async/backend/abc.py index 2333cf56..a889b958 100644 --- a/src/easynetwork/lowlevel/api_async/backend/abc.py +++ b/src/easynetwork/lowlevel/api_async/backend/abc.py @@ -724,7 +724,7 @@ def open_cancel_scope(self, *, deadline: float = ...) -> CancelScope: """ raise NotImplementedError - def timeout(self, delay: float) -> AbstractContextManager[CancelScope]: + def timeout(self, delay: float) -> AbstractContextManager[CancelScope, None]: """ Returns a :term:`context manager` that can be used to limit the amount of time spent waiting on something. @@ -741,7 +741,7 @@ def timeout(self, delay: float) -> AbstractContextManager[CancelScope]: """ return _timeout_scope(self.move_on_after(delay)) - def timeout_at(self, deadline: float) -> AbstractContextManager[CancelScope]: + def timeout_at(self, deadline: float) -> AbstractContextManager[CancelScope, None]: """ Returns a :term:`context manager` that can be used to limit the amount of time spent waiting on something. diff --git a/src/easynetwork/lowlevel/futures.py b/src/easynetwork/lowlevel/futures.py index 7bb4407c..7fce4b17 100644 --- a/src/easynetwork/lowlevel/futures.py +++ b/src/easynetwork/lowlevel/futures.py @@ -133,7 +133,7 @@ async def run(self, func: Callable[_P, _T], /, *args: _P.args, **kwargs: _P.kwar backend = self.__backend return await _result_or_cancel(executor.submit(func, *args, **kwargs), backend) - def map(self, func: Callable[..., _T], *iterables: Iterable[Any]) -> AsyncGenerator[_T, None]: + def map(self, func: Callable[..., _T], *iterables: Iterable[Any]) -> AsyncGenerator[_T]: """ Returns an asynchronous iterator equivalent to ``map(fn, iter)``. @@ -160,7 +160,7 @@ def pow_50(x): backend = self.__backend fs = deque(executor.submit(self._setup_func(func), *args) for args in zip(*iterables)) - async def result_iterator() -> AsyncGenerator[_T, None]: + async def result_iterator() -> AsyncGenerator[_T]: try: while fs: yield await _result_or_cancel(fs.popleft(), backend) diff --git a/src/easynetwork/protocol.py b/src/easynetwork/protocol.py index fe55c642..099a2a2b 100644 --- a/src/easynetwork/protocol.py +++ b/src/easynetwork/protocol.py @@ -165,7 +165,7 @@ def create_buffer(self, sizehint: int) -> _T_Buffer: """ return self.__serializer.create_deserializer_buffer(sizehint) - def generate_chunks(self, packet: _T_SentPacket) -> Generator[bytes, None, None]: + def generate_chunks(self, packet: _T_SentPacket) -> Generator[bytes]: """ Serializes a Python object to a raw :term:`packet` part by part. @@ -256,7 +256,7 @@ def __init__( self.__serializer: AbstractIncrementalPacketSerializer[Any, Any] = serializer self.__converter: AbstractPacketConverterComposite[_T_SentPacket, _T_ReceivedPacket, Any, Any] | None = converter - def generate_chunks(self, packet: _T_SentPacket) -> Generator[bytes, None, None]: + def generate_chunks(self, packet: _T_SentPacket) -> Generator[bytes]: """ Serializes a Python object to a raw :term:`packet` part by part. diff --git a/src/easynetwork/serializers/abc.py b/src/easynetwork/serializers/abc.py index 8a54468b..bf900aca 100644 --- a/src/easynetwork/serializers/abc.py +++ b/src/easynetwork/serializers/abc.py @@ -80,7 +80,7 @@ class AbstractIncrementalPacketSerializer(AbstractPacketSerializer[_T_SentDTOPac __slots__ = () @abstractmethod - def incremental_serialize(self, packet: _T_SentDTOPacket, /) -> Generator[bytes, None, None]: + def incremental_serialize(self, packet: _T_SentDTOPacket, /) -> Generator[bytes]: """ Returns the byte representation of the Python object `packet`. diff --git a/src/easynetwork/serializers/base_stream.py b/src/easynetwork/serializers/base_stream.py index e42f5b8e..66ab6638 100644 --- a/src/easynetwork/serializers/base_stream.py +++ b/src/easynetwork/serializers/base_stream.py @@ -91,7 +91,7 @@ def serialize(self, packet: _T_SentDTOPacket, /) -> bytes: raise NotImplementedError @final - def incremental_serialize(self, packet: _T_SentDTOPacket, /) -> Generator[bytes, None, None]: + def incremental_serialize(self, packet: _T_SentDTOPacket, /) -> Generator[bytes]: """ Yields the data returned by :meth:`serialize` and appends `separator`. @@ -246,7 +246,7 @@ def serialize(self, packet: _T_SentDTOPacket, /) -> bytes: raise NotImplementedError @final - def incremental_serialize(self, packet: _T_SentDTOPacket, /) -> Generator[bytes, None, None]: + def incremental_serialize(self, packet: _T_SentDTOPacket, /) -> Generator[bytes]: """ Yields the data returned by :meth:`serialize`. @@ -462,7 +462,7 @@ def deserialize(self, data: bytes, /) -> _T_ReceivedDTOPacket: return packet @final - def incremental_serialize(self, packet: _T_SentDTOPacket, /) -> Generator[bytes, None, None]: + def incremental_serialize(self, packet: _T_SentDTOPacket, /) -> Generator[bytes]: """ Calls :meth:`dump_to_file` and yields the result. diff --git a/src/easynetwork/serializers/composite.py b/src/easynetwork/serializers/composite.py index 41fe2d8a..d701d19b 100644 --- a/src/easynetwork/serializers/composite.py +++ b/src/easynetwork/serializers/composite.py @@ -172,7 +172,7 @@ def sent_packet_serializer(self) -> AbstractIncrementalPacketSerializer[_T_SentD @property def received_packet_serializer(self) -> AbstractIncrementalPacketSerializer[Any, _T_ReceivedDTOPacket]: ... - def incremental_serialize(self, packet: _T_SentDTOPacket) -> Generator[bytes, None, None]: + def incremental_serialize(self, packet: _T_SentDTOPacket) -> Generator[bytes]: """ Calls ``self.sent_packet_serializer.incremental_serialize(packet)``. diff --git a/src/easynetwork/serializers/json.py b/src/easynetwork/serializers/json.py index a9ca3eb0..3203927b 100644 --- a/src/easynetwork/serializers/json.py +++ b/src/easynetwork/serializers/json.py @@ -164,7 +164,7 @@ def serialize(self, packet): return self.__encoder.encode(packet).encode(self.__encoding, self.__unicode_errors) @final - def incremental_serialize(self, packet: Any) -> Generator[bytes, None, None]: + def incremental_serialize(self, packet: Any) -> Generator[bytes]: r""" Returns the JSON representation of the Python object `packet`. diff --git a/src/easynetwork/serializers/line.py b/src/easynetwork/serializers/line.py index 373b0c8d..a797ed83 100644 --- a/src/easynetwork/serializers/line.py +++ b/src/easynetwork/serializers/line.py @@ -125,7 +125,7 @@ def serialize(self, packet): return packet.encode(self.__encoding, self.__unicode_errors) @final - def incremental_serialize(self, packet: str) -> Generator[bytes, None, None]: + def incremental_serialize(self, packet: str) -> Generator[bytes]: """ Encodes the given string to bytes and appends `separator`. diff --git a/src/easynetwork/serializers/wrapper/compressor.py b/src/easynetwork/serializers/wrapper/compressor.py index 59650804..842bd3d5 100644 --- a/src/easynetwork/serializers/wrapper/compressor.py +++ b/src/easynetwork/serializers/wrapper/compressor.py @@ -159,7 +159,7 @@ def serialize(self, packet: _T_SentDTOPacket) -> bytes: return compressor.compress(self.__serializer.serialize(packet)) + compressor.flush() @final - def incremental_serialize(self, packet: _T_SentDTOPacket) -> Generator[bytes, None, None]: + def incremental_serialize(self, packet: _T_SentDTOPacket) -> Generator[bytes]: """ Serializes `packet` and yields the compressed data parts. diff --git a/tests/functional_test/test_communication/serializer.py b/tests/functional_test/test_communication/serializer.py index fcd07808..98b34d7e 100644 --- a/tests/functional_test/test_communication/serializer.py +++ b/tests/functional_test/test_communication/serializer.py @@ -23,7 +23,7 @@ def serialize(self, packet: str) -> bytes: raise TypeError("is not a string") return packet.encode(encoding=self.encoding) - def incremental_serialize(self, packet: str) -> Generator[bytes, None, None]: + def incremental_serialize(self, packet: str) -> Generator[bytes]: if not isinstance(packet, str): raise TypeError("is not a string") if "\n" in packet: @@ -99,6 +99,6 @@ class BadSerializeStringSerializer(StringSerializer): def serialize(self, packet: str) -> bytes: raise SystemError("CRASH") - def incremental_serialize(self, packet: str) -> Generator[bytes, None, None]: + def incremental_serialize(self, packet: str) -> Generator[bytes]: raise SystemError("CRASH") yield b"chunk" # type: ignore[unreachable] diff --git a/tests/unit_test/base.py b/tests/unit_test/base.py index 20979a8a..17e5d392 100644 --- a/tests/unit_test/base.py +++ b/tests/unit_test/base.py @@ -110,7 +110,7 @@ def mock_buffered_stream_protocol( mock_buffered_stream_protocol: MagicMock, mocker: MockerFixture, ) -> MagicMock: - def generate_chunks_side_effect(packet: Any) -> Generator[bytes, None, None]: + def generate_chunks_side_effect(packet: Any) -> Generator[bytes]: yield str(packet).removeprefix("sentinel.").encode("ascii") + b"\n" def build_packet_from_buffer_side_effect(buffer: memoryview) -> Generator[None, int, tuple[Any, bytes]]: @@ -142,7 +142,7 @@ def mock_stream_protocol( mock_buffered_stream_protocol: MagicMock, mocker: MockerFixture, ) -> MagicMock: - def generate_chunks_side_effect(packet: Any) -> Generator[bytes, None, None]: + def generate_chunks_side_effect(packet: Any) -> Generator[bytes]: yield str(packet).removeprefix("sentinel.").encode("ascii") + b"\n" def build_packet_from_chunks_side_effect() -> Generator[None, bytes, tuple[Any, bytes]]: diff --git a/tests/unit_test/test_async/test_api/test_server/test_misc.py b/tests/unit_test/test_async/test_api/test_server/test_misc.py index 0faa4bcb..046bfc3e 100644 --- a/tests/unit_test/test_async/test_api/test_server/test_misc.py +++ b/tests/unit_test/test_async/test_api/test_server/test_misc.py @@ -43,7 +43,7 @@ async def test____build_lowlevel_datagram_server_handler____skip_initialization( # Arrange @contextlib.asynccontextmanager - async def initializer(client: Any) -> AsyncGenerator[None, None]: + async def initializer(client: Any) -> AsyncGenerator[None]: yield ctx = mocker.sentinel.ctx @@ -60,7 +60,7 @@ async def test____build_lowlevel_stream_server_handler____skip_initialization(mo # Arrange @contextlib.asynccontextmanager - async def initializer(client: Any) -> AsyncGenerator[None, None]: + async def initializer(client: Any) -> AsyncGenerator[None]: yield ctx = mocker.sentinel.ctx diff --git a/tests/unit_test/test_async/test_lowlevel_api/test_endpoints/test_stream/base.py b/tests/unit_test/test_async/test_lowlevel_api/test_endpoints/test_stream/base.py index fc29ba5e..586a02c2 100644 --- a/tests/unit_test/test_async/test_lowlevel_api/test_endpoints/test_stream/base.py +++ b/tests/unit_test/test_async/test_lowlevel_api/test_endpoints/test_stream/base.py @@ -111,7 +111,7 @@ async def test____send_packet____protocol_crashed( mock_stream_transport.send_all_from_iterable.side_effect = lambda it: chunks.extend(it) expected_error = Exception("Error") - def side_effect(packet: Any) -> Generator[bytes, None, None]: + def side_effect(packet: Any) -> Generator[bytes]: raise expected_error yield # type: ignore[unreachable] diff --git a/tests/unit_test/test_protocol.py b/tests/unit_test/test_protocol.py index 22bcb7cf..7d09c108 100644 --- a/tests/unit_test/test_protocol.py +++ b/tests/unit_test/test_protocol.py @@ -192,7 +192,7 @@ class _BaseTestAnyStreamProtocol: sentinel: Any @pytest.fixture(autouse=True) - def _bind_mocker_sentinel(self, mocker: MockerFixture) -> Generator[None, None, None]: + def _bind_mocker_sentinel(self, mocker: MockerFixture) -> Generator[None]: self.sentinel = mocker.sentinel yield del self.sentinel @@ -212,7 +212,7 @@ def protocol( case _: raise AssertionError("Invalid param") - def generate_chunk_side_effect(self, packet: Any) -> Generator[bytes, None, None]: + def generate_chunk_side_effect(self, packet: Any) -> Generator[bytes]: yield self.sentinel.chunk_a yield self.sentinel.chunk_b yield self.sentinel.chunk_c diff --git a/tests/unit_test/test_serializers/test_abc.py b/tests/unit_test/test_serializers/test_abc.py index 78fa8e1f..8fbaba95 100644 --- a/tests/unit_test/test_serializers/test_abc.py +++ b/tests/unit_test/test_serializers/test_abc.py @@ -26,7 +26,7 @@ @final class _IncrementalPacketSerializerForTest(AbstractIncrementalPacketSerializer[Any, Any]): - def incremental_serialize(self, packet: Any) -> Generator[bytes, None, None]: + def incremental_serialize(self, packet: Any) -> Generator[bytes]: raise NotImplementedError def incremental_deserialize(self) -> Generator[None, bytes, tuple[Any, bytes]]: @@ -50,7 +50,7 @@ def test____serialize____concatenate_chunks( mocker: MockerFixture, ) -> None: # Arrange - def side_effect(_: Any) -> Generator[bytes, None, None]: + def side_effect(_: Any) -> Generator[bytes]: yield b"a" yield b"b" yield b"c" diff --git a/tests/unit_test/test_sync/test_lowlevel_api/test_endpoints/test_stream/base.py b/tests/unit_test/test_sync/test_lowlevel_api/test_endpoints/test_stream/base.py index 96ee2b54..b4da2fff 100644 --- a/tests/unit_test/test_sync/test_lowlevel_api/test_endpoints/test_stream/base.py +++ b/tests/unit_test/test_sync/test_lowlevel_api/test_endpoints/test_stream/base.py @@ -129,7 +129,7 @@ def test____send_packet____protocol_crashed( mock_stream_transport.send_all_from_iterable.side_effect = lambda it, timeout: chunks.extend(it) expected_error = Exception("Error") - def side_effect(packet: Any) -> Generator[bytes, None, None]: + def side_effect(packet: Any) -> Generator[bytes]: raise expected_error yield # type: ignore[unreachable] diff --git a/tests/unit_test/test_tools/test_asyncgen.py b/tests/unit_test/test_tools/test_asyncgen.py index 52a85924..c122a0d4 100644 --- a/tests/unit_test/test_tools/test_asyncgen.py +++ b/tests/unit_test/test_tools/test_asyncgen.py @@ -111,7 +111,7 @@ async def test____anext_without_asyncgen_hook____skips_firstiter_hook( firstiter_stub.return_value = None sys.set_asyncgen_hooks(firstiter=firstiter_stub) - async def async_generator_function() -> AsyncGenerator[int, None]: + async def async_generator_function() -> AsyncGenerator[int]: yield 42 async_generator = async_generator_function() @@ -131,7 +131,7 @@ async def test____anext_without_asyncgen_hook____remove_frame_on_error() -> None # Arrange exc = ValueError("abc") - async def async_generator_function() -> AsyncGenerator[int, None]: + async def async_generator_function() -> AsyncGenerator[int]: if False: yield 42 # type: ignore[unreachable] raise exc diff --git a/tests/unit_test/test_tools/test_stream.py b/tests/unit_test/test_tools/test_stream.py index 8cb34b01..b9f7fbbd 100644 --- a/tests/unit_test/test_tools/test_stream.py +++ b/tests/unit_test/test_tools/test_stream.py @@ -53,7 +53,7 @@ def test____generate____yield_generator_chunk( mocker: MockerFixture, ) -> None: # Arrange - def side_effect(_: Any) -> Generator[bytes, None, None]: + def side_effect(_: Any) -> Generator[bytes]: yield b"chunk 1" yield b"chunk 2" @@ -78,7 +78,7 @@ def test____generate____generator_raised( # Arrange expected_error = Exception("Error") - def side_effect(_: Any) -> Generator[bytes, None, None]: + def side_effect(_: Any) -> Generator[bytes]: if before_yielding: raise expected_error yield b"chunk"