From 1b443d483d28c401182b77012b9a9679c03c3d66 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Mon, 1 Apr 2024 17:45:25 +0300 Subject: [PATCH] chore: drop python 3.7 --- .github/workflows/test.yml | 3 +- .pre-commit-config.yaml | 17 +- poetry.lock | 372 +++++++++++------------- pyproject.toml | 2 +- src/isolate/backends/_base.py | 6 +- src/isolate/backends/common.py | 14 +- src/isolate/backends/conda.py | 16 +- src/isolate/backends/local.py | 4 +- src/isolate/backends/pyenv.py | 6 +- src/isolate/backends/remote.py | 14 +- src/isolate/backends/virtualenv.py | 18 +- src/isolate/connections/_local/_base.py | 9 +- src/isolate/connections/common.py | 6 +- src/isolate/connections/grpc/agent.py | 3 +- src/isolate/connections/ipc/_base.py | 7 +- src/isolate/logs.py | 4 +- src/isolate/registry.py | 6 +- src/isolate/server/server.py | 8 +- tests/test_backends.py | 39 ++- tests/test_connections.py | 2 +- 20 files changed, 264 insertions(+), 292 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8e93f39..27be5d7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ jobs: matrix: os: [ubuntu-latest, macos-latest] - python: ["3.7", "3.8", "3.9", "3.10"] + python: ["3.8", "3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v3 @@ -52,7 +52,6 @@ jobs: python -m pip install -e ".[build]" - name: Install uv - if: ${{ matrix.python != '3.7' }} run: | python -m pip install uv diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 116c75d..e5206c2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,13 +4,9 @@ repos: hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - exclude: '^src/.*_pb2.py$' + exclude: ".*(_pb2.py|_pb2.pyi|_pb2_grpc.py)$" - id: ruff-format - exclude: '^src/.*_pb2.py$' -- repo: https://github.com/asottile/setup-cfg-fmt - rev: v1.20.1 - hooks: - - id: setup-cfg-fmt + exclude: ".*(_pb2.py|_pb2.pyi|_pb2_grpc.py)$" - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.2.0 hooks: @@ -19,13 +15,20 @@ repos: - --disallow-incomplete-defs - --ignore-missing-imports - --no-warn-no-return - exclude: '^src/.*_pb2.py$' + exclude: ".*(_pb2.py|_pb2.pyi|_pb2_grpc.py)$" additional_dependencies: [types-protobuf] - repo: https://github.com/codespell-project/codespell rev: v2.1.0 hooks: - id: codespell + exclude: ".*(_pb2.py|_pb2.pyi|_pb2_grpc.py)$" - repo: https://github.com/python-poetry/poetry rev: 1.8.2 hooks: - id: poetry-check +- repo: https://github.com/asottile/pyupgrade + rev: v3.1.0 + hooks: + - id: pyupgrade + args: ["--py38-plus"] + exclude: ".*(_pb2.py|_pb2.pyi|_pb2_grpc.py)$" diff --git a/poetry.lock b/poetry.lock index 71242b6..a6e7ac9 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,273 +1,253 @@ +# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. + [[package]] name = "distlib" -version = "0.3.6" +version = "0.3.8" description = "Distribution utilities" -category = "main" optional = true python-versions = "*" +files = [ + {file = "distlib-0.3.8-py2.py3-none-any.whl", hash = "sha256:034db59a0b96f8ca18035f36290806a9a6e6bd9d1ff91e45a7f172eb17e51784"}, + {file = "distlib-0.3.8.tar.gz", hash = "sha256:1530ea13e350031b6312d8580ddb6b27a104275a31106523b8f123787f494f64"}, +] [[package]] name = "filelock" -version = "3.9.0" +version = "3.13.3" description = "A platform independent file lock." -category = "main" optional = true -python-versions = ">=3.7" +python-versions = ">=3.8" +files = [ + {file = "filelock-3.13.3-py3-none-any.whl", hash = "sha256:5ffa845303983e7a0b7ae17636509bc97997d58afeafa72fb141a17b152284cb"}, + {file = "filelock-3.13.3.tar.gz", hash = "sha256:a79895a25bbefdf55d1a2a0a80968f7dbb28edcd6d4234a0afb3f37ecde4b546"}, +] [package.extras] -docs = ["furo (>=2022.12.7)", "sphinx-autodoc-typehints (>=1.19.5)", "sphinx (>=5.3)"] -testing = ["covdefaults (>=2.2.2)", "coverage (>=7.0.1)", "pytest-cov (>=4)", "pytest-timeout (>=2.1)", "pytest (>=7.2)"] +docs = ["furo (>=2023.9.10)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8.0.1)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-timeout (>=2.2)"] +typing = ["typing-extensions (>=4.8)"] [[package]] name = "grpcio" -version = "1.52.0" +version = "1.62.1" description = "HTTP/2-based RPC framework" -category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "grpcio-1.62.1-cp310-cp310-linux_armv7l.whl", hash = "sha256:179bee6f5ed7b5f618844f760b6acf7e910988de77a4f75b95bbfaa8106f3c1e"}, + {file = "grpcio-1.62.1-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:48611e4fa010e823ba2de8fd3f77c1322dd60cb0d180dc6630a7e157b205f7ea"}, + {file = "grpcio-1.62.1-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:b2a0e71b0a2158aa4bce48be9f8f9eb45cbd17c78c7443616d00abbe2a509f6d"}, + {file = "grpcio-1.62.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fbe80577c7880911d3ad65e5ecc997416c98f354efeba2f8d0f9112a67ed65a5"}, + {file = "grpcio-1.62.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58f6c693d446964e3292425e1d16e21a97a48ba9172f2d0df9d7b640acb99243"}, + {file = "grpcio-1.62.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:77c339403db5a20ef4fed02e4d1a9a3d9866bf9c0afc77a42234677313ea22f3"}, + {file = "grpcio-1.62.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b5a4ea906db7dec694098435d84bf2854fe158eb3cd51e1107e571246d4d1d70"}, + {file = "grpcio-1.62.1-cp310-cp310-win32.whl", hash = "sha256:4187201a53f8561c015bc745b81a1b2d278967b8de35f3399b84b0695e281d5f"}, + {file = "grpcio-1.62.1-cp310-cp310-win_amd64.whl", hash = "sha256:844d1f3fb11bd1ed362d3fdc495d0770cfab75761836193af166fee113421d66"}, + {file = "grpcio-1.62.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:833379943d1728a005e44103f17ecd73d058d37d95783eb8f0b28ddc1f54d7b2"}, + {file = "grpcio-1.62.1-cp311-cp311-macosx_10_10_universal2.whl", hash = "sha256:c7fcc6a32e7b7b58f5a7d27530669337a5d587d4066060bcb9dee7a8c833dfb7"}, + {file = "grpcio-1.62.1-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:fa7d28eb4d50b7cbe75bb8b45ed0da9a1dc5b219a0af59449676a29c2eed9698"}, + {file = "grpcio-1.62.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:48f7135c3de2f298b833be8b4ae20cafe37091634e91f61f5a7eb3d61ec6f660"}, + {file = "grpcio-1.62.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:71f11fd63365ade276c9d4a7b7df5c136f9030e3457107e1791b3737a9b9ed6a"}, + {file = "grpcio-1.62.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:4b49fd8fe9f9ac23b78437da94c54aa7e9996fbb220bac024a67469ce5d0825f"}, + {file = "grpcio-1.62.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:482ae2ae78679ba9ed5752099b32e5fe580443b4f798e1b71df412abf43375db"}, + {file = "grpcio-1.62.1-cp311-cp311-win32.whl", hash = "sha256:1faa02530b6c7426404372515fe5ddf66e199c2ee613f88f025c6f3bd816450c"}, + {file = "grpcio-1.62.1-cp311-cp311-win_amd64.whl", hash = "sha256:5bd90b8c395f39bc82a5fb32a0173e220e3f401ff697840f4003e15b96d1befc"}, + {file = "grpcio-1.62.1-cp312-cp312-linux_armv7l.whl", hash = "sha256:b134d5d71b4e0837fff574c00e49176051a1c532d26c052a1e43231f252d813b"}, + {file = "grpcio-1.62.1-cp312-cp312-macosx_10_10_universal2.whl", hash = "sha256:d1f6c96573dc09d50dbcbd91dbf71d5cf97640c9427c32584010fbbd4c0e0037"}, + {file = "grpcio-1.62.1-cp312-cp312-manylinux_2_17_aarch64.whl", hash = "sha256:359f821d4578f80f41909b9ee9b76fb249a21035a061a327f91c953493782c31"}, + {file = "grpcio-1.62.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a485f0c2010c696be269184bdb5ae72781344cb4e60db976c59d84dd6354fac9"}, + {file = "grpcio-1.62.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b50b09b4dc01767163d67e1532f948264167cd27f49e9377e3556c3cba1268e1"}, + {file = "grpcio-1.62.1-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:3227c667dccbe38f2c4d943238b887bac588d97c104815aecc62d2fd976e014b"}, + {file = "grpcio-1.62.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:3952b581eb121324853ce2b191dae08badb75cd493cb4e0243368aa9e61cfd41"}, + {file = "grpcio-1.62.1-cp312-cp312-win32.whl", hash = "sha256:83a17b303425104d6329c10eb34bba186ffa67161e63fa6cdae7776ff76df73f"}, + {file = "grpcio-1.62.1-cp312-cp312-win_amd64.whl", hash = "sha256:6696ffe440333a19d8d128e88d440f91fb92c75a80ce4b44d55800e656a3ef1d"}, + {file = "grpcio-1.62.1-cp37-cp37m-linux_armv7l.whl", hash = "sha256:e3393b0823f938253370ebef033c9fd23d27f3eae8eb9a8f6264900c7ea3fb5a"}, + {file = "grpcio-1.62.1-cp37-cp37m-macosx_10_10_universal2.whl", hash = "sha256:83e7ccb85a74beaeae2634f10eb858a0ed1a63081172649ff4261f929bacfd22"}, + {file = "grpcio-1.62.1-cp37-cp37m-manylinux_2_17_aarch64.whl", hash = "sha256:882020c87999d54667a284c7ddf065b359bd00251fcd70279ac486776dbf84ec"}, + {file = "grpcio-1.62.1-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a10383035e864f386fe096fed5c47d27a2bf7173c56a6e26cffaaa5a361addb1"}, + {file = "grpcio-1.62.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:960edebedc6b9ada1ef58e1c71156f28689978188cd8cff3b646b57288a927d9"}, + {file = "grpcio-1.62.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:23e2e04b83f347d0aadde0c9b616f4726c3d76db04b438fd3904b289a725267f"}, + {file = "grpcio-1.62.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:978121758711916d34fe57c1f75b79cdfc73952f1481bb9583399331682d36f7"}, + {file = "grpcio-1.62.1-cp37-cp37m-win_amd64.whl", hash = "sha256:9084086190cc6d628f282e5615f987288b95457292e969b9205e45b442276407"}, + {file = "grpcio-1.62.1-cp38-cp38-linux_armv7l.whl", hash = "sha256:22bccdd7b23c420a27fd28540fb5dcbc97dc6be105f7698cb0e7d7a420d0e362"}, + {file = "grpcio-1.62.1-cp38-cp38-macosx_10_10_universal2.whl", hash = "sha256:8999bf1b57172dbc7c3e4bb3c732658e918f5c333b2942243f10d0d653953ba9"}, + {file = "grpcio-1.62.1-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:d9e52558b8b8c2f4ac05ac86344a7417ccdd2b460a59616de49eb6933b07a0bd"}, + {file = "grpcio-1.62.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1714e7bc935780bc3de1b3fcbc7674209adf5208ff825799d579ffd6cd0bd505"}, + {file = "grpcio-1.62.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c8842ccbd8c0e253c1f189088228f9b433f7a93b7196b9e5b6f87dba393f5d5d"}, + {file = "grpcio-1.62.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1f1e7b36bdff50103af95a80923bf1853f6823dd62f2d2a2524b66ed74103e49"}, + {file = "grpcio-1.62.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:bba97b8e8883a8038606480d6b6772289f4c907f6ba780fa1f7b7da7dfd76f06"}, + {file = "grpcio-1.62.1-cp38-cp38-win32.whl", hash = "sha256:a7f615270fe534548112a74e790cd9d4f5509d744dd718cd442bf016626c22e4"}, + {file = "grpcio-1.62.1-cp38-cp38-win_amd64.whl", hash = "sha256:e6c8c8693df718c5ecbc7babb12c69a4e3677fd11de8886f05ab22d4e6b1c43b"}, + {file = "grpcio-1.62.1-cp39-cp39-linux_armv7l.whl", hash = "sha256:73db2dc1b201d20ab7083e7041946910bb991e7e9761a0394bbc3c2632326483"}, + {file = "grpcio-1.62.1-cp39-cp39-macosx_10_10_universal2.whl", hash = "sha256:407b26b7f7bbd4f4751dbc9767a1f0716f9fe72d3d7e96bb3ccfc4aace07c8de"}, + {file = "grpcio-1.62.1-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:f8de7c8cef9261a2d0a62edf2ccea3d741a523c6b8a6477a340a1f2e417658de"}, + {file = "grpcio-1.62.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bd5c8a1af40ec305d001c60236308a67e25419003e9bb3ebfab5695a8d0b369"}, + {file = "grpcio-1.62.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:be0477cb31da67846a33b1a75c611f88bfbcd427fe17701b6317aefceee1b96f"}, + {file = "grpcio-1.62.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:60dcd824df166ba266ee0cfaf35a31406cd16ef602b49f5d4dfb21f014b0dedd"}, + {file = "grpcio-1.62.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:973c49086cabab773525f6077f95e5a993bfc03ba8fc32e32f2c279497780585"}, + {file = "grpcio-1.62.1-cp39-cp39-win32.whl", hash = "sha256:12859468e8918d3bd243d213cd6fd6ab07208195dc140763c00dfe901ce1e1b4"}, + {file = "grpcio-1.62.1-cp39-cp39-win_amd64.whl", hash = "sha256:b7209117bbeebdfa5d898205cc55153a51285757902dd73c47de498ad4d11332"}, + {file = "grpcio-1.62.1.tar.gz", hash = "sha256:6c455e008fa86d9e9a9d85bb76da4277c0d7d9668a3bfa70dbe86e9f3c759947"}, +] [package.extras] -protobuf = ["grpcio-tools (>=1.52.0)"] +protobuf = ["grpcio-tools (>=1.62.1)"] [[package]] name = "importlib-metadata" -version = "6.0.0" +version = "7.1.0" description = "Read metadata from Python packages" -category = "main" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" +files = [ + {file = "importlib_metadata-7.1.0-py3-none-any.whl", hash = "sha256:30962b96c0c223483ed6cc7280e7f0199feb01a0e40cfae4d4450fc6fab1f570"}, + {file = "importlib_metadata-7.1.0.tar.gz", hash = "sha256:b78938b926ee8d5f020fc4772d487045805a55ddbad2ecf21c6d60938dc7fcd2"}, +] [package.dependencies] -typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} zipp = ">=0.5" [package.extras] -docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "sphinx-lint", "jaraco.tidelift (>=1.4)"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] perf = ["ipython"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "pytest-flake8", "importlib-resources (>=1.3)"] +testing = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-perf (>=0.9.2)", "pytest-ruff (>=0.2.1)"] [[package]] name = "platformdirs" -version = "3.0.0" +version = "4.2.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "main" optional = false -python-versions = ">=3.7" - -[package.dependencies] -typing-extensions = {version = ">=4.4", markers = "python_version < \"3.8\""} +python-versions = ">=3.8" +files = [ + {file = "platformdirs-4.2.0-py3-none-any.whl", hash = "sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068"}, + {file = "platformdirs-4.2.0.tar.gz", hash = "sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768"}, +] [package.extras] -docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx-autodoc-typehints (>=1.22,!=1.23.4)", "sphinx (>=6.1.3)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)", "pytest (>=7.2.1)"] +docs = ["furo (>=2023.9.10)", "proselint (>=0.13)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)"] [[package]] name = "protobuf" -version = "4.21.12" +version = "5.26.1" description = "" -category = "main" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" +files = [ + {file = "protobuf-5.26.1-cp310-abi3-win32.whl", hash = "sha256:3c388ea6ddfe735f8cf69e3f7dc7611e73107b60bdfcf5d0f024c3ccd3794e23"}, + {file = "protobuf-5.26.1-cp310-abi3-win_amd64.whl", hash = "sha256:e6039957449cb918f331d32ffafa8eb9255769c96aa0560d9a5bf0b4e00a2a33"}, + {file = "protobuf-5.26.1-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:38aa5f535721d5bb99861166c445c4105c4e285c765fbb2ac10f116e32dcd46d"}, + {file = "protobuf-5.26.1-cp37-abi3-manylinux2014_aarch64.whl", hash = "sha256:fbfe61e7ee8c1860855696e3ac6cfd1b01af5498facc6834fcc345c9684fb2ca"}, + {file = "protobuf-5.26.1-cp37-abi3-manylinux2014_x86_64.whl", hash = "sha256:f7417703f841167e5a27d48be13389d52ad705ec09eade63dfc3180a959215d7"}, + {file = "protobuf-5.26.1-cp38-cp38-win32.whl", hash = "sha256:d693d2504ca96750d92d9de8a103102dd648fda04540495535f0fec7577ed8fc"}, + {file = "protobuf-5.26.1-cp38-cp38-win_amd64.whl", hash = "sha256:9b557c317ebe6836835ec4ef74ec3e994ad0894ea424314ad3552bc6e8835b4e"}, + {file = "protobuf-5.26.1-cp39-cp39-win32.whl", hash = "sha256:b9ba3ca83c2e31219ffbeb9d76b63aad35a3eb1544170c55336993d7a18ae72c"}, + {file = "protobuf-5.26.1-cp39-cp39-win_amd64.whl", hash = "sha256:7ee014c2c87582e101d6b54260af03b6596728505c79f17c8586e7523aaa8f8c"}, + {file = "protobuf-5.26.1-py3-none-any.whl", hash = "sha256:da612f2720c0183417194eeaa2523215c4fcc1a1949772dc65f05047e08d5932"}, + {file = "protobuf-5.26.1.tar.gz", hash = "sha256:8ca2a1d97c290ec7b16e4e5dff2e5ae150cc1582f55b5ab300d45cb0dfa90e51"}, +] [[package]] name = "pyyaml" -version = "6.0" +version = "6.0.1" description = "YAML parser and emitter for Python" -category = "main" optional = true python-versions = ">=3.6" +files = [ + {file = "PyYAML-6.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a"}, + {file = "PyYAML-6.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, + {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, + {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, + {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, + {file = "PyYAML-6.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, + {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, + {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, + {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd"}, + {file = "PyYAML-6.0.1-cp36-cp36m-win32.whl", hash = "sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585"}, + {file = "PyYAML-6.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa"}, + {file = "PyYAML-6.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c"}, + {file = "PyYAML-6.0.1-cp37-cp37m-win32.whl", hash = "sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba"}, + {file = "PyYAML-6.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867"}, + {file = "PyYAML-6.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, + {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, + {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, + {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, + {file = "PyYAML-6.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, + {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, + {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, + {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, +] [[package]] name = "tblib" -version = "1.7.0" +version = "3.0.0" description = "Traceback serialization library." -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" - -[[package]] -name = "typing-extensions" -version = "4.4.0" -description = "Backported and Experimental Type Hints for Python 3.7+" -category = "main" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" +files = [ + {file = "tblib-3.0.0-py3-none-any.whl", hash = "sha256:80a6c77e59b55e83911e1e607c649836a69c103963c5f28a46cbeef44acf8129"}, + {file = "tblib-3.0.0.tar.gz", hash = "sha256:93622790a0a29e04f0346458face1e144dc4d32f493714c6c3dff82a4adb77e6"}, +] [[package]] name = "virtualenv" -version = "20.19.0" +version = "20.25.1" description = "Virtual Python Environment builder" -category = "main" optional = true python-versions = ">=3.7" +files = [ + {file = "virtualenv-20.25.1-py3-none-any.whl", hash = "sha256:961c026ac520bac5f69acb8ea063e8a4f071bcc9457b9c1f28f6b085c511583a"}, + {file = "virtualenv-20.25.1.tar.gz", hash = "sha256:e08e13ecdca7a0bd53798f356d5831434afa5b07b93f0abdf0797b7a06ffe197"}, +] [package.dependencies] -distlib = ">=0.3.6,<1" -filelock = ">=3.4.1,<4" -importlib-metadata = {version = ">=4.8.3", markers = "python_version < \"3.8\""} -platformdirs = ">=2.4,<4" +distlib = ">=0.3.7,<1" +filelock = ">=3.12.2,<4" +platformdirs = ">=3.9.1,<5" [package.extras] -docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx-argparse (>=0.4)", "sphinx (>=6.1.3)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=22.12)"] -test = ["covdefaults (>=2.2.2)", "coverage-enable-subprocess (>=1)", "coverage (>=7.1)", "flaky (>=3.7)", "packaging (>=23)", "pytest-env (>=0.8.1)", "pytest-freezegun (>=0.4.2)", "pytest-mock (>=3.10)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "pytest (>=7.2.1)"] +docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.2)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"] +test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8)", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10)"] [[package]] name = "zipp" -version = "3.12.1" +version = "3.18.1" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "main" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" +files = [ + {file = "zipp-3.18.1-py3-none-any.whl", hash = "sha256:206f5a15f2af3dbaee80769fb7dc6f249695e940acca08dfb2a4769fe61e538b"}, + {file = "zipp-3.18.1.tar.gz", hash = "sha256:2884ed22e7d8961de1c9a05142eb69a247f120291bc0206a00a7642f09b5b715"}, +] [package.extras] -docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "sphinx-lint", "jaraco.tidelift (>=1.4)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "func-timeout", "jaraco.functools", "more-itertools", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "pytest-flake8"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy", "pytest-ruff (>=0.2.1)"] [extras] -build = ["virtualenv", "PyYAML"] +build = ["PyYAML", "virtualenv"] grpc = [] server = [] [metadata] -lock-version = "1.1" -python-versions = ">=3.7,<4.0" -content-hash = "5a52399794689f8c935590f76870487fbc367e96f370d988e4aa86f7f4f530ec" - -[metadata.files] -distlib = [ - {file = "distlib-0.3.6-py2.py3-none-any.whl", hash = "sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e"}, - {file = "distlib-0.3.6.tar.gz", hash = "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46"}, -] -filelock = [ - {file = "filelock-3.9.0-py3-none-any.whl", hash = "sha256:f58d535af89bb9ad5cd4df046f741f8553a418c01a7856bf0d173bbc9f6bd16d"}, - {file = "filelock-3.9.0.tar.gz", hash = "sha256:7b319f24340b51f55a2bf7a12ac0755a9b03e718311dac567a0f4f7fabd2f5de"}, -] -grpcio = [ - {file = "grpcio-1.52.0-cp310-cp310-linux_armv7l.whl", hash = "sha256:7a6f6e2857908f9d7dc9a3150d45c72a35c351aa74621100145bd8ce4d083cac"}, - {file = "grpcio-1.52.0-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:b0c55958d3aa9b60eabd1cb230e2d80e48bc4baa2f7e90e7637dc8429538599a"}, - {file = "grpcio-1.52.0-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:ef46f86aabc254d1599adf00eaa47f9d8b8c2af51b89934f0dbe2309b829c778"}, - {file = "grpcio-1.52.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5d767848c6540130b00255d062e0eee7e8fe53dabef6c7bdf19b8e12085324f7"}, - {file = "grpcio-1.52.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c07775ad29baaa957e13a2fdb9724aa734b81be9be015c25d36bd93544a9279e"}, - {file = "grpcio-1.52.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:8e64e5d2e76745584c193e29f68fa038ad516e3b03fb16ccff9cc6c416c08b94"}, - {file = "grpcio-1.52.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bc9467256c0525f83cadf0a77141ea393d3ed1bd1c218ac835e073d8a56d3c50"}, - {file = "grpcio-1.52.0-cp310-cp310-win32.whl", hash = "sha256:7d4da24ec79183a27e690de06e7b5765734fe958651473b27c7d0020a2e465e4"}, - {file = "grpcio-1.52.0-cp310-cp310-win_amd64.whl", hash = "sha256:b274c8240b30cccca70128051e767b498679040f29304b904e463249c06f37ab"}, - {file = "grpcio-1.52.0-cp311-cp311-linux_armv7l.whl", hash = "sha256:9cb42152c9880d340fc879ef86c9362014d029c1aac5629b1ff6b013e7722965"}, - {file = "grpcio-1.52.0-cp311-cp311-macosx_10_10_universal2.whl", hash = "sha256:fefbf58dd05b6aaf39dfe1df4a1464680b44496cc617083cb141ec18aac1d6d4"}, - {file = "grpcio-1.52.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0ed59aeb98cd95ba794d6fc77623f4bb340d1a362c0e156c086e942d21403d2a"}, - {file = "grpcio-1.52.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c5553e5d881a733512cca25f810d746d7f405dcaddf0525bf99c8e7953c4ecd"}, - {file = "grpcio-1.52.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:24fdf136bc0ccf85a3c0a572c3ea71957529299d4ec208eb1f2a1d06f2b17cf2"}, - {file = "grpcio-1.52.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:bc7976baed22b87548bfd37defddb4344f4a9959bf3d276ae2cb624caa11c234"}, - {file = "grpcio-1.52.0-cp311-cp311-win32.whl", hash = "sha256:84edd2ae3c0e4ca320dfc79c24ea554e06faf1a21e5ebdb1441450dec702444e"}, - {file = "grpcio-1.52.0-cp311-cp311-win_amd64.whl", hash = "sha256:ae38c4f5e724fe85550714d56213a2eb4335a1a795bff88b3dbc75cfbc036ef2"}, - {file = "grpcio-1.52.0-cp37-cp37m-linux_armv7l.whl", hash = "sha256:10ac3d9cbc576642257c5bc674b3f6349ebcfd0ce198630423c4dedae4e545ec"}, - {file = "grpcio-1.52.0-cp37-cp37m-macosx_10_10_universal2.whl", hash = "sha256:e61683fd0a8a05ba788a067942c2bc73368cbf7836f0071268fc0abadc287dea"}, - {file = "grpcio-1.52.0-cp37-cp37m-manylinux_2_17_aarch64.whl", hash = "sha256:f290c80604a0fd0e202b4f76f3bc6eed6c0750e88525f91219ccb5cc99213fca"}, - {file = "grpcio-1.52.0-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7bb4cae47cf9fe2bd51ddabb14f310dc35812c3676c8972006119a8b01050567"}, - {file = "grpcio-1.52.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:25175ed51891150e16bc63b69fb96db71b04080a17c09e83f750e118fa5b775a"}, - {file = "grpcio-1.52.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:d9e06472f59f585235ac51e4645f42a02a262fc7480fad13ede0b3c11cefa8a1"}, - {file = "grpcio-1.52.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:c073f4fdcbdac14fbb1b9c001222c76c446874a8ec6def028e72a746cc9cc20e"}, - {file = "grpcio-1.52.0-cp37-cp37m-win32.whl", hash = "sha256:acf13fabfb5d974e5c489c6fabe3037a6d8105030e9571cf7f8f6f92c49e734c"}, - {file = "grpcio-1.52.0-cp37-cp37m-win_amd64.whl", hash = "sha256:53406f1384406a66c18a9034265d0ad7eeafd3579da552c459bfa330ef43fcf8"}, - {file = "grpcio-1.52.0-cp38-cp38-linux_armv7l.whl", hash = "sha256:b49126b66bde56d90d970e9d091e26b600d345a8222f4214f732b30cf63756d9"}, - {file = "grpcio-1.52.0-cp38-cp38-macosx_10_10_universal2.whl", hash = "sha256:9b929fb9ee7ae082c7930aa58128138ab26f1c60e205b541f0a18975a74c2641"}, - {file = "grpcio-1.52.0-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:434a693418dd706f6ba27d9b5ee5a6c7ee0302b197ac3e05e4080501a31b0b73"}, - {file = "grpcio-1.52.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d05eef8a94d74459582cd36dbc34aa6f2e0dcb4d59f08c8093b9728f0ccf694a"}, - {file = "grpcio-1.52.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6354bc9083a57b1c6e0cc87065733c356806fa8260ec055387a73d445cf5a1d6"}, - {file = "grpcio-1.52.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:f34376ef75d7f70ad2c07fc7750a3293c034cce09aafc82fe7ae782542cce687"}, - {file = "grpcio-1.52.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2f86596763fe0c2077c7193c9d941d282b4bd7c086262e797e8d4290a3cfa9d5"}, - {file = "grpcio-1.52.0-cp38-cp38-win32.whl", hash = "sha256:d37b32f043f7f1a0d6512cabb0439e987a2c7f946e97c87fa4e26e46dfce8ef0"}, - {file = "grpcio-1.52.0-cp38-cp38-win_amd64.whl", hash = "sha256:92602fc9457f2957a9505a2e8d53e8382345494b32b551626723c4ead304c539"}, - {file = "grpcio-1.52.0-cp39-cp39-linux_armv7l.whl", hash = "sha256:486632391067cfa9acd0d58d76543fe26449d8d647ab5f24b24879f4fa45846b"}, - {file = "grpcio-1.52.0-cp39-cp39-macosx_10_10_universal2.whl", hash = "sha256:c73cfc5ef2193b2ab215576524e915bf38ed96b3557086e8e9d8c8ea43c9b02c"}, - {file = "grpcio-1.52.0-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:3bbea65a62ab8a1bc3180aa24dd0d049216856a5c6b470b88769a47bc4b59d8a"}, - {file = "grpcio-1.52.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7128eaf3c789f7043cdecf7849efb9bb5dddc53f9f753f77613796bf6ea73515"}, - {file = "grpcio-1.52.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:81cc7210dc4735200d81764ad8c3761845a6b95fad36d586fa10cc4f95dc3106"}, - {file = "grpcio-1.52.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:2e85431a3f2970303d34596ae5bd6d07842255f897009b63b23d27b315b6ef69"}, - {file = "grpcio-1.52.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:71e3185ac3425efc45e7999acba25dc5cc12a8abea46b2dd0f460c50df804974"}, - {file = "grpcio-1.52.0-cp39-cp39-win32.whl", hash = "sha256:44b326a7ffa56dd44168e067e076121d68a11eeccdcbcf804e9b9bd02e7bc6d8"}, - {file = "grpcio-1.52.0-cp39-cp39-win_amd64.whl", hash = "sha256:a6329dc693f0ac781219063c4b2c4bedc5519e280fe2f55ce6abc15b05a40d05"}, - {file = "grpcio-1.52.0.tar.gz", hash = "sha256:a5d4a83d29fc39af429c10b9b326c174fec49b73398e4a966a1f2a4f30aa4fdb"}, -] -importlib-metadata = [ - {file = "importlib_metadata-6.0.0-py3-none-any.whl", hash = "sha256:7efb448ec9a5e313a57655d35aa54cd3e01b7e1fbcf72dce1bf06119420f5bad"}, - {file = "importlib_metadata-6.0.0.tar.gz", hash = "sha256:e354bedeb60efa6affdcc8ae121b73544a7aa74156d047311948f6d711cd378d"}, -] -platformdirs = [ - {file = "platformdirs-3.0.0-py3-none-any.whl", hash = "sha256:b1d5eb14f221506f50d6604a561f4c5786d9e80355219694a1b244bcd96f4567"}, - {file = "platformdirs-3.0.0.tar.gz", hash = "sha256:8a1228abb1ef82d788f74139988b137e78692984ec7b08eaa6c65f1723af28f9"}, -] -protobuf = [ - {file = "protobuf-4.21.12-cp310-abi3-win32.whl", hash = "sha256:b135410244ebe777db80298297a97fbb4c862c881b4403b71bac9d4107d61fd1"}, - {file = "protobuf-4.21.12-cp310-abi3-win_amd64.whl", hash = "sha256:89f9149e4a0169cddfc44c74f230d7743002e3aa0b9472d8c28f0388102fc4c2"}, - {file = "protobuf-4.21.12-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:299ea899484ee6f44604deb71f424234f654606b983cb496ea2a53e3c63ab791"}, - {file = "protobuf-4.21.12-cp37-abi3-manylinux2014_aarch64.whl", hash = "sha256:d1736130bce8cf131ac7957fa26880ca19227d4ad68b4888b3be0dea1f95df97"}, - {file = "protobuf-4.21.12-cp37-abi3-manylinux2014_x86_64.whl", hash = "sha256:78a28c9fa223998472886c77042e9b9afb6fe4242bd2a2a5aced88e3f4422aa7"}, - {file = "protobuf-4.21.12-cp37-cp37m-win32.whl", hash = "sha256:3d164928ff0727d97022957c2b849250ca0e64777ee31efd7d6de2e07c494717"}, - {file = "protobuf-4.21.12-cp37-cp37m-win_amd64.whl", hash = "sha256:f45460f9ee70a0ec1b6694c6e4e348ad2019275680bd68a1d9314b8c7e01e574"}, - {file = "protobuf-4.21.12-cp38-cp38-win32.whl", hash = "sha256:6ab80df09e3208f742c98443b6166bcb70d65f52cfeb67357d52032ea1ae9bec"}, - {file = "protobuf-4.21.12-cp38-cp38-win_amd64.whl", hash = "sha256:1f22ac0ca65bb70a876060d96d914dae09ac98d114294f77584b0d2644fa9c30"}, - {file = "protobuf-4.21.12-cp39-cp39-win32.whl", hash = "sha256:27f4d15021da6d2b706ddc3860fac0a5ddaba34ab679dc182b60a8bb4e1121cc"}, - {file = "protobuf-4.21.12-cp39-cp39-win_amd64.whl", hash = "sha256:237216c3326d46808a9f7c26fd1bd4b20015fb6867dc5d263a493ef9a539293b"}, - {file = "protobuf-4.21.12-py2.py3-none-any.whl", hash = "sha256:a53fd3f03e578553623272dc46ac2f189de23862e68565e83dde203d41b76fc5"}, - {file = "protobuf-4.21.12-py3-none-any.whl", hash = "sha256:b98d0148f84e3a3c569e19f52103ca1feacdac0d2df8d6533cf983d1fda28462"}, - {file = "protobuf-4.21.12.tar.gz", hash = "sha256:7cd532c4566d0e6feafecc1059d04c7915aec8e182d1cf7adee8b24ef1e2e6ab"}, -] -pyyaml = [ - {file = "PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53"}, - {file = "PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c"}, - {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc"}, - {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b"}, - {file = "PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5"}, - {file = "PyYAML-6.0-cp310-cp310-win32.whl", hash = "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513"}, - {file = "PyYAML-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a"}, - {file = "PyYAML-6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d4b0ba9512519522b118090257be113b9468d804b19d63c71dbcf4a48fa32358"}, - {file = "PyYAML-6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:81957921f441d50af23654aa6c5e5eaf9b06aba7f0a19c18a538dc7ef291c5a1"}, - {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:afa17f5bc4d1b10afd4466fd3a44dc0e245382deca5b3c353d8b757f9e3ecb8d"}, - {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f"}, - {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:432557aa2c09802be39460360ddffd48156e30721f5e8d917f01d31694216782"}, - {file = "PyYAML-6.0-cp311-cp311-win32.whl", hash = "sha256:bfaef573a63ba8923503d27530362590ff4f576c626d86a9fed95822a8255fd7"}, - {file = "PyYAML-6.0-cp311-cp311-win_amd64.whl", hash = "sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf"}, - {file = "PyYAML-6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86"}, - {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f"}, - {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92"}, - {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4"}, - {file = "PyYAML-6.0-cp36-cp36m-win32.whl", hash = "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293"}, - {file = "PyYAML-6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57"}, - {file = "PyYAML-6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c"}, - {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0"}, - {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4"}, - {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9"}, - {file = "PyYAML-6.0-cp37-cp37m-win32.whl", hash = "sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737"}, - {file = "PyYAML-6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d"}, - {file = "PyYAML-6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b"}, - {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba"}, - {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34"}, - {file = "PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287"}, - {file = "PyYAML-6.0-cp38-cp38-win32.whl", hash = "sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78"}, - {file = "PyYAML-6.0-cp38-cp38-win_amd64.whl", hash = "sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07"}, - {file = "PyYAML-6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b"}, - {file = "PyYAML-6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174"}, - {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803"}, - {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3"}, - {file = "PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0"}, - {file = "PyYAML-6.0-cp39-cp39-win32.whl", hash = "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb"}, - {file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"}, - {file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"}, -] -tblib = [ - {file = "tblib-1.7.0-py2.py3-none-any.whl", hash = "sha256:289fa7359e580950e7d9743eab36b0691f0310fce64dee7d9c31065b8f723e23"}, - {file = "tblib-1.7.0.tar.gz", hash = "sha256:059bd77306ea7b419d4f76016aef6d7027cc8a0785579b5aad198803435f882c"}, -] -typing-extensions = [ - {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"}, - {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"}, -] -virtualenv = [ - {file = "virtualenv-20.19.0-py3-none-any.whl", hash = "sha256:54eb59e7352b573aa04d53f80fc9736ed0ad5143af445a1e539aada6eb947dd1"}, - {file = "virtualenv-20.19.0.tar.gz", hash = "sha256:37a640ba82ed40b226599c522d411e4be5edb339a0c0de030c0dc7b646d61590"}, -] -zipp = [ - {file = "zipp-3.12.1-py3-none-any.whl", hash = "sha256:6c4fe274b8f85ec73c37a8e4e3fa00df9fb9335da96fb789e3b96b318e5097b3"}, - {file = "zipp-3.12.1.tar.gz", hash = "sha256:a3cac813d40993596b39ea9e93a18e8a2076d5c378b8bc88ec32ab264e04ad02"}, -] +lock-version = "2.0" +python-versions = ">=3.8,<4.0" +content-hash = "7b9b515eba64ed96fdf15df30811dba11021d21834577d2db7bcd97a703285e8" diff --git a/pyproject.toml b/pyproject.toml index fe530d4..abf53cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ authors = ["Features & Labels "] repository = "https://github.com/fal-ai/isolate" [tool.poetry.dependencies] -python = ">=3.7,<4.0" +python = ">=3.8,<4.0" grpcio = ">=1.49" protobuf = "*" diff --git a/src/isolate/backends/_base.py b/src/isolate/backends/_base.py index 05e8322..279c3c9 100644 --- a/src/isolate/backends/_base.py +++ b/src/isolate/backends/_base.py @@ -6,10 +6,8 @@ Any, Callable, ClassVar, - Dict, Generic, Iterator, - Optional, TypeVar, ) @@ -37,14 +35,14 @@ class BaseEnvironment(Generic[ConnectionKeyType]): """Represents a managed environment definition for an isolatation backend that can be used to run Python code with different set of dependencies.""" - BACKEND_NAME: ClassVar[Optional[str]] = None + BACKEND_NAME: ClassVar[str | None] = None settings: IsolateSettings = DEFAULT_SETTINGS @classmethod def from_config( cls, - config: Dict[str, Any], + config: dict[str, Any], settings: IsolateSettings = DEFAULT_SETTINGS, ) -> BaseEnvironment: """Create a new environment from the given configuration.""" diff --git a/src/isolate/backends/common.py b/src/isolate/backends/common.py index 277c2c3..0b3730c 100644 --- a/src/isolate/backends/common.py +++ b/src/isolate/backends/common.py @@ -12,7 +12,7 @@ from functools import lru_cache from pathlib import Path from types import ModuleType -from typing import Callable, Dict, Iterator, Optional, Tuple, Union +from typing import Callable, Iterator # For ensuring that the lock is created and not forgotten # (e.g. the process which acquires it crashes, so it is never @@ -91,7 +91,7 @@ def get_executable_path(search_path: Path, executable_name: str) -> Path: def _io_observer( - hooks: Dict[int, HookT], + hooks: dict[int, HookT], termination_event: threading.Event, ) -> threading.Thread: """Starts a new thread that reads from the specified file descriptors @@ -156,7 +156,7 @@ def _reader(): return observer_thread -def _unblocked_pipe() -> Tuple[int, int]: +def _unblocked_pipe() -> tuple[int, int]: """Create a pair of unblocked pipes. This is actually the same as os.pipe2(os.O_NONBLOCK), but that is not available in MacOS so we have to do it manually.""" @@ -170,8 +170,8 @@ def _unblocked_pipe() -> Tuple[int, int]: @contextmanager def logged_io( stdout_hook: HookT, - stderr_hook: Optional[HookT] = None, -) -> Iterator[Tuple[int, int]]: + stderr_hook: HookT | None = None, +) -> Iterator[tuple[int, int]]: """Open two new streams (for stdout and stderr, respectively) and start relaying all the output from them to the given hooks.""" @@ -201,11 +201,11 @@ def logged_io( @lru_cache(maxsize=None) -def sha256_digest_of(*unique_fields: Union[str, bytes]) -> str: +def sha256_digest_of(*unique_fields: str | bytes) -> str: """Return the SHA256 digest that corresponds to the combined version of 'unique_fields. The order is preserved.""" - def _normalize(text: Union[str, bytes]) -> bytes: + def _normalize(text: str | bytes) -> bytes: if isinstance(text, str): return text.encode() else: diff --git a/src/isolate/backends/conda.py b/src/isolate/backends/conda.py index 6223a66..a4a9866 100644 --- a/src/isolate/backends/conda.py +++ b/src/isolate/backends/conda.py @@ -7,7 +7,7 @@ from dataclasses import dataclass, field from functools import partial from pathlib import Path -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar from isolate.backends import BaseEnvironment, EnvironmentCreationError from isolate.backends.common import ( @@ -41,16 +41,16 @@ class CondaEnvironment(BaseEnvironment[Path]): BACKEND_NAME: ClassVar[str] = "conda" - environment_definition: Dict[str, Any] = field(default_factory=dict) - python_version: Optional[str] = None - tags: List[str] = field(default_factory=list) - _exec_home: Optional[str] = _ISOLATE_MAMBA_HOME - _exec_command: Optional[str] = _MAMBA_COMMAND + environment_definition: dict[str, Any] = field(default_factory=dict) + python_version: str | None = None + tags: list[str] = field(default_factory=list) + _exec_home: str | None = _ISOLATE_MAMBA_HOME + _exec_command: str | None = _MAMBA_COMMAND @classmethod def from_config( cls, - config: Dict[str, Any], + config: dict[str, Any], settings: IsolateSettings = DEFAULT_SETTINGS, ) -> BaseEnvironment: processing_config = copy.deepcopy(config) @@ -187,7 +187,7 @@ def open_connection(self, connection_key: Path) -> PythonIPC: def _depends_on( - dependencies: List[Union[str, Dict[str, List[str]]]], + dependencies: list[str | dict[str, list[str]]], package_name: str, ) -> bool: for dependency in dependencies: diff --git a/src/isolate/backends/local.py b/src/isolate/backends/local.py index e2aa6af..5338980 100644 --- a/src/isolate/backends/local.py +++ b/src/isolate/backends/local.py @@ -3,7 +3,7 @@ import sys from dataclasses import dataclass from pathlib import Path -from typing import Any, ClassVar, Dict +from typing import Any, ClassVar from isolate.backends import BaseEnvironment from isolate.backends.common import sha256_digest_of @@ -18,7 +18,7 @@ class LocalPythonEnvironment(BaseEnvironment[Path]): @classmethod def from_config( cls, - config: Dict[str, Any], + config: dict[str, Any], settings: IsolateSettings = DEFAULT_SETTINGS, ) -> BaseEnvironment: environment = cls(**config) diff --git a/src/isolate/backends/pyenv.py b/src/isolate/backends/pyenv.py index 847b027..486b26e 100644 --- a/src/isolate/backends/pyenv.py +++ b/src/isolate/backends/pyenv.py @@ -7,7 +7,7 @@ from dataclasses import dataclass from functools import partial from pathlib import Path -from typing import Any, ClassVar, Dict, Optional +from typing import Any, ClassVar from isolate.backends import BaseEnvironment, EnvironmentCreationError from isolate.backends.common import logged_io @@ -28,7 +28,7 @@ class PyenvEnvironment(BaseEnvironment[Path]): @classmethod def from_config( cls, - config: Dict[str, Any], + config: dict[str, Any], settings: IsolateSettings = DEFAULT_SETTINGS, ) -> BaseEnvironment: environment = cls(**config) @@ -60,7 +60,7 @@ def create(self, *, force: bool = False) -> Path: assert prefix is not None return prefix - def _try_get_prefix(self, pyenv: Path, root_path: Path) -> Optional[Path]: + def _try_get_prefix(self, pyenv: Path, root_path: Path) -> Path | None: try: prefix = subprocess.check_output( [pyenv, "prefix", self.python_version], diff --git a/src/isolate/backends/remote.py b/src/isolate/backends/remote.py index d3b9048..208a52f 100644 --- a/src/isolate/backends/remote.py +++ b/src/isolate/backends/remote.py @@ -3,7 +3,7 @@ import copy import json from dataclasses import dataclass -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, List import grpc @@ -28,12 +28,12 @@ class IsolateServer(BaseEnvironment[List[EnvironmentDefinition]]): BACKEND_NAME: ClassVar[str] = "isolate-server" host: str - target_environments: List[Dict[str, Any]] + target_environments: list[dict[str, Any]] @classmethod def from_config( cls, - config: Dict[str, Any], + config: dict[str, Any], settings: IsolateSettings = DEFAULT_SETTINGS, ) -> BaseEnvironment: environment = cls(**config) @@ -48,7 +48,7 @@ def key(self) -> str: json.dumps(self.target_environments), ) - def create(self, *, force: bool = False) -> List[EnvironmentDefinition]: + def create(self, *, force: bool = False) -> list[EnvironmentDefinition]: if force is True: raise NotImplementedError( "Only individual environments can be forcibly created, please set them up" @@ -75,7 +75,7 @@ def exists(self) -> bool: def open_connection( self, - connection_key: List[EnvironmentDefinition], + connection_key: list[EnvironmentDefinition], ) -> IsolateServerConnection: return IsolateServerConnection(self, self.host, connection_key) @@ -83,8 +83,8 @@ def open_connection( @dataclass class IsolateServerConnection(EnvironmentConnection): host: str - definitions: List[EnvironmentDefinition] - _channel: Optional[grpc.Channel] = None + definitions: list[EnvironmentDefinition] + _channel: grpc.Channel | None = None def _acquire_channel(self) -> None: self._channel = grpc.insecure_channel(self.host) diff --git a/src/isolate/backends/virtualenv.py b/src/isolate/backends/virtualenv.py index 0138e62..ee804aa 100644 --- a/src/isolate/backends/virtualenv.py +++ b/src/isolate/backends/virtualenv.py @@ -6,7 +6,7 @@ from dataclasses import dataclass, field from functools import partial from pathlib import Path -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar from isolate.backends import BaseEnvironment, EnvironmentCreationError from isolate.backends.common import ( @@ -29,17 +29,17 @@ class VirtualPythonEnvironment(BaseEnvironment[Path]): BACKEND_NAME: ClassVar[str] = "virtualenv" - requirements: List[str] = field(default_factory=list) - constraints_file: Optional[os.PathLike] = None - python_version: Optional[str] = None - extra_index_urls: List[str] = field(default_factory=list) - tags: List[str] = field(default_factory=list) - resolver: Optional[str] = None + requirements: list[str] = field(default_factory=list) + constraints_file: os.PathLike | None = None + python_version: str | None = None + extra_index_urls: list[str] = field(default_factory=list) + tags: list[str] = field(default_factory=list) + resolver: str | None = None @classmethod def from_config( cls, - config: Dict[str, Any], + config: dict[str, Any], settings: IsolateSettings = DEFAULT_SETTINGS, ) -> BaseEnvironment: environment = cls(**config) @@ -99,7 +99,7 @@ def install_requirements(self, path: Path) -> None: else: base_pip_cmd = [get_executable_path(path, "pip")] - pip_cmd: List[Union[str, os.PathLike]] = [ + pip_cmd: list[str | os.PathLike] = [ *base_pip_cmd, # type: ignore "install", *self.requirements, diff --git a/src/isolate/connections/_local/_base.py b/src/isolate/connections/_local/_base.py index 3f88e21..e5a1776 100644 --- a/src/isolate/connections/_local/_base.py +++ b/src/isolate/connections/_local/_base.py @@ -10,12 +10,9 @@ from typing import ( TYPE_CHECKING, Any, - Dict, Generic, Iterator, - List, TypeVar, - Union, ) from isolate.backends.common import get_executable_path, logged_io @@ -102,7 +99,7 @@ class PythonExecutionBase(Generic[ConnectionType]): environment: BaseEnvironment environment_path: Path - extra_inheritance_paths: List[Path] = field(default_factory=list) + extra_inheritance_paths: list[Path] = field(default_factory=list) @contextmanager def start_process( @@ -127,7 +124,7 @@ def start_process( text=True, ) - def get_env_vars(self) -> Dict[str, str]: + def get_env_vars(self) -> dict[str, str]: """Return the environment variables to run the agent process with. By default PYTHONUNBUFFERED is set to 1 to ensure the prints to stdout/stderr are reflect immediately (so that we can seamlessly transfer logs).""" @@ -161,7 +158,7 @@ def get_python_cmd( self, executable: Path, connection: ConnectionType, - ) -> List[Union[str, Path]]: + ) -> list[str | Path]: """Return the command to run the agent process with.""" raise NotImplementedError diff --git a/src/isolate/connections/common.py b/src/isolate/connections/common.py index 3a5ec95..d227a6d 100644 --- a/src/isolate/connections/common.py +++ b/src/isolate/connections/common.py @@ -4,7 +4,7 @@ import os from contextlib import contextmanager from dataclasses import dataclass -from typing import TYPE_CHECKING, Any, Iterator, Optional, cast +from typing import TYPE_CHECKING, Any, Iterator, cast from tblib import Traceback, TracebackParseError @@ -59,7 +59,7 @@ def load_serialized_object( raw_object: bytes, *, was_it_raised: bool = False, - stringized_traceback: Optional[str] = None, + stringized_traceback: str | None = None, ) -> Any: """Load the given serialized object using the given serialization method. If anything fails, then a SerializationError will be raised. If the was_it_raised @@ -101,7 +101,7 @@ def is_agent() -> bool: def prepare_exc( exc: BaseException, *, - stringized_traceback: Optional[str] = None, + stringized_traceback: str | None = None, ) -> BaseException: if stringized_traceback: try: diff --git a/src/isolate/connections/grpc/agent.py b/src/isolate/connections/grpc/agent.py index 48ef418..4dd0149 100644 --- a/src/isolate/connections/grpc/agent.py +++ b/src/isolate/connections/grpc/agent.py @@ -8,7 +8,6 @@ from dataclasses import dataclass, field from typing import ( Any, - Dict, Generator, Iterable, Iterator, @@ -33,7 +32,7 @@ class AbortException(Exception): @dataclass class AgentServicer(definitions.AgentServicer): - _run_cache: Dict[str, Any] = field(default_factory=dict) + _run_cache: dict[str, Any] = field(default_factory=dict) def Run( self, diff --git a/src/isolate/connections/ipc/_base.py b/src/isolate/connections/ipc/_base.py index 9235418..8e1aa82 100644 --- a/src/isolate/connections/ipc/_base.py +++ b/src/isolate/connections/ipc/_base.py @@ -13,9 +13,6 @@ Any, Callable, ContextManager, - List, - Tuple, - Union, ) from isolate.backends import ( @@ -71,7 +68,7 @@ def loadserialization_method(backend_name: str) -> Any: return importlib.import_module(backend_name) -def encode_service_address(address: Tuple[str, int]) -> str: +def encode_service_address(address: tuple[str, int]) -> str: host, port = address return base64.b64encode(f"{host}:{port}".encode()).decode("utf-8") @@ -203,7 +200,7 @@ def get_python_cmd( self, executable: Path, connection: AgentListener, - ) -> List[Union[str, Path]]: + ) -> list[str | Path]: assert isinstance(connection.address, tuple) return [ executable, diff --git a/src/isolate/logs.py b/src/isolate/logs.py index 1bdb589..107c96c 100644 --- a/src/isolate/logs.py +++ b/src/isolate/logs.py @@ -6,7 +6,7 @@ from enum import Enum from functools import total_ordering from pathlib import Path -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING if TYPE_CHECKING: @@ -62,7 +62,7 @@ class Log: message: str source: LogSource level: LogLevel = LogLevel.INFO - bound_env: Optional[BaseEnvironment] = field(default=None, repr=False) + bound_env: BaseEnvironment | None = field(default=None, repr=False) timestamp: datetime = field(default_factory=lambda: datetime.now(timezone.utc)) def __str__(self) -> str: diff --git a/src/isolate/registry.py b/src/isolate/registry.py index b3c564a..4410775 100644 --- a/src/isolate/registry.py +++ b/src/isolate/registry.py @@ -1,7 +1,7 @@ from __future__ import annotations import sys -from typing import TYPE_CHECKING, Any, Dict, Type +from typing import TYPE_CHECKING, Any if sys.version_info >= (3, 10): import importlib.metadata as importlib_metadata @@ -15,8 +15,8 @@ # time by simply adding an entry point to the `isolate.environment` group. _ENTRY_POINT = "isolate.backends" -_ENTRY_POINTS: Dict[str, importlib_metadata.EntryPoint] = {} -_ENVIRONMENTS: Dict[str, Type["BaseEnvironment"]] = {} +_ENTRY_POINTS: dict[str, importlib_metadata.EntryPoint] = {} +_ENVIRONMENTS: dict[str, type[BaseEnvironment]] = {} def _reload_registry() -> None: diff --git a/src/isolate/server/server.py b/src/isolate/server/server.py index 3633069..3b51617 100644 --- a/src/isolate/server/server.py +++ b/src/isolate/server/server.py @@ -12,7 +12,7 @@ from functools import partial from queue import Empty as QueueEmpty from queue import Queue -from typing import Any, Callable, Dict, Iterator, List, Tuple, cast +from typing import Any, Callable, Iterator, cast import grpc from grpc import ServicerContext, StatusCode @@ -93,7 +93,7 @@ def terminate(self) -> None: @dataclass class BridgeManager: _agent_access_lock: threading.Lock = field(default_factory=threading.Lock) - _agents: Dict[Tuple[Any, ...], List[RunnerAgent]] = field( + _agents: dict[tuple[Any, ...], list[RunnerAgent]] = field( default_factory=lambda: defaultdict(list) ) _stack: ExitStack = field(default_factory=ExitStack) @@ -103,7 +103,7 @@ def establish( self, connection: LocalPythonGRPC, queue: Queue, - ) -> Iterator[Tuple[definitions.AgentStub, Queue]]: + ) -> Iterator[tuple[definitions.AgentStub, Queue]]: agent = self._allocate_new_agent(connection, queue) try: @@ -139,7 +139,7 @@ def _allocate_new_agent( ) return RunnerAgent(stub, queue, bound_context) - def _identify(self, connection: LocalPythonGRPC) -> Tuple[Any, ...]: + def _identify(self, connection: LocalPythonGRPC) -> tuple[Any, ...]: return ( connection.environment_path, *connection.extra_inheritance_paths, diff --git a/tests/test_backends.py b/tests/test_backends.py index 1a30d41..156275e 100644 --- a/tests/test_backends.py +++ b/tests/test_backends.py @@ -191,7 +191,6 @@ def test_executable_running(self, tmp_path): py_version = self._run_cmd(connection, "python", "--version") assert py_version.startswith("Python 3") - @pytest.mark.xfail(reason="need to fix conda error on python 3.7") def test_self_installed_executable_running(self, tmp_path): environment = self.get_project_environment(tmp_path, "black") with environment.connect() as connection: @@ -200,8 +199,8 @@ def test_self_installed_executable_running(self, tmp_path): def test_custom_python_version(self, tmp_path): for python_type, python_version in [ - ("old-python", "3.7"), - ("new-python", "3.10"), + ("old-python", "3.8"), + ("new-python", "3.11"), ]: environment = self.get_project_environment(tmp_path, python_type) python_version = self.get_python_version(environment, environment.create()) @@ -237,10 +236,10 @@ class TestVirtualenv(GenericEnvironmentTests): "requirements": ["black==22.12.0"], }, "old-python": { - "python_version": "3.7", + "python_version": "3.8", }, "new-python": { - "python_version": "3.10", + "python_version": "3.11", }, } creation_entry_point = ("virtualenv.cli_run", PermissionError) @@ -335,8 +334,8 @@ def test_custom_python_version(self, tmp_path, monkeypatch): ) for python_type, expected_python_version in [ - ("old-python", "3.7"), - ("new-python", "3.10"), + ("old-python", "3.8"), + ("new-python", "3.11"), ]: environment = self.get_project_environment(tmp_path, python_type) try: @@ -435,11 +434,11 @@ class TestConda(GenericEnvironmentTests): "packages": ["black=22.12.0"], }, "old-python": { - "python_version": "3.7", + "python_version": "3.8", "packages": [], }, "new-python": { - "python_version": "3.10", + "python_version": "3.11", "packages": [], }, "env-dict": { @@ -471,16 +470,16 @@ def test_conda_binary_execution(self, tmp_path): "user_packages", [ ["python"], - ["python=3.7"], - ["python>=3.7"], - ["python=3.7.*"], - ["python=3.7.10"], - ["python != 3.7"], - ["python> 3.7"], - ["python <3.7"], - ["pyjokes", "python>=3.7", "emoji"], - ["python<=3.7", "emoji"], - ["pyjokes", "python==3.7"], + ["python=3.8"], + ["python>=3.8"], + ["python=3.8.*"], + ["python=3.8.10"], + ["python != 3.8"], + ["python> 3.8"], + ["python <3.8"], + ["pyjokes", "python>=3.8", "emoji"], + ["python<=3.8", "emoji"], + ["pyjokes", "python==3.8"], ], ) @pytest.mark.parametrize("python_version", [None, "3.9"]) @@ -796,7 +795,7 @@ def test_wrong_options(kind, config): @pytest.mark.skipif(not IS_PYENV_AVAILABLE, reason="Pyenv is not available") -@pytest.mark.parametrize("python_version", ["3.7", "3.10", "3.9.15"]) +@pytest.mark.parametrize("python_version", ["3.8", "3.10", "3.9.15"]) def test_pyenv_environment(python_version, tmp_path): different_python = PyenvEnvironment(python_version) test_settings = IsolateSettings(Path(tmp_path)) diff --git a/tests/test_connections.py b/tests/test_connections.py index 88bae45..5bc0ab5 100644 --- a/tests/test_connections.py +++ b/tests/test_connections.py @@ -159,7 +159,7 @@ def foo(): return c def bar(): - a = str() + str() # noqa: F841 + a = "" + "" # noqa: F841 return 0 + foo() + 1 def baz():