From e981687a727f180d22fb6463fb2972c3e759aecc Mon Sep 17 00:00:00 2001 From: Adamantios Date: Mon, 25 Sep 2023 16:15:45 +0300 Subject: [PATCH] feat: update to python 3.11 --- .github/workflows/common_checks.yaml | 6 ++--- .github/workflows/release.yaml | 4 +-- README.md | 2 +- poetry.lock | 39 +++------------------------- pyproject.toml | 4 +-- scripts/check_dependencies.py | 6 ++++- tox.ini | 4 +-- 7 files changed, 18 insertions(+), 47 deletions(-) diff --git a/.github/workflows/common_checks.yaml b/.github/workflows/common_checks.yaml index a4ab127c5..7815cfcbe 100644 --- a/.github/workflows/common_checks.yaml +++ b/.github/workflows/common_checks.yaml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ ubuntu-latest, macos-latest, windows-latest ] - python-version: [ "3.10" ] + python-version: [ "3.11" ] poetry-version: ["1.4.0"] timeout-minutes: 10 @@ -41,7 +41,7 @@ jobs: strategy: matrix: os: [ ubuntu-latest ] - python-version: [ "3.10" ] + python-version: [ "3.11" ] timeout-minutes: 30 @@ -72,7 +72,7 @@ jobs: strategy: matrix: os: [ ubuntu-latest ] - python-version: [ "3.10" ] + python-version: [ "3.11" ] timeout-minutes: 30 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c71482b5f..687904f34 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -11,7 +11,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ["3.10"] + python-version: ["3.11"] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 @@ -35,7 +35,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ["3.10"] + python-version: ["3.11"] env: DOCKER_USER: ${{secrets.DOCKER_USER}} DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} diff --git a/README.md b/README.md index 9ebefc76c..f0720d0f1 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ The Trader service is an [agent service](https://docs.autonolas.network/open-aut - System requirements: - - Python `== 3.10` + - Python `== 3.11` - [Tendermint](https://docs.tendermint.com/v0.34/introduction/install.html) `==0.34.19` - [Poetry](https://python-poetry.org/docs/) `>=1.4.0` - [Docker Engine](https://docs.docker.com/engine/install/) diff --git a/poetry.lock b/poetry.lock index c9bd55e16..cd6f9326c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -718,9 +718,6 @@ files = [ {file = "coverage-7.3.1.tar.gz", hash = "sha256:6cb7fe1581deb67b782c153136541e20901aa312ceedaf1467dcb35255787952"}, ] -[package.dependencies] -tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""} - [package.extras] toml = ["tomli"] @@ -1178,21 +1175,6 @@ doc = ["sphinx (>=5.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)"] lint = ["black (>=23)", "flake8 (==3.8.3)", "isort (>=5.11.0)", "mypy (==0.971)", "pydocstyle (>=5.0.0)", "types-setuptools"] test = ["hypothesis (>=4.43.0)", "mypy (==0.971)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)", "types-setuptools"] -[[package]] -name = "exceptiongroup" -version = "1.1.3" -description = "Backport of PEP 654 (exception groups)" -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "exceptiongroup-1.1.3-py3-none-any.whl", hash = "sha256:343280667a4585d195ca1cf9cef84a4e178c4b6cf2274caef9859782b567d5e3"}, - {file = "exceptiongroup-1.1.3.tar.gz", hash = "sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9"}, -] - -[package.extras] -test = ["pytest (>=6)"] - [[package]] name = "filelock" version = "3.12.4" @@ -2169,7 +2151,7 @@ files = [ ] [package.dependencies] -numpy = {version = ">=1.22.4", markers = "python_version < \"3.11\""} +numpy = {version = ">=1.23.2", markers = "python_version == \"3.11\""} python-dateutil = ">=2.8.2" pytz = ">=2020.1" tzdata = ">=2022.1" @@ -2615,11 +2597,9 @@ files = [ [package.dependencies] attrs = ">=19.2.0" colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} [package.extras] testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] @@ -3160,18 +3140,6 @@ files = [ {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] -[[package]] -name = "tomli" -version = "2.0.1" -description = "A lil' TOML parser" -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, - {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, -] - [[package]] name = "tomte" version = "0.2.12" @@ -3241,7 +3209,6 @@ packaging = ">=14" pluggy = ">=0.12.0" py = ">=1.4.17" six = ">=1.14.0" -tomli = {version = ">=2.0.1", markers = "python_version >= \"3.7\" and python_version < \"3.11\""} virtualenv = ">=16.0.0,<20.0.0 || >20.0.0,<20.0.1 || >20.0.1,<20.0.2 || >20.0.2,<20.0.3 || >20.0.3,<20.0.4 || >20.0.4,<20.0.5 || >20.0.5,<20.0.6 || >20.0.6,<20.0.7 || >20.0.7" [package.extras] @@ -3617,5 +3584,5 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" -python-versions = ">=3.10, <3.11" -content-hash = "988804e9621ec781449dac06578beab62eb50876a73f2e3e47a723d67b1d0bc3" +python-versions = ">=3.11, <3.12" +content-hash = "fbea02347e17253ef11374c0a3101c38250554dbe4fbe9bd8a0c6c10dea3523f" diff --git a/pyproject.toml b/pyproject.toml index a8569d272..690b23d4a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,12 +10,12 @@ authors = [ "David Minarsch ", "Jose Moreira Sanc readme = "README.md" repository = "https://github.com/valory-xyz/trader" keywords = [ "trader", "autonomy", "autonomous", "autonolas", "service", "multi", "agent",] -classifiers = [ "Environment :: Console", "Environment :: Web Environment", "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Operating System :: MacOS", "Operating System :: Microsoft", "Operating System :: Unix", "Programming Language :: Python :: 3.10", "Topic :: Communications", "Topic :: Internet", "Topic :: Scientific/Engineering", "Topic :: Software Development", "Topic :: System",] +classifiers = [ "Environment :: Console", "Environment :: Web Environment", "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Operating System :: MacOS", "Operating System :: Microsoft", "Operating System :: Unix", "Programming Language :: Python :: 3.11", "Topic :: Communications", "Topic :: Internet", "Topic :: Scientific/Engineering", "Topic :: Software Development", "Topic :: System",] [[tool.poetry.packages]] include = "packages" [tool.poetry.dependencies] -python = ">=3.10, <3.11" +python = ">=3.11, <3.12" open-autonomy = "==0.12.0" requests = "==2.28.2" py-multibase = "==1.0.3" diff --git a/scripts/check_dependencies.py b/scripts/check_dependencies.py index 641d7af59..5c2c1eb51 100755 --- a/scripts/check_dependencies.py +++ b/scripts/check_dependencies.py @@ -54,7 +54,11 @@ def load_pyproject_toml(pyproject_toml_path: str = "./pyproject.toml") -> dict: def get_package_dependencies() -> Dict[str, Any]: """Returns a list of package dependencies.""" package_manager = PackageManagerV1.from_dir( - Path(os.environ.get("PACKAGES_DIR", str(Path.cwd() / "packages"))) + Path( + os.environ.get( # pylint: disable=no-member + "PACKAGES_DIR", str(Path.cwd() / "packages") + ) + ) ) dependencies: Dict[str, Dependency] = {} for package in package_manager.iter_dependency_tree(): diff --git a/tox.ini b/tox.ini index 0b5f0da39..298d56d36 100644 --- a/tox.ini +++ b/tox.ini @@ -6,7 +6,7 @@ ; we set the associated flag (e.g. for linting we don't need ; the package installation). [tox] -envlist = bandit, safety, black, black-check, isort, isort-check, check-hash, check-packages, check-dependencies, flake8, mypy, pylint, darglint, check-generate-all-protocols, check-abciapp-specs, check-abci-docstrings, check-handlers, py{3.7,3.8,3.9,3.10}-{win,linux,darwin} +envlist = bandit, safety, black, black-check, isort, isort-check, check-hash, check-packages, check-dependencies, flake8, mypy, pylint, darglint, check-generate-all-protocols, check-abciapp-specs, check-abci-docstrings, check-handlers, py{3.11}-{win,linux,darwin} ; when running locally we don't want to fail for no good reason skip_missing_interpreters = true isolated_build = True @@ -267,7 +267,7 @@ known_local_folder=tests sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,PACKAGES,LOCALFOLDER [mypy] -python_version = 3.10 +python_version = 3.11 strict_optional = True exclude=(.*_pb2|.*custom_types)