From 0930487a90408f5e157bbdcdc4fc1e733df3f7e5 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sun, 16 Jan 2022 17:29:18 -0600 Subject: [PATCH 01/18] Vendors: Bump min python 3.6 -> 3.7 --- vendors/poetry.lock | 4 ++-- vendors/pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vendors/poetry.lock b/vendors/poetry.lock index ea3e4b636..14b83367f 100644 --- a/vendors/poetry.lock +++ b/vendors/poetry.lock @@ -125,8 +125,8 @@ testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake [metadata] lock-version = "1.1" -python-versions = "^3.6" -content-hash = "6790cea1370c2296b96f05af2218de159499268429c0c81757de8e4e90bfa9b0" +python-versions = "^3.7" +content-hash = "15291fd8e716868c668d60ce4df667ed983daea247aa87c9f71a7d83748e516e" [metadata.files] attrs = [ diff --git a/vendors/pyproject.toml b/vendors/pyproject.toml index 2671380a7..53e4fe4d4 100644 --- a/vendors/pyproject.toml +++ b/vendors/pyproject.toml @@ -19,7 +19,7 @@ classifiers = [ ] [tool.poetry.dependencies] -python = "^3.6" +python = "^3.7" jsonschema = "^3.2.0" lark-parser = "^0.9.0" From 207500aba5d0017e3e404a3952a3b939a4307280 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sun, 16 Jan 2022 17:46:54 -0600 Subject: [PATCH 02/18] ci: Remove python 3.6 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e91a4a846..d95780c9f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [Ubuntu, MacOS, Windows] - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: [3.7, 3.8, 3.9] experimental: [false] bootstrap-args: [""] include: From 05f1bc311b8f7bbafa7c7fe08a7eb47a9a15a863 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Tue, 18 Jan 2022 08:34:36 -0600 Subject: [PATCH 03/18] ci[pre-commit]: Update pyupgrade arg 3.6 -> 3.7 --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b808c9eed..dd62638eb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,7 +51,7 @@ repos: hooks: - id: pyupgrade args: - - --py36-plus + - --py37-plus - repo: https://github.com/pycqa/isort rev: 5.10.1 From 7372157ceffb67662ee6eee0813770b130594f7b Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Tue, 18 Jan 2022 08:36:24 -0600 Subject: [PATCH 04/18] chore(flake8): Add min_python_version --- .flake8 | 1 + 1 file changed, 1 insertion(+) diff --git a/.flake8 b/.flake8 index 36b38b391..3570a55cc 100644 --- a/.flake8 +++ b/.flake8 @@ -1,4 +1,5 @@ [flake8] +min_python_version = 3.7.0 max-line-length = 88 ignore = E501, E203, W503, ANN101, ANN102, SIM106 ban-relative-imports = True From 03f9933c56e46949da635d3dc681bd8a6c50c0d5 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Tue, 18 Jan 2022 08:37:53 -0600 Subject: [PATCH 05/18] deps(pyproject): Bump minimum python 3.6 -> 3.7 --- poetry.lock | 45 ++++++++++++++++++++++++++++----------------- pyproject.toml | 8 ++++---- 2 files changed, 32 insertions(+), 21 deletions(-) diff --git a/poetry.lock b/poetry.lock index 7ffaa3075..2d9674f3f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -45,7 +45,6 @@ python-versions = ">=3.6.2" [package.dependencies] click = ">=7.1.2" -dataclasses = {version = ">=0.6", markers = "python_version < \"3.7\""} mypy-extensions = ">=0.4.3" pathspec = ">=0.9.0,<1" platformdirs = ">=2" @@ -122,14 +121,6 @@ python-versions = ">=3.6" [package.extras] toml = ["tomli"] -[[package]] -name = "dataclasses" -version = "0.8" -description = "A backport of the dataclasses module for Python 3.6" -category = "main" -optional = false -python-versions = ">=3.6, <3.7" - [[package]] name = "distlib" version = "0.3.3" @@ -233,6 +224,7 @@ python-versions = ">=3.7" [package.dependencies] attrs = ">=17.4.0" +importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} importlib-resources = {version = ">=1.4.0", markers = "python_version < \"3.9\""} pyrsistent = ">=0.14.0,<0.17.0 || >0.17.0,<0.17.1 || >0.17.1,<0.17.2 || >0.17.2" @@ -327,7 +319,6 @@ python-versions = ">=3.6.1" cfgv = ">=2.0.0" identify = ">=1.0.0" importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} -importlib-resources = {version = "*", markers = "python_version < \"3.7\""} nodeenv = ">=0.11.1" pyyaml = ">=5.1" toml = "*" @@ -551,7 +542,6 @@ python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" distlib = ">=0.3.1,<1" filelock = ">=3.2,<4" importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} -importlib-resources = {version = ">=1.0", markers = "python_version < \"3.7\""} platformdirs = ">=2,<3" six = ">=1.9.0,<2" @@ -573,8 +563,8 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes [metadata] lock-version = "1.1" -python-versions = "^3.6" -content-hash = "d6dcc07ec4c705a59047df646ad7d09ed999967e540d71b6a63a0b16daacf704" +python-versions = "^3.7" +content-hash = "5b3508af56f0f73ce9dc6b7b4900ac49eb9379e86a80e5b242855c8708f8300a" [metadata.files] atomicwrites = [ @@ -662,10 +652,6 @@ coverage = [ {file = "coverage-6.1.2-pp36.pp37.pp38-none-any.whl", hash = "sha256:eab14fdd410500dae50fd14ccc332e65543e7b39f6fc076fe90603a0e5d2f929"}, {file = "coverage-6.1.2.tar.gz", hash = "sha256:d9a635114b88c0ab462e0355472d00a180a5fbfd8511e7f18e4ac32652e7d972"}, ] -dataclasses = [ - {file = "dataclasses-0.8-py3-none-any.whl", hash = "sha256:0201d89fa866f68c8ebd9d08ee6ff50c0b255f8ec63a71c16fda7af82bb887bf"}, - {file = "dataclasses-0.8.tar.gz", hash = "sha256:8479067f342acf957dc82ec415d355ab5edb7e7646b90dc6e2fd1d96ad084c97"}, -] distlib = [ {file = "distlib-0.3.3-py2.py3-none-any.whl", hash = "sha256:c8b54e8454e5bf6237cc84c20e8264c3e991e824ef27e8f1e81049867d861e31"}, {file = "distlib-0.3.3.zip", hash = "sha256:d982d0751ff6eaaab5e2ec8e691d949ee80eddf01a62eaa96ddb11531fe16b05"}, @@ -821,6 +807,11 @@ regex = [ {file = "regex-2021.11.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:30ab804ea73972049b7a2a5c62d97687d69b5a60a67adca07eb73a0ddbc9e29f"}, {file = "regex-2021.11.10-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:68a067c11463de2a37157930d8b153005085e42bcb7ad9ca562d77ba7d1404e0"}, {file = "regex-2021.11.10-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:162abfd74e88001d20cb73ceaffbfe601469923e875caf9118333b1a4aaafdc4"}, + {file = "regex-2021.11.10-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b9ed0b1e5e0759d6b7f8e2f143894b2a7f3edd313f38cf44e1e15d360e11749b"}, + {file = "regex-2021.11.10-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:473e67837f786404570eae33c3b64a4b9635ae9f00145250851a1292f484c063"}, + {file = "regex-2021.11.10-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:2fee3ed82a011184807d2127f1733b4f6b2ff6ec7151d83ef3477f3b96a13d03"}, + {file = "regex-2021.11.10-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:d5fd67df77bab0d3f4ea1d7afca9ef15c2ee35dfb348c7b57ffb9782a6e4db6e"}, + {file = "regex-2021.11.10-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:5d408a642a5484b9b4d11dea15a489ea0928c7e410c7525cd892f4d04f2f617b"}, {file = "regex-2021.11.10-cp310-cp310-win32.whl", hash = "sha256:98ba568e8ae26beb726aeea2273053c717641933836568c2a0278a84987b2a1a"}, {file = "regex-2021.11.10-cp310-cp310-win_amd64.whl", hash = "sha256:780b48456a0f0ba4d390e8b5f7c661fdd218934388cde1a974010a965e200e12"}, {file = "regex-2021.11.10-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:dba70f30fd81f8ce6d32ddeef37d91c8948e5d5a4c63242d16a2b2df8143aafc"}, @@ -830,6 +821,11 @@ regex = [ {file = "regex-2021.11.10-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5537f71b6d646f7f5f340562ec4c77b6e1c915f8baae822ea0b7e46c1f09b733"}, {file = "regex-2021.11.10-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ed2e07c6a26ed4bea91b897ee2b0835c21716d9a469a96c3e878dc5f8c55bb23"}, {file = "regex-2021.11.10-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ca5f18a75e1256ce07494e245cdb146f5a9267d3c702ebf9b65c7f8bd843431e"}, + {file = "regex-2021.11.10-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:74cbeac0451f27d4f50e6e8a8f3a52ca074b5e2da9f7b505c4201a57a8ed6286"}, + {file = "regex-2021.11.10-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:3598893bde43091ee5ca0a6ad20f08a0435e93a69255eeb5f81b85e81e329264"}, + {file = "regex-2021.11.10-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:50a7ddf3d131dc5633dccdb51417e2d1910d25cbcf842115a3a5893509140a3a"}, + {file = "regex-2021.11.10-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:61600a7ca4bcf78a96a68a27c2ae9389763b5b94b63943d5158f2a377e09d29a"}, + {file = "regex-2021.11.10-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:563d5f9354e15e048465061509403f68424fef37d5add3064038c2511c8f5e00"}, {file = "regex-2021.11.10-cp36-cp36m-win32.whl", hash = "sha256:93a5051fcf5fad72de73b96f07d30bc29665697fb8ecdfbc474f3452c78adcf4"}, {file = "regex-2021.11.10-cp36-cp36m-win_amd64.whl", hash = "sha256:b483c9d00a565633c87abd0aaf27eb5016de23fed952e054ecc19ce32f6a9e7e"}, {file = "regex-2021.11.10-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:fff55f3ce50a3ff63ec8e2a8d3dd924f1941b250b0aac3d3d42b687eeff07a8e"}, @@ -839,6 +835,11 @@ regex = [ {file = "regex-2021.11.10-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d5ca078bb666c4a9d1287a379fe617a6dccd18c3e8a7e6c7e1eb8974330c626a"}, {file = "regex-2021.11.10-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dd33eb9bdcfbabab3459c9ee651d94c842bc8a05fabc95edf4ee0c15a072495e"}, {file = "regex-2021.11.10-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:05b7d6d7e64efe309972adab77fc2af8907bb93217ec60aa9fe12a0dad35874f"}, + {file = "regex-2021.11.10-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:42b50fa6666b0d50c30a990527127334d6b96dd969011e843e726a64011485da"}, + {file = "regex-2021.11.10-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:6e1d2cc79e8dae442b3fa4a26c5794428b98f81389af90623ffcc650ce9f6732"}, + {file = "regex-2021.11.10-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:0416f7399e918c4b0e074a0f66e5191077ee2ca32a0f99d4c187a62beb47aa05"}, + {file = "regex-2021.11.10-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:ce298e3d0c65bd03fa65ffcc6db0e2b578e8f626d468db64fdf8457731052942"}, + {file = "regex-2021.11.10-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:dc07f021ee80510f3cd3af2cad5b6a3b3a10b057521d9e6aaeb621730d320c5a"}, {file = "regex-2021.11.10-cp37-cp37m-win32.whl", hash = "sha256:e71255ba42567d34a13c03968736c5d39bb4a97ce98188fafb27ce981115beec"}, {file = "regex-2021.11.10-cp37-cp37m-win_amd64.whl", hash = "sha256:07856afef5ffcc052e7eccf3213317fbb94e4a5cd8177a2caa69c980657b3cb4"}, {file = "regex-2021.11.10-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ba05430e819e58544e840a68b03b28b6d328aff2e41579037e8bab7653b37d83"}, @@ -849,6 +850,11 @@ regex = [ {file = "regex-2021.11.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:85bfa6a5413be0ee6c5c4a663668a2cad2cbecdee367630d097d7823041bdeec"}, {file = "regex-2021.11.10-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f23222527b307970e383433daec128d769ff778d9b29343fb3496472dc20dabe"}, {file = "regex-2021.11.10-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:da1a90c1ddb7531b1d5ff1e171b4ee61f6345119be7351104b67ff413843fe94"}, + {file = "regex-2021.11.10-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:f5be7805e53dafe94d295399cfbe5227f39995a997f4fd8539bf3cbdc8f47ca8"}, + {file = "regex-2021.11.10-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a955b747d620a50408b7fdf948e04359d6e762ff8a85f5775d907ceced715129"}, + {file = "regex-2021.11.10-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:139a23d1f5d30db2cc6c7fd9c6d6497872a672db22c4ae1910be22d4f4b2068a"}, + {file = "regex-2021.11.10-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:ca49e1ab99593438b204e00f3970e7a5f70d045267051dfa6b5f4304fcfa1dbf"}, + {file = "regex-2021.11.10-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:96fc32c16ea6d60d3ca7f63397bff5c75c5a562f7db6dec7d412f7c4d2e78ec0"}, {file = "regex-2021.11.10-cp38-cp38-win32.whl", hash = "sha256:0617383e2fe465732af4509e61648b77cbe3aee68b6ac8c0b6fe934db90be5cc"}, {file = "regex-2021.11.10-cp38-cp38-win_amd64.whl", hash = "sha256:a3feefd5e95871872673b08636f96b61ebef62971eab044f5124fb4dea39919d"}, {file = "regex-2021.11.10-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f7f325be2804246a75a4f45c72d4ce80d2443ab815063cdf70ee8fb2ca59ee1b"}, @@ -859,6 +865,11 @@ regex = [ {file = "regex-2021.11.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:962b9a917dd7ceacbe5cd424556914cb0d636001e393b43dc886ba31d2a1e449"}, {file = "regex-2021.11.10-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fa8c626d6441e2d04b6ee703ef2d1e17608ad44c7cb75258c09dd42bacdfc64b"}, {file = "regex-2021.11.10-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3c5fb32cc6077abad3bbf0323067636d93307c9fa93e072771cf9a64d1c0f3ef"}, + {file = "regex-2021.11.10-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:cd410a1cbb2d297c67d8521759ab2ee3f1d66206d2e4328502a487589a2cb21b"}, + {file = "regex-2021.11.10-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:e6096b0688e6e14af6a1b10eaad86b4ff17935c49aa774eac7c95a57a4e8c296"}, + {file = "regex-2021.11.10-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:529801a0d58809b60b3531ee804d3e3be4b412c94b5d267daa3de7fadef00f49"}, + {file = "regex-2021.11.10-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:0f594b96fe2e0821d026365f72ac7b4f0b487487fb3d4aaf10dd9d97d88a9737"}, + {file = "regex-2021.11.10-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2409b5c9cef7054dde93a9803156b411b677affc84fca69e908b1cb2c540025d"}, {file = "regex-2021.11.10-cp39-cp39-win32.whl", hash = "sha256:3b5df18db1fccd66de15aa59c41e4f853b5df7550723d26aa6cb7f40e5d9da5a"}, {file = "regex-2021.11.10-cp39-cp39-win_amd64.whl", hash = "sha256:83ee89483672b11f8952b158640d0c0ff02dc43d9cb1b70c1564b49abe92ce29"}, {file = "regex-2021.11.10.tar.gz", hash = "sha256:f341ee2df0999bfdf7a95e448075effe0db212a59387de1a70690e4acb03d4c6"}, diff --git a/pyproject.toml b/pyproject.toml index fea5d16c3..b8c70e8de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,14 +33,14 @@ exclude = [ "Bug Tracker" = "https://github.com/python-poetry/poetry/issues" [tool.poetry.dependencies] -python = "^3.6" +python = "^3.7" # required for compatibility importlib-metadata = {version = ">=1.7.0", python = "<3.8"} dataclasses = {version = ">=0.8", python = "~3.6"} [tool.poetry.dev-dependencies] -pre-commit = {version = "^2.15.0", python = "^3.6.1"} +pre-commit = {version = "^2.15.0", python = "^3.7.0"} pyrsistent = "^0.18.0" pytest = "^6.2" pytest-cov = "^2.8" @@ -48,8 +48,8 @@ pytest-mock = "^3.5" tox = "^3.0" vendoring = {version = "^0.3", python = "^3.8"} pep517 = "^0.11.0" -black = {version = "^21.9b0", markers = "python_version >= '3.6.2' and python_version < '4.0' and implementation_name != 'pypy'"} -isort = {version = "^5.9.3", python = "^3.6.1"} +black = {version = "^21.9b0", markers = "python_version >= '3.7.0' and python_version < '4.0' and implementation_name != 'pypy'"} +isort = {version = "^5.9.3"} [tool.black] line-length = 88 From 490e4b4f18b47fb1c146177c4bf9c855279f02b9 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Tue, 18 Jan 2022 08:39:01 -0600 Subject: [PATCH 06/18] deps: Remove PEP 557 (dataclasses) backport for 3.6 --- poetry.lock | 2 +- pyproject.toml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/poetry.lock b/poetry.lock index 2d9674f3f..08ec7aea3 100644 --- a/poetry.lock +++ b/poetry.lock @@ -564,7 +564,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes [metadata] lock-version = "1.1" python-versions = "^3.7" -content-hash = "5b3508af56f0f73ce9dc6b7b4900ac49eb9379e86a80e5b242855c8708f8300a" +content-hash = "f7ffed8e4e719c5e387551e29dc7d3abfe7cec72bf2c2b29a6830b092022a0ba" [metadata.files] atomicwrites = [ diff --git a/pyproject.toml b/pyproject.toml index b8c70e8de..212010cac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,6 @@ python = "^3.7" # required for compatibility importlib-metadata = {version = ">=1.7.0", python = "<3.8"} -dataclasses = {version = ">=0.8", python = "~3.6"} [tool.poetry.dev-dependencies] pre-commit = {version = "^2.15.0", python = "^3.7.0"} From a3187aa575cf2ab6137c9613570c202dc0ae8e9c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 18 Jan 2022 14:40:51 +0000 Subject: [PATCH 07/18] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/testutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testutils.py b/tests/testutils.py index d62a80c9f..d9ddbb10e 100644 --- a/tests/testutils.py +++ b/tests/testutils.py @@ -58,7 +58,7 @@ def subprocess_run(*args: str, **kwargs: Any) -> subprocess.CompletedProcess: """ compat_kwargs = {"text" if PY37 else "universal_newlines": True} result = subprocess.run( - args, **compat_kwargs, stdout=subprocess.PIPE, stderr=subprocess.PIPE, **kwargs + args, **compat_kwargs, capture_output=True, **kwargs ) assert result.returncode == 0 return result From 6d4cc17d9daede0114316854bfbd7c2c1c4634c5 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Tue, 18 Jan 2022 08:40:44 -0600 Subject: [PATCH 08/18] chore(tox): remove python 3.6 --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 709ed18ba..a49750a38 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] minversion = 3.3.0 isolated_build = True -envlist = py36, py37, py38, py39, pypy3, integration +envlist = py37, py38, py39, pypy3, integration [testenv] whitelist_externals = poetry From bb78eb7b24733b269814368f6f6af76ed9d5b0c8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 18 Jan 2022 14:42:47 +0000 Subject: [PATCH 09/18] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/testutils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/testutils.py b/tests/testutils.py index d9ddbb10e..9ccfde41f 100644 --- a/tests/testutils.py +++ b/tests/testutils.py @@ -57,9 +57,7 @@ def subprocess_run(*args: str, **kwargs: Any) -> subprocess.CompletedProcess: Helper method to run a subprocess. Asserts for success. """ compat_kwargs = {"text" if PY37 else "universal_newlines": True} - result = subprocess.run( - args, **compat_kwargs, capture_output=True, **kwargs - ) + result = subprocess.run(args, **compat_kwargs, capture_output=True, **kwargs) assert result.returncode == 0 return result From 61c12e8f85b9022c179a88d73b0c18e22ff90895 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Thu, 20 Jan 2022 04:54:41 -0600 Subject: [PATCH 10/18] chore: Remove PY36 --- src/poetry/core/utils/_compat.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/poetry/core/utils/_compat.py b/src/poetry/core/utils/_compat.py index 9943beca2..2e2665ecf 100644 --- a/src/poetry/core/utils/_compat.py +++ b/src/poetry/core/utils/_compat.py @@ -3,7 +3,6 @@ from typing import List -PY36 = sys.version_info >= (3, 6) PY37 = sys.version_info >= (3, 7) WINDOWS = sys.platform == "win32" From 25239fdbfd4c2dd981a70f0fba08e96065503132 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 22 Jan 2022 11:45:58 -0600 Subject: [PATCH 11/18] CI(integration): Remove 3.6 --- .github/workflows/integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 3eb106895..59f1e020a 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -10,7 +10,7 @@ jobs: strategy: matrix: os: [Ubuntu, MacOS, Windows] - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: [3.7, 3.8, 3.9] experimental: [false] include: - os: Ubuntu From dfe409a900e78bd04b2d4e5aa19bc3f6b077103c Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 22 Jan 2022 15:04:33 -0600 Subject: [PATCH 12/18] chore(testutils.py): Unused args Co-authored-by: Branch Vincent --- tests/testutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testutils.py b/tests/testutils.py index 9ccfde41f..963fd1f27 100644 --- a/tests/testutils.py +++ b/tests/testutils.py @@ -57,7 +57,7 @@ def subprocess_run(*args: str, **kwargs: Any) -> subprocess.CompletedProcess: Helper method to run a subprocess. Asserts for success. """ compat_kwargs = {"text" if PY37 else "universal_newlines": True} - result = subprocess.run(args, **compat_kwargs, capture_output=True, **kwargs) + result = subprocess.run(args, text=True, capture_output=True, **kwargs) assert result.returncode == 0 return result From 6def1a63766d095807c7f55651a9c46cbb88b367 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 22 Jan 2022 15:04:47 -0600 Subject: [PATCH 13/18] build(deps): Simplify isort markers Co-authored-by: Branch Vincent --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 212010cac..89bdfea23 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ tox = "^3.0" vendoring = {version = "^0.3", python = "^3.8"} pep517 = "^0.11.0" black = {version = "^21.9b0", markers = "python_version >= '3.7.0' and python_version < '4.0' and implementation_name != 'pypy'"} -isort = {version = "^5.9.3"} +isort = "^5.9.3" [tool.black] line-length = 88 From 6cb6acf50417181dd4bb56cb3f6f66a2d9547aba Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 22 Jan 2022 15:05:57 -0600 Subject: [PATCH 14/18] build(deps): Simplify pre-commit marker Co-authored-by: Branch Vincent --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 89bdfea23..61acd127a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ python = "^3.7" importlib-metadata = {version = ">=1.7.0", python = "<3.8"} [tool.poetry.dev-dependencies] -pre-commit = {version = "^2.15.0", python = "^3.7.0"} +pre-commit = "^2.15.0" pyrsistent = "^0.18.0" pytest = "^6.2" pytest-cov = "^2.8" From 4598321b721509392cce733e89494a323ad52411 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 22 Jan 2022 15:06:55 -0600 Subject: [PATCH 15/18] chore: Cleanup unused condition, import --- tests/testutils.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/testutils.py b/tests/testutils.py index 963fd1f27..01a0322aa 100644 --- a/tests/testutils.py +++ b/tests/testutils.py @@ -13,7 +13,6 @@ from typing import Optional from poetry.core.toml import TOMLFile -from poetry.core.utils._compat import PY37 __toml_build_backend_patch__ = { @@ -56,7 +55,6 @@ def subprocess_run(*args: str, **kwargs: Any) -> subprocess.CompletedProcess: """ Helper method to run a subprocess. Asserts for success. """ - compat_kwargs = {"text" if PY37 else "universal_newlines": True} result = subprocess.run(args, text=True, capture_output=True, **kwargs) assert result.returncode == 0 return result From d11fbec20e2a1a2e71331639f3b0a72256dc242c Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 22 Jan 2022 15:08:55 -0600 Subject: [PATCH 16/18] chore: Remove PY37 checks (unused) --- src/poetry/core/utils/_compat.py | 2 -- tests/masonry/builders/test_builder.py | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/poetry/core/utils/_compat.py b/src/poetry/core/utils/_compat.py index 2e2665ecf..e993a2bc6 100644 --- a/src/poetry/core/utils/_compat.py +++ b/src/poetry/core/utils/_compat.py @@ -3,8 +3,6 @@ from typing import List -PY37 = sys.version_info >= (3, 7) - WINDOWS = sys.platform == "win32" diff --git a/tests/masonry/builders/test_builder.py b/tests/masonry/builders/test_builder.py index f672bef6e..2f5ba5e9f 100644 --- a/tests/masonry/builders/test_builder.py +++ b/tests/masonry/builders/test_builder.py @@ -10,7 +10,6 @@ from poetry.core.factory import Factory from poetry.core.masonry.builders.builder import Builder -from poetry.core.utils._compat import PY37 if TYPE_CHECKING: @@ -29,7 +28,7 @@ def test_builder_find_excluded_files(mocker: "MockerFixture"): @pytest.mark.xfail( - sys.platform == "win32" and not PY37, + sys.platform == "win32", reason="Windows is case insensitive for the most part", ) def test_builder_find_case_sensitive_excluded_files(mocker: "MockerFixture"): @@ -54,7 +53,7 @@ def test_builder_find_case_sensitive_excluded_files(mocker: "MockerFixture"): @pytest.mark.xfail( - sys.platform == "win32" and not PY37, + sys.platform == "win32", reason="Windows is case insensitive for the most part", ) def test_builder_find_invalid_case_sensitive_excluded_files(mocker: "MockerFixture"): From 5198ceb56cf77f60c5625933c32a5fdf380ea822 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 22 Jan 2022 15:14:59 -0600 Subject: [PATCH 17/18] chore: Fix codesmell See also: https://sonarcloud.io/project/issues?id=poetry-core&open=AX5towEhmZqnEonFAx80&pullRequest=263&resolved=false&types=CODE_SMELL --- tests/testutils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/testutils.py b/tests/testutils.py index 01a0322aa..0f21e7b42 100644 --- a/tests/testutils.py +++ b/tests/testutils.py @@ -7,8 +7,8 @@ from contextlib import contextmanager from pathlib import Path from typing import Any -from typing import ContextManager from typing import Dict +from typing import Generator from typing import List from typing import Optional @@ -26,7 +26,7 @@ @contextmanager def temporary_project_directory( path: Path, toml_patch: Optional[Dict[str, Any]] = None -) -> ContextManager[str]: +) -> Generator[str, None, None]: """ Context manager that takes a project source directory, copies content to a temporary directory, patches the `pyproject.toml` using the provided patch, or using the default From 4bb19c9e95a2fa5ad3bdeec130ba7008362f4c30 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Tue, 25 Jan 2022 09:20:11 -0600 Subject: [PATCH 18/18] chore: Remove FileNotFoundError --- src/poetry/core/utils/_compat.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/poetry/core/utils/_compat.py b/src/poetry/core/utils/_compat.py index e993a2bc6..638ae0ea9 100644 --- a/src/poetry/core/utils/_compat.py +++ b/src/poetry/core/utils/_compat.py @@ -6,12 +6,6 @@ WINDOWS = sys.platform == "win32" -try: - FileNotFoundError -except NameError: - FileNotFoundError = IOError - - def list_to_shell_command(cmd: List[str]) -> str: executable = cmd[0]