From 8eeeb61ca78d9daf832e2d87352154bbcbbf2c7e Mon Sep 17 00:00:00 2001 From: finswimmer Date: Tue, 8 Feb 2022 21:02:15 +0100 Subject: [PATCH] ci: update release pipeline, add python 3.10 - update action setup-python action to v2 - add python 3.10 --- .github/workflows/main.yml | 4 +-- .github/workflows/release.yml | 10 ++++-- make-nix-release.sh | 1 + poetry.lock | 64 +++++++++++++++++++++++++++-------- pyproject.toml | 3 +- tests/inspection/test_info.py | 2 +- tox.ini | 2 +- 7 files changed, 64 insertions(+), 22 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 119916ce3d6..6ff9bd9e483 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,12 +22,12 @@ jobs: strategy: matrix: os: [Ubuntu, MacOS, Windows] - python-version: [2.7, 3.5, 3.6, 3.7, 3.8] + python-version: ["2.7", "3.5","3.6", "3.7", "3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 88839dd372a..e24d2cf9ceb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -59,16 +59,18 @@ jobs: curl -L /~https://github.com/sdispater/python-binaries/releases/download/3.7.6/python-3.7.6.macos.tar.xz -o python-3.7.6.tar.xz curl -L /~https://github.com/sdispater/python-binaries/releases/download/3.8.3/python-3.8.3.macos.tar.xz -o python-3.8.3.tar.xz curl -L /~https://github.com/sdispater/python-binaries/releases/download/3.9.5/python-3.9.5.macos.tar.xz -o python-3.9.5.tar.xz + curl -L /~https://github.com/sdispater/python-binaries/releases/download/3.10.2/python-3.10.2.macos.tar.xz -o python-3.10.2.tar.xz tar -zxf python-2.7.18.tar.xz tar -zxf python-3.5.9.tar.xz tar -zxf python-3.6.8.tar.xz tar -zxf python-3.7.6.tar.xz tar -zxf python-3.8.3.tar.xz tar -zxf python-3.9.5.tar.xz + tar -zxf python-3.10.2.tar.xz - name: Build specific release run: | source $HOME/.poetry/env - poetry run python sonnet make release --ansi -P "2.7:python-2.7.18/bin/python" -P "3.5:python-3.5.9/bin/python" -P "3.6:python-3.6.8/bin/python" -P "3.7:python-3.7.6/bin/python" -P "3.8:python-3.8.3/bin/python" -P "3.9:python-3.9.5/bin/python" + poetry run python sonnet make release --ansi -P "2.7:python-2.7.18/bin/python" -P "3.5:python-3.5.9/bin/python" -P "3.6:python-3.6.8/bin/python" -P "3.7:python-3.7.6/bin/python" -P "3.8:python-3.8.3/bin/python" -P "3.9:python-3.9.5/bin/python" -P "3.10:python-3.10.2/bin/python" - name: Upload release file uses: actions/upload-artifact@v1 with: @@ -110,23 +112,25 @@ jobs: Invoke-WebRequest /~https://github.com/sdispater/python-binaries/releases/download/3.7.6/python-3.7.6.windows.tar.xz -O python-3.7.6.tar.xz Invoke-WebRequest /~https://github.com/sdispater/python-binaries/releases/download/3.8.3/python-3.8.3.windows.tar.xz -O python-3.8.3.tar.xz Invoke-WebRequest /~https://github.com/sdispater/python-binaries/releases/download/3.9.5/python-3.9.5.windows.tar.xz -O python-3.9.5.tar.xz + Invoke-WebRequest /~https://github.com/sdispater/python-binaries/releases/download/3.10.2/python-3.10.2.windows.tar.xz -O python-3.10.2.tar.xz 7z x python-2.7.17.tar.xz 7z x python-3.5.4.tar.xz 7z x python-3.6.8.tar.xz 7z x python-3.7.6.tar.xz 7z x python-3.8.3.tar.xz 7z x python-3.9.5.tar.xz + 7z x python-3.10.2.tar.xz 7z x python-2.7.17.tar 7z x python-3.4.4.tar 7z x python-3.5.4.tar 7z x python-3.6.8.tar 7z x python-3.7.6.tar 7z x python-3.8.3.tar - 7z x python-3.9.5.tar + 7z x python-3.10.2.tar - name: Build specific release run: | $env:Path += ";$env:Userprofile\.poetry\bin" - poetry run python sonnet make release --ansi -P "2.7:python-2.7.17\python.exe" -P "3.5:python-3.5.4\python.exe" -P "3.6:python-3.6.8\python.exe" -P "3.7:python-3.7.6\python.exe" -P "3.8:python-3.8.3\python.exe" -P "3.9:python-3.9.5\python.exe" + poetry run python sonnet make release --ansi -P "2.7:python-2.7.17\python.exe" -P "3.5:python-3.5.4\python.exe" -P "3.6:python-3.6.8\python.exe" -P "3.7:python-3.7.6\python.exe" -P "3.8:python-3.8.3\python.exe" -P "3.9:python-3.9.5\python.exe" -P "3.10:python-3.10.2\python.exe" - name: Upload release file uses: actions/upload-artifact@v1 with: diff --git a/make-nix-release.sh b/make-nix-release.sh index 1c69677b359..074babb2fd3 100755 --- a/make-nix-release.sh +++ b/make-nix-release.sh @@ -14,6 +14,7 @@ if [ "$OSTYPE" == "linux-gnu" ]; then $PYTHON get-poetry.py -y POETRY="$PYTHON $HOME/.poetry/bin/poetry" RUNTIMES[5]="${PYTHON39:+-P "3.9:$PYTHON39"}" + RUNTIMES[6]="${PYTHON310:+-P "3.10:$PYTHON310"}" else $PYTHON -m pip install poetry -U POETRY="$PYTHON -m poetry" diff --git a/poetry.lock b/poetry.lock index d93f579c32c..21a67566998 100644 --- a/poetry.lock +++ b/poetry.lock @@ -349,7 +349,7 @@ six = "*" [[package]] name = "identify" -version = "2.4.1" +version = "2.4.4" description = "File identification library for Python" category = "dev" optional = false @@ -402,6 +402,14 @@ zipp = {version = ">=0.4", markers = "python_version < \"3.8\""} [package.extras] docs = ["sphinx", "rst.linker", "jaraco.packaging"] +[[package]] +name = "iniconfig" +version = "1.1.1" +description = "iniconfig: brain-dead simple config-ini parsing" +category = "dev" +optional = false +python-versions = "*" + [[package]] name = "ipaddress" version = "1.0.23" @@ -469,7 +477,7 @@ testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake [[package]] name = "keyring" -version = "21.8.0" +version = "22.3.0" description = "Store and access your passwords safely." category = "main" optional = false @@ -483,7 +491,7 @@ SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} [package.extras] docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "jaraco.test (>=3.2.0)", "pytest-black (>=0.3.7)", "pytest-mypy"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "pytest-black (>=0.3.7)", "pytest-mypy"] [[package]] name = "lockfile" @@ -645,7 +653,7 @@ typing = {version = ">=3.7.4.1,<4.0.0.0", markers = "python_version >= \"2.7\" a [[package]] name = "pre-commit" -version = "2.16.0" +version = "2.17.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." category = "dev" optional = false @@ -753,6 +761,28 @@ wcwidth = "*" checkqa-mypy = ["mypy (==v0.761)"] testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] +[[package]] +name = "pytest" +version = "6.2.5" +description = "pytest: simple powerful testing with Python" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} +attrs = ">=19.2.0" +colorama = {version = "*", markers = "sys_platform == \"win32\""} +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} +iniconfig = "*" +packaging = "*" +pluggy = ">=0.12,<2.0" +py = ">=1.8.2" +toml = "*" + +[package.extras] +testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] + [[package]] name = "pytest-cov" version = "2.12.1" @@ -1010,7 +1040,7 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] name = "virtualenv" -version = "20.11.2" +version = "20.13.1" description = "Virtual Python Environment builder" category = "main" optional = false @@ -1066,7 +1096,7 @@ testing = ["pathlib2", "unittest2", "jaraco.itertools", "func-timeout"] [metadata] lock-version = "1.1" python-versions = "~2.7 || ^3.5" -content-hash = "290e530f0cdd81360dd6cb93f3182ac8e8b18a46238198d25de11c26f6b0c356" +content-hash = "3de9a28e5a2f53d26b75a9aa3eb333b360eb04470769675fb435183ab871798c" [metadata.files] atomicwrites = [ @@ -1331,8 +1361,8 @@ httpretty = [ {file = "httpretty-0.9.7.tar.gz", hash = "sha256:66216f26b9d2c52e81808f3e674a6fb65d4bf719721394a1a9be926177e55fbe"}, ] identify = [ - {file = "identify-2.4.1-py2.py3-none-any.whl", hash = "sha256:0192893ff68b03d37fed553e261d4a22f94ea974093aefb33b29df2ff35fed3c"}, - {file = "identify-2.4.1.tar.gz", hash = "sha256:64d4885e539f505dd8ffb5e93c142a1db45480452b1594cacd3e91dca9a984e9"}, + {file = "identify-2.4.4-py2.py3-none-any.whl", hash = "sha256:aa68609c7454dbcaae60a01ff6b8df1de9b39fe6e50b1f6107ec81dcda624aa6"}, + {file = "identify-2.4.4.tar.gz", hash = "sha256:6b4b5031f69c48bf93a646b90de9b381c6b5f560df4cbe0ed3cf7650ae741e4d"}, ] idna = [ {file = "idna-2.10-py2.py3-none-any.whl", hash = "sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0"}, @@ -1346,6 +1376,10 @@ importlib-resources = [ {file = "importlib_resources-3.2.1-py2.py3-none-any.whl", hash = "sha256:e2860cf0c4bc999947228d18be154fa3779c5dde0b882bd2d7b3f4d25e698bd6"}, {file = "importlib_resources-3.2.1.tar.gz", hash = "sha256:a9fe213ab6452708ec1b3f4ec6f2881b8ab3645cb4e5efb7fea2bbf05a91db3b"}, ] +iniconfig = [ + {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, + {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, +] ipaddress = [ {file = "ipaddress-1.0.23-py2.py3-none-any.whl", hash = "sha256:6e0f4a39e66cb5bb9a137b00276a2eff74f93b71dcbdad6f10ff7df9d3557fcc"}, {file = "ipaddress-1.0.23.tar.gz", hash = "sha256:b7f8e0369580bb4a24d5ba1d7cc29660a4a6987763faf1d8a8046830e020e7e2"}, @@ -1361,8 +1395,8 @@ keyring = [ {file = "keyring-18.0.1.tar.gz", hash = "sha256:67d6cc0132bd77922725fae9f18366bb314fd8f95ff4d323a4df41890a96a838"}, {file = "keyring-20.0.1-py2.py3-none-any.whl", hash = "sha256:c674f032424b4bffc62abeac5523ec49cc84aed07a480c3233e0baf618efc15c"}, {file = "keyring-20.0.1.tar.gz", hash = "sha256:963bfa7f090269d30bdc5e25589e5fd9dad2cf2a7c6f176a7f2386910e5d0d8d"}, - {file = "keyring-21.8.0-py3-none-any.whl", hash = "sha256:4be9cbaaaf83e61d6399f733d113ede7d1c73bc75cb6aeb64eee0f6ac39b30ea"}, - {file = "keyring-21.8.0.tar.gz", hash = "sha256:1746d3ac913d449a090caf11e9e4af00e26c3f7f7e81027872192b2398b98675"}, + {file = "keyring-22.3.0-py3-none-any.whl", hash = "sha256:2bc8363ebdd63886126a012057a85c8cb6e143877afa02619ac7dbc9f38a207b"}, + {file = "keyring-22.3.0.tar.gz", hash = "sha256:16927a444b2c73f983520a48dec79ddab49fe76429ea05b8d528d778c8339522"}, ] lockfile = [ {file = "lockfile-0.12.2-py2.py3-none-any.whl", hash = "sha256:6c3cb24f344923d30b2785d5ad75182c8ea7ac1b6171b08657258ec7429d50fa"}, @@ -1454,8 +1488,8 @@ poetry-core = [ {file = "poetry_core-1.0.7-py2.py3-none-any.whl", hash = "sha256:4f8a7f5390d772f42c4c4c3f188e6424b802cb4b57466c6633a1b9ac36f18a43"}, ] pre-commit = [ - {file = "pre_commit-2.16.0-py2.py3-none-any.whl", hash = "sha256:758d1dc9b62c2ed8881585c254976d66eae0889919ab9b859064fc2fe3c7743e"}, - {file = "pre_commit-2.16.0.tar.gz", hash = "sha256:fe9897cac830aa7164dbd02a4e7b90cae49630451ce88464bca73db486ba9f65"}, + {file = "pre_commit-2.17.0-py2.py3-none-any.whl", hash = "sha256:725fa7459782d7bec5ead072810e47351de01709be838c2ce1726b9591dad616"}, + {file = "pre_commit-2.17.0.tar.gz", hash = "sha256:c1a8040ff15ad3d648c70cc3e55b93e4d2d5b687320955505587fd79bbaed06a"}, ] ptyprocess = [ {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, @@ -1482,6 +1516,8 @@ pytest = [ {file = "pytest-4.6.11.tar.gz", hash = "sha256:50fa82392f2120cc3ec2ca0a75ee615be4c479e66669789771f1758332be4353"}, {file = "pytest-5.4.3-py3-none-any.whl", hash = "sha256:5c0db86b698e8f170ba4582a492248919255fcd4c79b1ee64ace34301fb589a1"}, {file = "pytest-5.4.3.tar.gz", hash = "sha256:7979331bfcba207414f5e1263b5a0f8f521d0f457318836a7355531ed1a4c7d8"}, + {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, + {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, ] pytest-cov = [ {file = "pytest-cov-2.12.1.tar.gz", hash = "sha256:261ceeb8c227b726249b376b8526b600f38667ee314f910353fa318caa01f4d7"}, @@ -1608,8 +1644,8 @@ urllib3 = [ {file = "urllib3-1.25.11.tar.gz", hash = "sha256:8d7eaa5a82a1cac232164990f04874c594c9453ec55eef02eab885aa02fc17a2"}, ] virtualenv = [ - {file = "virtualenv-20.11.2-py2.py3-none-any.whl", hash = "sha256:efd556cec612fd826dc7ef8ce26a6e4ba2395f494244919acd135fb5ceffa809"}, - {file = "virtualenv-20.11.2.tar.gz", hash = "sha256:7f9e9c2e878d92a434e760058780b8d67a7c5ec016a66784fe4b0d5e50a4eb5c"}, + {file = "virtualenv-20.13.1-py2.py3-none-any.whl", hash = "sha256:45e1d053cad4cd453181ae877c4ffc053546ae99e7dd049b9ff1d9be7491abf7"}, + {file = "virtualenv-20.13.1.tar.gz", hash = "sha256:e0621bcbf4160e4e1030f05065c8834b4e93f4fcc223255db2a823440aca9c14"}, ] wcwidth = [ {file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"}, diff --git a/pyproject.toml b/pyproject.toml index 7b13627b840..f3ae5da98ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,7 +66,8 @@ importlib-metadata = {version = "^1.6.0", python = "<3.8"} [tool.poetry.dev-dependencies] pytest = [ {version = "^4.1", python = "<3.5"}, - {version = "^5.4.3", python = ">=3.5"} + {version = "^5.4.3", python = "~3.5"}, + {version = "^6.2.5", python = ">=3.6"} ] pytest-cov = "^2.5" pytest-mock = "^1.9" diff --git a/tests/inspection/test_info.py b/tests/inspection/test_info.py index a128469a23f..43bd15383b2 100644 --- a/tests/inspection/test_info.py +++ b/tests/inspection/test_info.py @@ -190,7 +190,7 @@ def test_info_setup_complex(demo_setup_complex): def test_info_setup_complex_pep517_error(mocker, demo_setup_complex): mocker.patch( "poetry.utils.env.VirtualEnv.run", - auto_spec=True, + autospec=True, side_effect=EnvCommandError(CalledProcessError(1, "mock", output="mock")), ) diff --git a/tox.ini b/tox.ini index 29cad8f7429..24aae8e07b5 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] minversion = 3.3.0 isolated_build = True -envlist = py27, py35, py36, py37, py38 +envlist = py27, py35, py36, py37, py38, py39, py310 [testenv] whitelist_externals = poetry