From edba6d6c3fcaeaa9105bfcd4d96fc48fa1a6c960 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Mon, 17 Jan 2022 18:27:49 -0600 Subject: [PATCH 01/21] pyproject: Drop python 3.6 --- poetry.lock | 38 ++------------------------------------ pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 37 deletions(-) diff --git a/poetry.lock b/poetry.lock index bce814fc32f..7d06e77447e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -146,14 +146,6 @@ sdist = ["setuptools_rust (>=0.11.4)"] ssh = ["bcrypt (>=3.1.5)"] test = ["pytest (>=6.2.0)", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] -[[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 = "deepdiff" version = "5.7.0" @@ -264,21 +256,6 @@ zipp = ">=0.5" docs = ["sphinx", "rst.linker"] testing = ["packaging", "pep517", "importlib-resources (>=1.3)"] -[[package]] -name = "importlib-resources" -version = "5.2.3" -description = "Read resources from Python packages" -category = "main" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} - -[package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-black (>=0.3.7)", "pytest-mypy"] - [[package]] name = "iniconfig" version = "1.1.1" @@ -418,7 +395,6 @@ optional = false python-versions = ">=3.6,<4.0" [package.dependencies] -dataclasses = {version = ">=0.8", markers = "python_version >= \"3.6\" and python_version < \"3.7\""} importlib-metadata = {version = ">=1.7.0", markers = "python_version < \"3.8\""} [[package]] @@ -433,7 +409,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 = "<5.3", markers = "python_version < \"3.7\""} nodeenv = ">=0.11.1" pyyaml = ">=5.1" toml = "*" @@ -700,7 +675,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" @@ -730,8 +704,8 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes [metadata] lock-version = "1.1" -python-versions = "^3.6" -content-hash = "9d2e32899df46f2c63018e9a3f5e95dbbeb1ec41291c31289cff40f6f2d935a4" +python-versions = "^3.7" +content-hash = "8bab6432ba0d9d1cbfee6580173ff0237be036f890176f7b0828f1e078037a44" [metadata.files] atomicwrites = [ @@ -897,10 +871,6 @@ cryptography = [ {file = "cryptography-36.0.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:39bdf8e70eee6b1c7b289ec6e5d84d49a6bfa11f8b8646b5b3dfe41219153316"}, {file = "cryptography-36.0.1.tar.gz", hash = "sha256:53e5c1dc3d7a953de055d77bef2ff607ceef7a2aac0353b5d630ab67f7423638"}, ] -dataclasses = [ - {file = "dataclasses-0.8-py3-none-any.whl", hash = "sha256:0201d89fa866f68c8ebd9d08ee6ff50c0b255f8ec63a71c16fda7af82bb887bf"}, - {file = "dataclasses-0.8.tar.gz", hash = "sha256:8479067f342acf957dc82ec415d355ab5edb7e7646b90dc6e2fd1d96ad084c97"}, -] deepdiff = [ {file = "deepdiff-5.7.0-py3-none-any.whl", hash = "sha256:1ffb38c3b5d9174eb2df95850c93aee55ec00e19396925036a2e680f725079e0"}, {file = "deepdiff-5.7.0.tar.gz", hash = "sha256:838766484e323dcd9dec6955926a893a83767dc3f3f94542773e6aa096efe5d4"}, @@ -939,10 +909,6 @@ importlib-metadata = [ {file = "importlib_metadata-1.7.0-py2.py3-none-any.whl", hash = "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"}, {file = "importlib_metadata-1.7.0.tar.gz", hash = "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83"}, ] -importlib-resources = [ - {file = "importlib_resources-5.2.3-py3-none-any.whl", hash = "sha256:ae35ed1cfe8c0d6c1a53ecd168167f01fa93b893d51a62cdf23aea044c67211b"}, - {file = "importlib_resources-5.2.3.tar.gz", hash = "sha256:203d70dda34cfbfbb42324a8d4211196e7d3e858de21a5eb68c6d1cdd99e4e98"}, -] iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, diff --git a/pyproject.toml b/pyproject.toml index c1e05413f6b..52344287f9d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ generate-setup-file = false # Requirements [tool.poetry.dependencies] -python = "^3.6" +python = "^3.7" poetry-core = "^1.1.0a6" cachecontrol = { version = "^0.12.9", extras = ["filecache"] } From 6de7495ec9e689c463a83d4af8cfc1fae22ff778 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Mon, 17 Jan 2022 19:08:14 -0600 Subject: [PATCH 02/21] chore: Remove python 3.6 fix for io (python-poetry#4038) --- src/poetry/console/application.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/poetry/console/application.py b/src/poetry/console/application.py index a74a68b0ff1..96f2e953cf5 100644 --- a/src/poetry/console/application.py +++ b/src/poetry/console/application.py @@ -16,7 +16,6 @@ from cleo.exceptions import CleoException from cleo.formatters.style import Style from cleo.io.inputs.argv_input import ArgvInput -from poetry.core.utils._compat import PY37 from poetry.__version__ import __version__ from poetry.console.command_loader import CommandLoader @@ -138,20 +137,6 @@ def create_io( ) -> "IO": io = super().create_io(input, output, error_output) - # Remove when support for Python 3.6 is removed - # https://github.com/python-poetry/poetry/issues/3412 - if ( - not PY37 - and hasattr(io.output, "_stream") - and hasattr(io.output._stream, "buffer") - and io.output._stream.encoding != "utf-8" - ): - import io as io_ - - io.output._stream = io_.TextIOWrapper( - io.output._stream.buffer, encoding="utf-8" - ) - # Set our own CLI styles formatter = io.output.formatter formatter.set_style("c1", Style("cyan")) From 66e912ddb27a6858cf5fd44dac4e34aaf769e884 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Mon, 17 Jan 2022 19:11:03 -0600 Subject: [PATCH 03/21] chore(pyproject): Set pre-commit version constraint to 3.6 --- poetry.lock | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/poetry.lock b/poetry.lock index 7d06e77447e..a7d6456ab11 100644 --- a/poetry.lock +++ b/poetry.lock @@ -705,7 +705,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes [metadata] lock-version = "1.1" python-versions = "^3.7" -content-hash = "8bab6432ba0d9d1cbfee6580173ff0237be036f890176f7b0828f1e078037a44" +content-hash = "63bf50fa7bfa93b92e8b54e32f2da769b14d02cce29d8f1ca788f3c3669d815c" [metadata.files] atomicwrites = [ diff --git a/pyproject.toml b/pyproject.toml index 52344287f9d..bdaa2526cbc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ pytest = "^6.2" pytest-cov = "^2.8" pytest-mock = "^3.5" pytest-sugar = "^0.9" -pre-commit = { version = "^2.6", python = "^3.6.1" } +pre-commit = { version = "^2.6", python = "^3.7" } deepdiff = "^5.0" httpretty = "^1.0" typing-extensions = { version = "^4.0.0", python = "<3.8" } From 6d1f893040f60da974547efbc3d338f4fa11bf7f Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Mon, 17 Jan 2022 19:17:06 -0600 Subject: [PATCH 04/21] chore(pyproject): Update isort and black 3.6 -> 3.7 --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index bdaa2526cbc..32ebcbd93c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,7 +77,7 @@ build-backend = "poetry.core.masonry.api" [tool.isort] -py_version = 36 +py_version = 37 profile = "black" force_single_line = true combine_as_imports = true @@ -88,7 +88,7 @@ extend_skip = ["setup.py"] [tool.black] -target-version = ['py36'] +target-version = ['py37'] experimental_string_processing = true force-exclude = ''' .*/setup\.py$ From caffbb3b2ecffbcea3b1d19167f527899511d00f Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Tue, 18 Jan 2022 08:32:44 -0600 Subject: [PATCH 05/21] chore(flake8): Update minimum python version --- .flake8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.flake8 b/.flake8 index 15b489dd632..84490393cf2 100644 --- a/.flake8 +++ b/.flake8 @@ -1,5 +1,5 @@ [flake8] -min_python_version = 3.6.0 +min_python_version = 3.7.0 max-line-length = 88 ban-relative-imports = true # flake8-use-fstring: https://github.com/MichaelKim0407/flake8-use-fstring#--percent-greedy-and---format-greedy From db87b624d8ff57e0f303457d94224b6d52d9f917 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Tue, 18 Jan 2022 08:33:24 -0600 Subject: [PATCH 06/21] 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 f4dc448f2b6..7ef2c01a5f8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,7 +49,7 @@ repos: rev: v2.31.0 hooks: - id: pyupgrade - args: [--py36-plus] + args: [--py37-plus] exclude: '^(install|get)-poetry.py$' - repo: https://github.com/pycqa/isort From e5d0bc8761939a73e0262d2e50d651b79f6522f5 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Tue, 18 Jan 2022 08:40:59 -0600 Subject: [PATCH 07/21] 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 e638ee2bf69..19c8f11da5e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] minversion = 3.18.0 isolated_build = True -envlist = py36, py37, py38, py39 +envlist = py37, py38, py39 [testenv] allowlist_externals = poetry From ba77eb70edb17a11b5c920a778d575965b468a36 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:56:01 +0000 Subject: [PATCH 08/21] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/poetry/config/source.py | 4 ++-- tests/console/commands/source/test_add.py | 3 ++- tests/utils/test_authenticator.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/poetry/config/source.py b/src/poetry/config/source.py index 06bbfcd234f..3735b193dfa 100644 --- a/src/poetry/config/source.py +++ b/src/poetry/config/source.py @@ -1,8 +1,8 @@ +import dataclasses + from typing import Dict from typing import Union -import dataclasses - @dataclasses.dataclass(order=True, eq=True) class Source: diff --git a/tests/console/commands/source/test_add.py b/tests/console/commands/source/test_add.py index 6d225826a1f..7afbc15e36d 100644 --- a/tests/console/commands/source/test_add.py +++ b/tests/console/commands/source/test_add.py @@ -1,6 +1,7 @@ +import dataclasses + from typing import TYPE_CHECKING -import dataclasses import pytest diff --git a/tests/utils/test_authenticator.py b/tests/utils/test_authenticator.py index 9c36f9d49c8..cf41f4f6a87 100644 --- a/tests/utils/test_authenticator.py +++ b/tests/utils/test_authenticator.py @@ -1,6 +1,7 @@ import re import uuid +from dataclasses import dataclass from typing import TYPE_CHECKING from typing import Any from typing import Dict @@ -13,7 +14,6 @@ import requests from cleo.io.null_io import NullIO -from dataclasses import dataclass from poetry.utils.authenticator import Authenticator From dad1b0d168803ab76fd0770ac488a49cb86a6691 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Thu, 20 Jan 2022 04:55:46 -0600 Subject: [PATCH 09/21] chore(tests): Bump unsafe kwargs PY36 (removed) PY37 --- tests/installation/test_executor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/installation/test_executor.py b/tests/installation/test_executor.py index fc8d5d40574..75a3f07e071 100644 --- a/tests/installation/test_executor.py +++ b/tests/installation/test_executor.py @@ -17,7 +17,7 @@ from cleo.io.buffered_io import BufferedIO from poetry.core.packages.package import Package from poetry.core.packages.utils.link import Link -from poetry.core.utils._compat import PY36 +from poetry.core.utils._compat import PY37 from poetry.installation.executor import Executor from poetry.installation.operations import Install @@ -111,7 +111,7 @@ def test_execute_executes_a_batch_of_operations( env: MockEnv, ): pip_editable_install = mocker.patch( - "poetry.installation.executor.pip_editable_install", unsafe=not PY36 + "poetry.installation.executor.pip_editable_install", unsafe=not PY37 ) config.merge({"cache-dir": tmp_dir}) From e308e9dc8740645508f4bac1dfe1df8f95f7cab5 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Thu, 20 Jan 2022 04:59:14 -0600 Subject: [PATCH 10/21] build(deps): Drop dataclasses --- poetry.lock | 2 +- pyproject.toml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/poetry.lock b/poetry.lock index a7d6456ab11..95c0fed68c3 100644 --- a/poetry.lock +++ b/poetry.lock @@ -705,7 +705,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes [metadata] lock-version = "1.1" python-versions = "^3.7" -content-hash = "63bf50fa7bfa93b92e8b54e32f2da769b14d02cce29d8f1ca788f3c3669d815c" +content-hash = "a9b760bb9c29d1bd8835504dde250fae18549ecb21127219d6daf4e6cd26c2e9" [metadata.files] atomicwrites = [ diff --git a/pyproject.toml b/pyproject.toml index 32ebcbd93c4..08569e6163e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,6 @@ cachecontrol = { version = "^0.12.9", extras = ["filecache"] } cachy = "^0.3.0" cleo = "^1.0.0a4" crashtest = "^0.3.0" -dataclasses = { version = "^0.8", python = "<3.7" } entrypoints = "^0.3" html5lib = "^1.0" importlib-metadata = { version = "^1.6.0", python = "<3.8" } From 70879bb4caa851379fd968860ce5b6e1c24d7207 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Thu, 20 Jan 2022 05:05:16 -0600 Subject: [PATCH 11/21] chore(pre-commit]: Remove types-dataclasses (unneeded <3.7) --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7ef2c01a5f8..656fe1e9caa 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -80,7 +80,6 @@ repos: - id: mypy pass_filenames: false additional_dependencies: - - types-dataclasses - types-requests - repo: https://github.com/pre-commit/pre-commit From 7eb262fdf7fd7419c593ec947cb4281a462bbfd0 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Fri, 21 Jan 2022 05:07:54 -0600 Subject: [PATCH 12/21] docs: py36 -> py37 --- docs/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/faq.md b/docs/faq.md index 5d7383c5ab7..13bd1693341 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -62,7 +62,7 @@ And use a `tox.ini` configuration file similar to this: ```INI [tox] isolated_build = true -envlist = py27, py36 +envlist = py27, py37 [testenv] allowlist_externals = poetry From 5cb7ea69d57d87a06067dce624bd01d5f39e19a6 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 22 Jan 2022 11:11:47 -0600 Subject: [PATCH 13/21] chore(test): Remove redundant argument Co-authored-by: Branch Vincent --- tests/installation/test_executor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/installation/test_executor.py b/tests/installation/test_executor.py index 75a3f07e071..2478810caf1 100644 --- a/tests/installation/test_executor.py +++ b/tests/installation/test_executor.py @@ -111,7 +111,7 @@ def test_execute_executes_a_batch_of_operations( env: MockEnv, ): pip_editable_install = mocker.patch( - "poetry.installation.executor.pip_editable_install", unsafe=not PY37 + "poetry.installation.executor.pip_editable_install" ) config.merge({"cache-dir": tmp_dir}) From 5841dc0fd9cdf4c49744a83c58b5aba2b67545ea Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 22 Jan 2022 11:12:28 -0600 Subject: [PATCH 14/21] build(deps): Simplify pre-commit usage Co-authored-by: Branch Vincent --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 08569e6163e..a7eb405e93f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ pytest = "^6.2" pytest-cov = "^2.8" pytest-mock = "^3.5" pytest-sugar = "^0.9" -pre-commit = { version = "^2.6", python = "^3.7" } +pre-commit = "^2.6" deepdiff = "^5.0" httpretty = "^1.0" typing-extensions = { version = "^4.0.0", python = "<3.8" } From 4491c4371dcc43c07a3cba4e8e6add5ef112abc8 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 22 Jan 2022 11:17:37 -0600 Subject: [PATCH 15/21] docs(README): Clarify minimum version is 3.7+ --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5a7efecec82..6462d540a06 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ensuring you have the right stack everywhere. ![Poetry Install](https://raw.githubusercontent.com/python-poetry/poetry/master/assets/install.gif) -It supports Python 3.6+. +It supports Python 3.7+. [![Tests Status](https://github.com/python-poetry/poetry/workflows/Tests/badge.svg?branch=master&event=push)](https://github.com/python-poetry/poetry/actions?query=workflow%3ATests+branch%3Amaster+event%3Apush) From d3524b1f0f93ad567cd6dd3e5bfbe125dc7db048 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 22 Jan 2022 11:18:29 -0600 Subject: [PATCH 16/21] docs(README): Note minimum installer version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6462d540a06..5e510f5bfae 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ You can also install Poetry for a `git` repository by using the `--git` option: curl -sSL https://install.python-poetry.org | python3 - --git https://github.com/python-poetry/poetry.git@master ```` -_Note that the installer does not support Python < 3.6._ +_Note that the installer does not support Python < 3.7._ ## Updating `poetry` From 96fc506f44e198e2625e697c261f6d063ac5f443 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 22 Jan 2022 11:21:11 -0600 Subject: [PATCH 17/21] docs(index): Note minimum version 3.7 --- docs/_index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_index.md b/docs/_index.md index 65ec48964ea..9f959fd6f2c 100644 --- a/docs/_index.md +++ b/docs/_index.md @@ -17,7 +17,7 @@ It allows you to declare the libraries your project depends on and it will manag ## System requirements -Poetry requires **Python 3.6+**. It is multi-platform and the goal is to make it work equally well +Poetry requires **Python 3.7+**. It is multi-platform and the goal is to make it work equally well on Windows, Linux and OSX. ## Installation @@ -47,7 +47,7 @@ curl -sSL https://install.python-poetry.org | python3 - ``` {{% note %}} -Note that the installer does not support Python < 3.6. +Note that the installer does not support Python < 3.7. {{% /note %}} {{% warning %}} From 10818f133d3f36c284e7f4e2b0fe4a7cb81e01a0 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 22 Jan 2022 11:29:56 -0600 Subject: [PATCH 18/21] docs: Update example references of 3.6 to 3.7 --- docs/basic-usage.md | 2 +- docs/dependency-specification.md | 6 +++--- docs/pyproject.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/basic-usage.md b/docs/basic-usage.md index c158fd847ee..59569735631 100644 --- a/docs/basic-usage.md +++ b/docs/basic-usage.md @@ -47,7 +47,7 @@ readme = "README.md" packages = [{include = "poetry_demo"}] [tool.poetry.dependencies] -python = "^3.6" +python = "^3.7" [build-system] diff --git a/docs/dependency-specification.md b/docs/dependency-specification.md index 0e06cda1d5f..bebc96b3558 100644 --- a/docs/dependency-specification.md +++ b/docs/dependency-specification.md @@ -215,7 +215,7 @@ you would declare it like so: [tool.poetry.dependencies] foo = [ {version = "<=1.9", python = "^2.7"}, - {version = "^2.0", python = "^3.4"} + {version = "^2.0", python = "^3.8"} ] ``` @@ -234,7 +234,7 @@ An example where this might be useful is the following: ```toml [tool.poetry.group.dev.dependencies] -black = {version = "19.10b0", allow-prereleases = true, python = "^3.6", markers = "platform_python_implementation == 'CPython'"} +black = {version = "19.10b0", allow-prereleases = true, python = "^3.7", markers = "platform_python_implementation == 'CPython'"} ``` As a single line, this is a lot to digest. To make this a bit easier to @@ -244,7 +244,7 @@ work with, you can do the following: [tool.poetry.group.dev.dependencies.black] version = "19.10b0" allow-prereleases = true -python = "^3.6" +python = "^3.7" markers = "platform_python_implementation == 'CPython'" ``` diff --git a/docs/pyproject.md b/docs/pyproject.md index 96c40280e40..9147294f441 100644 --- a/docs/pyproject.md +++ b/docs/pyproject.md @@ -233,7 +233,7 @@ is compatible is mandatory: ```toml [tool.poetry.dependencies] -python = "^3.6" +python = "^3.7" ``` {{% /note %}} From 941ee5bbfaff589cb5d724797cf1751b0bac3830 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 22 Jan 2022 11:46:36 -0600 Subject: [PATCH 19/21] ci(main,skip): Remove 3.6 --- .github/workflows/main.yml | 2 +- .github/workflows/skip.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1a5936b208a..b9e76eca2d4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: strategy: matrix: os: [Ubuntu, macOS, Windows] - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] + python-version: ["3.7", "3.8", "3.9", "3.10"] include: - os: Ubuntu image: ubuntu-latest diff --git a/.github/workflows/skip.yml b/.github/workflows/skip.yml index 5f61eaf0bb8..bda21acf365 100644 --- a/.github/workflows/skip.yml +++ b/.github/workflows/skip.yml @@ -26,6 +26,6 @@ jobs: strategy: matrix: os: [Ubuntu, macOS, Windows] - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] + python-version: ["3.7", "3.8", "3.9", "3.10"] steps: - run: exit 0 From 94d9c6657d22046b7239d3a80cf48a32d3e14d23 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 22 Jan 2022 12:05:37 -0600 Subject: [PATCH 20/21] chore(pip): Remove zip-unsafe workaround for python 3.6 Originally from cb14c70, part of #3835 --- src/poetry/utils/pip.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/poetry/utils/pip.py b/src/poetry/utils/pip.py index e2afd0ad379..e1d54d7e4a6 100644 --- a/src/poetry/utils/pip.py +++ b/src/poetry/utils/pip.py @@ -1,6 +1,3 @@ -import os -import sys - from typing import TYPE_CHECKING from typing import Union @@ -9,7 +6,6 @@ from poetry.exceptions import PoetryException from poetry.utils.env import EnvCommandError -from poetry.utils.env import ephemeral_environment if TYPE_CHECKING: @@ -55,18 +51,6 @@ def pip_install( try: return environment.run_pip(*args) except EnvCommandError as e: - if sys.version_info < (3, 7) and not is_wheel: - # Under certain Python3.6 installs vendored pip wheel does not contain - # zip-safe pep517 lib. In this cases we create an isolated ephemeral virtual - # environment. - with ephemeral_environment( - executable=environment.python, with_pip=True, with_setuptools=True - ) as env: - return environment.run( - *env.get_pip_command(), - *args, - env={**os.environ, "PYTHONPATH": str(env.purelib)}, - ) raise PoetryException(f"Failed to install {path.as_posix()}") from e From 34ed2534a3dfbf4e1e49bf6c15203796f4b0f53d Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 22 Jan 2022 12:07:00 -0600 Subject: [PATCH 21/21] chore: Unused import --- tests/installation/test_executor.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/installation/test_executor.py b/tests/installation/test_executor.py index 2478810caf1..1620cd68cef 100644 --- a/tests/installation/test_executor.py +++ b/tests/installation/test_executor.py @@ -17,7 +17,6 @@ from cleo.io.buffered_io import BufferedIO from poetry.core.packages.package import Package from poetry.core.packages.utils.link import Link -from poetry.core.utils._compat import PY37 from poetry.installation.executor import Executor from poetry.installation.operations import Install