From 56332636be642f772ba96e4589d8f83bd6b126bc Mon Sep 17 00:00:00 2001 From: DustinMoriarty Date: Thu, 15 Oct 2020 00:21:17 -0500 Subject: [PATCH 01/18] Added suppor for removing multiple virtualenvs in CLI. --- poetry.lock | 165 ++++++++++++++------------ poetry/console/commands/env/remove.py | 20 +++- 2 files changed, 101 insertions(+), 84 deletions(-) diff --git a/poetry.lock b/poetry.lock index 973733a6d61..940732d2359 100644 --- a/poetry.lock +++ b/poetry.lock @@ -23,9 +23,9 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.extras] +tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface"] dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface", "sphinx", "sphinx-rtd-theme", "pre-commit"] docs = ["sphinx", "sphinx-rtd-theme", "zope.interface"] -tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface"] tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six"] [[package]] @@ -37,8 +37,8 @@ optional = false python-versions = ">=2.6" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-black-multipy", "pytest-cov"] +docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] [[package]] name = "cachecontrol" @@ -50,12 +50,12 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.dependencies] lockfile = {version = ">=0.9", optional = true, markers = "extra == \"filecache\""} -msgpack = ">=0.5.2" requests = "*" +msgpack = ">=0.5.2" [package.extras] -filecache = ["lockfile (>=0.9)"] redis = ["redis (>=2.10.5)"] +filecache = ["lockfile (>=0.9)"] [[package]] name = "cachy" @@ -67,8 +67,8 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.extras] redis = ["redis (>=3.3.6,<4.0.0)"] -memcached = ["python-memcached (>=1.59,<2.0)"] msgpack = ["msgpack-python (>=0.5,<0.6)"] +memcached = ["python-memcached (>=1.59,<2.0)"] [[package]] name = "certifi" @@ -125,16 +125,16 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.dependencies] -crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} enum34 = {version = ">=1.1,<2.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\""} -pastel = ">=0.2.0,<0.3.0" -pylev = ">=1.3,<2.0" typing = {version = ">=3.6,<4.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\" or python_version >= \"3.4\" and python_version < \"3.5\""} +pylev = ">=1.3,<2.0" +pastel = ">=0.2.0,<0.3.0" typing-extensions = {version = ">=3.6,<4.0", markers = "python_version >= \"3.5\" and python_full_version < \"3.5.4\""} +crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} [[package]] name = "colorama" -version = "0.4.3" +version = "0.4.4" description = "Cross-platform colored terminal text." category = "dev" optional = false @@ -149,8 +149,8 @@ optional = false python-versions = ">=2.6" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs (>=1.2)", "pytest-flake8", "pytest-black-multipy"] +docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] [[package]] name = "contextlib2" @@ -188,17 +188,17 @@ optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" [package.dependencies] -cffi = ">=1.8,<1.11.3 || >1.11.3" -enum34 = {version = "*", markers = "python_version < \"3\""} ipaddress = {version = "*", markers = "python_version < \"3\""} +enum34 = {version = "*", markers = "python_version < \"3\""} +cffi = ">=1.8,<1.11.3 || >1.11.3" six = ">=1.4.1" [package.extras] -docs = ["sphinx (>=1.6.5,<1.8.0 || >1.8.0,<3.1.0 || >3.1.0,<3.1.1 || >3.1.1)", "sphinx-rtd-theme"] -docstest = ["doc8", "pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] -pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] ssh = ["bcrypt (>=3.1.5)"] test = ["pytest (>=3.6.0,<3.9.0 || >3.9.0,<3.9.1 || >3.9.1,<3.9.2 || >3.9.2)", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,<3.79.2 || >3.79.2)"] +docs = ["sphinx (>=1.6.5,<1.8.0 || >1.8.0,<3.1.0 || >3.1.0,<3.1.1 || >3.1.1)", "sphinx-rtd-theme"] +pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] +docstest = ["doc8", "pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] [[package]] name = "distlib" @@ -276,14 +276,14 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.dependencies] -six = ">=1.9" webencodings = "*" +six = ">=1.9" [package.extras] all = ["genshi", "chardet (>=2.2)", "lxml"] chardet = ["chardet (>=2.2)"] -genshi = ["genshi"] lxml = ["lxml"] +genshi = ["genshi"] [[package]] name = "httpretty" @@ -298,7 +298,7 @@ six = "*" [[package]] name = "identify" -version = "1.5.5" +version = "1.5.6" description = "File identification library for Python" category = "dev" optional = false @@ -324,14 +324,14 @@ optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" [package.dependencies] -configparser = {version = ">=3.5", markers = "python_version < \"3\""} -contextlib2 = {version = "*", markers = "python_version < \"3\""} pathlib2 = {version = "*", markers = "python_version < \"3\""} zipp = ">=0.5" +configparser = {version = ">=3.5", markers = "python_version < \"3\""} +contextlib2 = {version = "*", markers = "python_version < \"3\""} [package.extras] -docs = ["sphinx", "rst.linker"] testing = ["packaging", "pep517", "importlib-resources (>=1.3)"] +docs = ["sphinx", "rst.linker"] [[package]] name = "importlib-resources" @@ -342,11 +342,11 @@ optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" [package.dependencies] -contextlib2 = {version = "*", markers = "python_version < \"3\""} pathlib2 = {version = "*", markers = "python_version < \"3\""} singledispatch = {version = "*", markers = "python_version < \"3.4\""} typing = {version = "*", markers = "python_version < \"3.5\""} zipp = {version = ">=0.4", markers = "python_version < \"3.8\""} +contextlib2 = {version = "*", markers = "python_version < \"3\""} [package.extras] docs = ["sphinx", "rst.linker", "jaraco.packaging"] @@ -379,13 +379,13 @@ optional = false python-versions = ">=2.7" [package.dependencies] +secretstorage = {version = "<3", markers = "(sys_platform == \"linux2\" or sys_platform == \"linux\") and python_version < \"3.5\""} entrypoints = "*" pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_platform == \"win32\""} -secretstorage = {version = "<3", markers = "(sys_platform == \"linux2\" or sys_platform == \"linux\") and python_version < \"3.5\""} [package.extras] -docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs", "pytest-flake8"] +docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] [[package]] name = "keyring" @@ -396,13 +396,13 @@ optional = false python-versions = ">=3.5" [package.dependencies] +secretstorage = {version = "*", markers = "sys_platform == \"linux\""} importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_platform == \"win32\""} -secretstorage = {version = "*", markers = "sys_platform == \"linux\""} [package.extras] -docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-black-multipy", "pytest-cov"] +docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] [[package]] name = "keyring" @@ -414,13 +414,13 @@ python-versions = ">=3.6" [package.dependencies] importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} +SecretStorage = {version = ">=3", markers = "sys_platform == \"linux\""} jeepney = {version = ">=0.4.2", markers = "sys_platform == \"linux\""} pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_platform == \"win32\""} -SecretStorage = {version = ">=3", markers = "sys_platform == \"linux\""} [package.extras] -docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-black (>=0.3.7)", "pytest-cov", "pytest-mypy"] +docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] [[package]] name = "lockfile" @@ -444,8 +444,8 @@ six = "*" [package.extras] build = ["twine", "wheel", "blurb"] -docs = ["sphinx"] test = ["pytest", "pytest-cov"] +docs = ["sphinx"] [[package]] name = "more-itertools" @@ -458,6 +458,14 @@ python-versions = "*" [package.dependencies] six = ">=1.0.0,<2.0.0" +[[package]] +name = "more-itertools" +version = "8.4.0" +description = "More routines for operating on iterables, beyond itertools" +category = "dev" +optional = false +python-versions = ">=3.5" + [[package]] name = "more-itertools" version = "8.5.0" @@ -559,10 +567,10 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.dependencies] -enum34 = {version = ">=1.1.10,<2.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\""} functools32 = {version = ">=3.2.3-2,<4.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\""} -importlib-metadata = {version = ">=1.7.0,<2.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\" or python_version >= \"3.5\" and python_version < \"3.8\""} pathlib2 = {version = ">=2.3.5,<3.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\""} +importlib-metadata = {version = ">=1.7.0,<2.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\" or python_version >= \"3.5\" and python_version < \"3.8\""} +enum34 = {version = ">=1.1.10,<2.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\""} typing = {version = ">=3.7.4.1,<4.0.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\""} [[package]] @@ -574,13 +582,13 @@ optional = false python-versions = ">=3.6.1" [package.dependencies] -cfgv = ">=2.0.0" +pyyaml = ">=5.1" identify = ">=1.0.0" +toml = "*" +nodeenv = ">=0.11.1" importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} importlib-resources = {version = "*", markers = "python_version < \"3.7\""} -nodeenv = ">=0.11.1" -pyyaml = ">=5.1" -toml = "*" +cfgv = ">=2.0.0" virtualenv = ">=20.0.8" [[package]] @@ -632,21 +640,21 @@ optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" [package.dependencies] -atomicwrites = ">=1.0" -attrs = ">=17.4.0" -colorama = {version = "*", markers = "sys_platform == \"win32\" and python_version != \"3.4\""} funcsigs = {version = ">=1.0", markers = "python_version < \"3.0\""} +pathlib2 = {version = ">=2.2.0", markers = "python_version < \"3.6\""} importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} +six = ">=1.10.0" +attrs = ">=17.4.0" +packaging = "*" +pluggy = ">=0.12,<1.0" +atomicwrites = ">=1.0" +wcwidth = "*" more-itertools = [ {version = ">=4.0.0,<6.0.0", markers = "python_version <= \"2.7\""}, {version = ">=4.0.0", markers = "python_version > \"2.7\""}, ] -packaging = "*" -pathlib2 = {version = ">=2.2.0", markers = "python_version < \"3.6\""} -pluggy = ">=0.12,<1.0" +colorama = {version = "*", markers = "sys_platform == \"win32\" and python_version != \"3.4\""} py = ">=1.5.0" -six = ">=1.10.0" -wcwidth = "*" [package.extras] testing = ["argcomplete", "hypothesis (>=3.56)", "nose", "requests", "mock"] @@ -660,16 +668,16 @@ optional = false python-versions = ">=3.5" [package.dependencies] -atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} attrs = ">=17.4.0" -colorama = {version = "*", markers = "sys_platform == \"win32\""} -importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} -more-itertools = ">=4.0.0" packaging = "*" -pathlib2 = {version = ">=2.2.0", markers = "python_version < \"3.6\""} pluggy = ">=0.12,<1.0" -py = ">=1.5.0" +atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} +pathlib2 = {version = ">=2.2.0", markers = "python_version < \"3.6\""} wcwidth = "*" +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} +py = ">=1.5.0" +colorama = {version = "*", markers = "sys_platform == \"win32\""} +more-itertools = ">=4.0.0" [package.extras] checkqa-mypy = ["mypy (v0.761)"] @@ -684,8 +692,8 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.dependencies] -coverage = ">=4.4" pytest = ">=4.6" +coverage = ">=4.4" [package.extras] testing = ["fields", "hunter", "process-tests (2.0.2)", "six", "pytest-xdist", "virtualenv"] @@ -743,14 +751,14 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.dependencies] -certifi = ">=2017.4.17" chardet = ">=3.0.2,<4" idna = ">=2.5,<3" +certifi = ">=2017.4.17" urllib3 = ">=1.21.1,<1.25.0 || >1.25.0,<1.25.1 || >1.25.1,<1.26" [package.extras] -security = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)"] socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7)", "win-inet-pton"] +security = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)"] [[package]] name = "requests-toolbelt" @@ -857,32 +865,32 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.dependencies] -enum34 = {version = ">=1.1,<2.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\""} functools32 = {version = ">=3.2.3,<4.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\""} +enum34 = {version = ">=1.1,<2.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\""} typing = {version = ">=3.6,<4.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\" or python_version >= \"3.4\" and python_version < \"3.5\""} [[package]] name = "tox" -version = "3.20.0" +version = "3.20.1" description = "tox is a generic virtualenv management and test command line tool" category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" [package.dependencies] -colorama = {version = ">=0.4.1", markers = "platform_system == \"Windows\""} -filelock = ">=3.0.0" -importlib-metadata = {version = ">=0.12,<2", markers = "python_version < \"3.8\""} packaging = ">=14" pluggy = ">=0.12.0" -py = ">=1.4.17" -six = ">=1.14.0" toml = ">=0.9.4" +filelock = ">=3.0.0" 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" +importlib-metadata = {version = ">=0.12,<3", markers = "python_version < \"3.8\""} +six = ">=1.14.0" +colorama = {version = ">=0.4.1", markers = "platform_system == \"Windows\""} +py = ">=1.4.17" [package.extras] -docs = ["pygments-github-lexers (>=0.0.5)", "sphinx (>=2.0.0)", "sphinxcontrib-autoprogram (>=0.1.5)", "towncrier (>=18.5.0)"] testing = ["flaky (>=3.4.0)", "freezegun (>=0.3.11)", "pathlib2 (>=2.3.3)", "psutil (>=5.6.1)", "pytest (>=4.0.0)", "pytest-cov (>=2.5.1)", "pytest-mock (>=1.10.0)", "pytest-randomly (>=1.0.0)", "pytest-xdist (>=1.22.2)"] +docs = ["pygments-github-lexers (>=0.0.5)", "sphinx (>=2.0.0)", "sphinxcontrib-autoprogram (>=0.1.5)", "towncrier (>=18.5.0)"] [[package]] name = "typing" @@ -900,9 +908,6 @@ category = "main" optional = false python-versions = "*" -[package.dependencies] -typing = {version = ">=3.7.4", markers = "python_version < \"3.5\""} - [[package]] name = "urllib3" version = "1.25.10" @@ -912,30 +917,30 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" [package.extras] +socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7,<2.0)"] brotli = ["brotlipy (>=0.6.0)"] secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "pyOpenSSL (>=0.14)", "ipaddress"] -socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7,<2.0)"] [[package]] name = "virtualenv" -version = "20.0.31" +version = "20.0.34" description = "Virtual Python Environment builder" category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" [package.dependencies] +pathlib2 = {version = ">=2.3.3,<3", markers = "python_version < \"3.4\" and sys_platform != \"win32\""} +filelock = ">=3.0.0,<4" +importlib-metadata = {version = ">=0.12,<3", markers = "python_version < \"3.8\""} +six = ">=1.9.0,<2" appdirs = ">=1.4.3,<2" distlib = ">=0.3.1,<1" -filelock = ">=3.0.0,<4" -importlib-metadata = {version = ">=0.12,<2", markers = "python_version < \"3.8\""} importlib-resources = {version = ">=1.0", markers = "python_version < \"3.7\""} -pathlib2 = {version = ">=2.3.3,<3", markers = "python_version < \"3.4\" and sys_platform != \"win32\""} -six = ">=1.9.0,<2" [package.extras] +testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)", "pytest-xdist (>=1.31.0)", "packaging (>=20.0)", "xonsh (>=0.9.16)"] docs = ["proselint (>=0.10.2)", "sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=19.9.0rc1)"] -testing = ["coverage (>=5)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)", "pytest-xdist (>=1.31.0)", "packaging (>=20.0)", "xonsh (>=0.9.16)"] [[package]] name = "wcwidth" @@ -968,8 +973,8 @@ python-versions = ">=2.7" contextlib2 = {version = "*", markers = "python_version < \"3.4\""} [package.extras] -docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] testing = ["pathlib2", "unittest2", "jaraco.itertools", "func-timeout"] +docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] [metadata] lock-version = "1.1" @@ -1060,8 +1065,7 @@ clikit = [ {file = "clikit-0.6.2.tar.gz", hash = "sha256:442ee5db9a14120635c5990bcdbfe7c03ada5898291f0c802f77be71569ded59"}, ] colorama = [ - {file = "colorama-0.4.3-py2.py3-none-any.whl", hash = "sha256:7d73d2a99753107a36ac6b455ee49046802e59d9d076ef8e47b61499fa29afff"}, - {file = "colorama-0.4.3.tar.gz", hash = "sha256:e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1"}, + {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, ] configparser = [ {file = "configparser-4.0.2-py2.py3-none-any.whl", hash = "sha256:254c1d9c79f60c45dfde850850883d5aaa7f19a23f13561243a050d5a7c3fe4c"}, @@ -1175,8 +1179,8 @@ httpretty = [ {file = "httpretty-0.9.7.tar.gz", hash = "sha256:66216f26b9d2c52e81808f3e674a6fb65d4bf719721394a1a9be926177e55fbe"}, ] identify = [ - {file = "identify-1.5.5-py2.py3-none-any.whl", hash = "sha256:da683bfb7669fa749fc7731f378229e2dbf29a1d1337cbde04106f02236eb29d"}, - {file = "identify-1.5.5.tar.gz", hash = "sha256:7c22c384a2c9b32c5cc891d13f923f6b2653aa83e2d75d8f79be240d6c86c4f4"}, + {file = "identify-1.5.6-py2.py3-none-any.whl", hash = "sha256:3139bf72d81dfd785b0a464e2776bd59bdc725b4cc10e6cf46b56a0db931c82e"}, + {file = "identify-1.5.6.tar.gz", hash = "sha256:969d844b7a85d32a5f9ac4e163df6e846d73c87c8b75847494ee8f4bd2186421"}, ] idna = [ {file = "idna-2.10-py2.py3-none-any.whl", hash = "sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0"}, @@ -1218,6 +1222,8 @@ more-itertools = [ {file = "more-itertools-5.0.0.tar.gz", hash = "sha256:38a936c0a6d98a38bcc2d03fdaaedaba9f412879461dd2ceff8d37564d6522e4"}, {file = "more_itertools-5.0.0-py2-none-any.whl", hash = "sha256:c0a5785b1109a6bd7fac76d6837fd1feca158e54e521ccd2ae8bfe393cc9d4fc"}, {file = "more_itertools-5.0.0-py3-none-any.whl", hash = "sha256:fe7a7cae1ccb57d33952113ff4fa1bc5f879963600ed74918f1236e212ee50b9"}, + {file = "more-itertools-8.4.0.tar.gz", hash = "sha256:68c70cc7167bdf5c7c9d8f6954a7837089c6a36bf565383919bb595efb8a17e5"}, + {file = "more_itertools-8.4.0-py3-none-any.whl", hash = "sha256:b78134b2063dd214000685165d81c154522c3ee0a1c0d4d113c80361c234c5a2"}, {file = "more-itertools-8.5.0.tar.gz", hash = "sha256:6f83822ae94818eae2612063a5101a7311e68ae8002005b5e05f03fd74a86a20"}, {file = "more_itertools-8.5.0-py3-none-any.whl", hash = "sha256:9b30f12df9393f0d28af9210ff8efe48d10c94f73e5daf886f10c4b0b0b4f03c"}, ] @@ -1371,6 +1377,7 @@ six = [ ] subprocess32 = [ {file = "subprocess32-3.5.4-cp27-cp27m-macosx_10_6_intel.whl", hash = "sha256:88e37c1aac5388df41cc8a8456bb49ebffd321a3ad4d70358e3518176de3a56b"}, + {file = "subprocess32-3.5.4-cp27-cp27mu-manylinux2014_x86_64.whl", hash = "sha256:e45d985aef903c5b7444d34350b05da91a9e0ea015415ab45a21212786c649d0"}, {file = "subprocess32-3.5.4.tar.gz", hash = "sha256:eb2937c80497978d181efa1b839ec2d9622cf9600a039a79d0e108d1f9aec79d"}, ] termcolor = [ @@ -1385,8 +1392,8 @@ tomlkit = [ {file = "tomlkit-0.7.0.tar.gz", hash = "sha256:ac57f29693fab3e309ea789252fcce3061e19110085aa31af5446ca749325618"}, ] tox = [ - {file = "tox-3.20.0-py2.py3-none-any.whl", hash = "sha256:e6318f404aff16522ff5211c88cab82b39af121735a443674e4e2e65f4e4637b"}, - {file = "tox-3.20.0.tar.gz", hash = "sha256:eb629ddc60e8542fd4a1956b2462e3b8771d49f1ff630cecceacaa0fbfb7605a"}, + {file = "tox-3.20.1-py2.py3-none-any.whl", hash = "sha256:42ce19ce5dc2f6d6b1fdc5666c476e1f1e2897359b47e0aa3a5b774f335d57c2"}, + {file = "tox-3.20.1.tar.gz", hash = "sha256:4321052bfe28f9d85082341ca8e233e3ea901fdd14dab8a5d3fbd810269fbaf6"}, ] typing = [ {file = "typing-3.7.4.3-py2-none-any.whl", hash = "sha256:283d868f5071ab9ad873e5e52268d611e851c870a2ba354193026f2dfb29d8b5"}, @@ -1402,8 +1409,8 @@ urllib3 = [ {file = "urllib3-1.25.10.tar.gz", hash = "sha256:91056c15fa70756691db97756772bb1eb9678fa585d9184f24534b100dc60f4a"}, ] virtualenv = [ - {file = "virtualenv-20.0.31-py2.py3-none-any.whl", hash = "sha256:e0305af10299a7fb0d69393d8f04cb2965dda9351140d11ac8db4e5e3970451b"}, - {file = "virtualenv-20.0.31.tar.gz", hash = "sha256:43add625c53c596d38f971a465553f6318decc39d98512bc100fa1b1e839c8dc"}, + {file = "virtualenv-20.0.34-py2.py3-none-any.whl", hash = "sha256:4ecd607e7809bd7384039065639a8babc9fa562fe1b73b24095ce85b83d55fcf"}, + {file = "virtualenv-20.0.34.tar.gz", hash = "sha256:4bf0e2bf99d33b123a895a5a244f0d7adb2a92171c6bbb31c3e2db235624abf1"}, ] wcwidth = [ {file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"}, diff --git a/poetry/console/commands/env/remove.py b/poetry/console/commands/env/remove.py index 5f208851deb..1110dc21da9 100644 --- a/poetry/console/commands/env/remove.py +++ b/poetry/console/commands/env/remove.py @@ -1,4 +1,4 @@ -from cleo import argument +from cleo import argument, option from ..command import Command @@ -6,16 +6,26 @@ class EnvRemoveCommand(Command): name = "remove" - description = "Removes a specific virtualenv associated with the project." + description = "Removes specific virtualenvs associated with the project." arguments = [ - argument("python", "The python executable to remove the virtualenv for.") + argument("python", "The python executables to remove the virtualenv for.", optional=True, multiple=True) + ] + options = [ + option("all", description="Remove all virtualenv associated with the project." ), ] def handle(self): from poetry.utils.env import EnvManager manager = EnvManager(self.poetry) - venv = manager.remove(self.argument("python")) + pythons = self.argument("python") + all = self.option("all") + if all: + pythons = [x.path.name for x in manager.list()] + if not pythons: + self.line("No virtualenv provided.") + for python in pythons: + venv = manager.remove(python) + self.line("Deleted virtualenv: {}".format(venv.path)) - self.line("Deleted virtualenv: {}".format(venv.path)) From 13e9e0a4bc0bfac92f59b219839eadcabfdde59d Mon Sep 17 00:00:00 2001 From: DustinMoriarty Date: Thu, 15 Oct 2020 00:37:42 -0500 Subject: [PATCH 02/18] Added tests. --- tests/console/commands/env/test_remove.py | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/tests/console/commands/env/test_remove.py b/tests/console/commands/env/test_remove.py index 2b4f3ae775c..f7615658e5d 100644 --- a/tests/console/commands/env/test_remove.py +++ b/tests/console/commands/env/test_remove.py @@ -39,3 +39,34 @@ def test_remove_by_name(tester, venvs_in_cache_dirs, venv_name, venv_cache): expected += "Deleted virtualenv: {}\n".format((venv_cache / name)) assert expected == tester.io.fetch_output() + + +def test_remove_all(tester, venvs_in_cache_dirs, venv_name, venv_cache): + expected = "" + tester.execute("--all") + for name in venvs_in_cache_dirs: + assert not (venv_cache / name).exists() + expected += "Deleted virtualenv: {}\n".format((venv_cache / name)) + assert expected == tester.io.fetch_output() + + +def test_remove_all_and_version(tester, venvs_in_cache_dirs, venv_name, venv_cache): + expected = "" + tester.execute("--all {}".format(venvs_in_cache_dirs[0])) + for name in venvs_in_cache_dirs: + assert not (venv_cache / name).exists() + expected += "Deleted virtualenv: {}\n".format((venv_cache / name)) + assert expected == tester.io.fetch_output() + + +def test_remove_multiple(tester, venvs_in_cache_dirs, venv_name, venv_cache): + expected = "" + removed_envs = venvs_in_cache_dirs[0:2] + remaining_envs = venvs_in_cache_dirs[2:] + tester.execute(" ".join(removed_envs)) + for name in removed_envs: + assert not (venv_cache / name).exists() + expected += "Deleted virtualenv: {}\n".format((venv_cache / name)) + for name in remaining_envs: + assert (venv_cache / name).exists() + assert expected == tester.io.fetch_output() From 875a490c89909144200ef03be964191c440c67df Mon Sep 17 00:00:00 2001 From: DustinMoriarty Date: Thu, 15 Oct 2020 00:48:07 -0500 Subject: [PATCH 03/18] Formatted with black. --- poetry/console/commands/env/remove.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/poetry/console/commands/env/remove.py b/poetry/console/commands/env/remove.py index 1110dc21da9..4e6abf22b47 100644 --- a/poetry/console/commands/env/remove.py +++ b/poetry/console/commands/env/remove.py @@ -9,10 +9,15 @@ class EnvRemoveCommand(Command): description = "Removes specific virtualenvs associated with the project." arguments = [ - argument("python", "The python executables to remove the virtualenv for.", optional=True, multiple=True) + argument( + "python", + "The python executables to remove the virtualenv for.", + optional=True, + multiple=True, + ) ] options = [ - option("all", description="Remove all virtualenv associated with the project." ), + option("all", description="Remove all virtualenv associated with the project."), ] def handle(self): @@ -28,4 +33,3 @@ def handle(self): for python in pythons: venv = manager.remove(python) self.line("Deleted virtualenv: {}".format(venv.path)) - From 3105085ff29d165beca9c5e93fa1e78feefb6d0e Mon Sep 17 00:00:00 2001 From: DustinMoriarty Date: Thu, 15 Oct 2020 01:10:46 -0500 Subject: [PATCH 04/18] Ran pre-comit. --- poetry/console/commands/env/remove.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/poetry/console/commands/env/remove.py b/poetry/console/commands/env/remove.py index 4e6abf22b47..8ef4d6907c3 100644 --- a/poetry/console/commands/env/remove.py +++ b/poetry/console/commands/env/remove.py @@ -1,4 +1,5 @@ -from cleo import argument, option +from cleo import argument +from cleo import option from ..command import Command From 6da7cce3deac62d53ae605bb9e6713639f462c4e Mon Sep 17 00:00:00 2001 From: DustinMoriarty Date: Sat, 17 Oct 2020 18:18:41 -0500 Subject: [PATCH 05/18] Update poetry/console/commands/env/remove.py Co-authored-by: Arun Babu Neelicattu --- poetry/console/commands/env/remove.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poetry/console/commands/env/remove.py b/poetry/console/commands/env/remove.py index 8ef4d6907c3..1d6c9f96949 100644 --- a/poetry/console/commands/env/remove.py +++ b/poetry/console/commands/env/remove.py @@ -7,7 +7,7 @@ class EnvRemoveCommand(Command): name = "remove" - description = "Removes specific virtualenvs associated with the project." + description = "Removes specific virtual environments associated with the project." arguments = [ argument( From 5d924520147e2e6b10bf7ace7a846b8a8e4dde3b Mon Sep 17 00:00:00 2001 From: DustinMoriarty Date: Sat, 17 Oct 2020 18:18:56 -0500 Subject: [PATCH 06/18] Update poetry/console/commands/env/remove.py Co-authored-by: Arun Babu Neelicattu --- poetry/console/commands/env/remove.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poetry/console/commands/env/remove.py b/poetry/console/commands/env/remove.py index 1d6c9f96949..eb9d05d8fbd 100644 --- a/poetry/console/commands/env/remove.py +++ b/poetry/console/commands/env/remove.py @@ -18,7 +18,7 @@ class EnvRemoveCommand(Command): ) ] options = [ - option("all", description="Remove all virtualenv associated with the project."), + option("all", description="Remove all managed virtual environments associated with the project."), ] def handle(self): From 1257b99413fd1b507d8b45e60903eb4b846f7f68 Mon Sep 17 00:00:00 2001 From: DustinMoriarty Date: Sat, 17 Oct 2020 18:19:09 -0500 Subject: [PATCH 07/18] Update poetry/console/commands/env/remove.py Co-authored-by: Arun Babu Neelicattu --- poetry/console/commands/env/remove.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poetry/console/commands/env/remove.py b/poetry/console/commands/env/remove.py index eb9d05d8fbd..9ab112e8570 100644 --- a/poetry/console/commands/env/remove.py +++ b/poetry/console/commands/env/remove.py @@ -12,7 +12,7 @@ class EnvRemoveCommand(Command): arguments = [ argument( "python", - "The python executables to remove the virtualenv for.", + "The python executable(s) to remove the virtual environment for.", optional=True, multiple=True, ) From a4b87cf0d345642ffa460564d7c2b218c1025a55 Mon Sep 17 00:00:00 2001 From: DustinMoriarty Date: Sat, 17 Oct 2020 18:22:34 -0500 Subject: [PATCH 08/18] Reverted changes to poetry.lock. --- poetry.lock | 165 +++++++++++++++++++++++++--------------------------- 1 file changed, 79 insertions(+), 86 deletions(-) diff --git a/poetry.lock b/poetry.lock index 940732d2359..973733a6d61 100644 --- a/poetry.lock +++ b/poetry.lock @@ -23,9 +23,9 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.extras] -tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface"] dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface", "sphinx", "sphinx-rtd-theme", "pre-commit"] docs = ["sphinx", "sphinx-rtd-theme", "zope.interface"] +tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface"] tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six"] [[package]] @@ -37,8 +37,8 @@ optional = false python-versions = ">=2.6" [package.extras] -testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-black-multipy", "pytest-cov"] docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-black-multipy", "pytest-cov"] [[package]] name = "cachecontrol" @@ -50,12 +50,12 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.dependencies] lockfile = {version = ">=0.9", optional = true, markers = "extra == \"filecache\""} -requests = "*" msgpack = ">=0.5.2" +requests = "*" [package.extras] -redis = ["redis (>=2.10.5)"] filecache = ["lockfile (>=0.9)"] +redis = ["redis (>=2.10.5)"] [[package]] name = "cachy" @@ -67,8 +67,8 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.extras] redis = ["redis (>=3.3.6,<4.0.0)"] -msgpack = ["msgpack-python (>=0.5,<0.6)"] memcached = ["python-memcached (>=1.59,<2.0)"] +msgpack = ["msgpack-python (>=0.5,<0.6)"] [[package]] name = "certifi" @@ -125,16 +125,16 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.dependencies] +crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} enum34 = {version = ">=1.1,<2.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\""} -typing = {version = ">=3.6,<4.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\" or python_version >= \"3.4\" and python_version < \"3.5\""} -pylev = ">=1.3,<2.0" pastel = ">=0.2.0,<0.3.0" +pylev = ">=1.3,<2.0" +typing = {version = ">=3.6,<4.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\" or python_version >= \"3.4\" and python_version < \"3.5\""} typing-extensions = {version = ">=3.6,<4.0", markers = "python_version >= \"3.5\" and python_full_version < \"3.5.4\""} -crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} [[package]] name = "colorama" -version = "0.4.4" +version = "0.4.3" description = "Cross-platform colored terminal text." category = "dev" optional = false @@ -149,8 +149,8 @@ optional = false python-versions = ">=2.6" [package.extras] -testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs (>=1.2)", "pytest-flake8", "pytest-black-multipy"] docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs (>=1.2)", "pytest-flake8", "pytest-black-multipy"] [[package]] name = "contextlib2" @@ -188,17 +188,17 @@ optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" [package.dependencies] -ipaddress = {version = "*", markers = "python_version < \"3\""} -enum34 = {version = "*", markers = "python_version < \"3\""} cffi = ">=1.8,<1.11.3 || >1.11.3" +enum34 = {version = "*", markers = "python_version < \"3\""} +ipaddress = {version = "*", markers = "python_version < \"3\""} six = ">=1.4.1" [package.extras] -ssh = ["bcrypt (>=3.1.5)"] -test = ["pytest (>=3.6.0,<3.9.0 || >3.9.0,<3.9.1 || >3.9.1,<3.9.2 || >3.9.2)", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,<3.79.2 || >3.79.2)"] docs = ["sphinx (>=1.6.5,<1.8.0 || >1.8.0,<3.1.0 || >3.1.0,<3.1.1 || >3.1.1)", "sphinx-rtd-theme"] -pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] docstest = ["doc8", "pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] +pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] +ssh = ["bcrypt (>=3.1.5)"] +test = ["pytest (>=3.6.0,<3.9.0 || >3.9.0,<3.9.1 || >3.9.1,<3.9.2 || >3.9.2)", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,<3.79.2 || >3.79.2)"] [[package]] name = "distlib" @@ -276,14 +276,14 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.dependencies] -webencodings = "*" six = ">=1.9" +webencodings = "*" [package.extras] all = ["genshi", "chardet (>=2.2)", "lxml"] chardet = ["chardet (>=2.2)"] -lxml = ["lxml"] genshi = ["genshi"] +lxml = ["lxml"] [[package]] name = "httpretty" @@ -298,7 +298,7 @@ six = "*" [[package]] name = "identify" -version = "1.5.6" +version = "1.5.5" description = "File identification library for Python" category = "dev" optional = false @@ -324,14 +324,14 @@ optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" [package.dependencies] -pathlib2 = {version = "*", markers = "python_version < \"3\""} -zipp = ">=0.5" configparser = {version = ">=3.5", markers = "python_version < \"3\""} contextlib2 = {version = "*", markers = "python_version < \"3\""} +pathlib2 = {version = "*", markers = "python_version < \"3\""} +zipp = ">=0.5" [package.extras] -testing = ["packaging", "pep517", "importlib-resources (>=1.3)"] docs = ["sphinx", "rst.linker"] +testing = ["packaging", "pep517", "importlib-resources (>=1.3)"] [[package]] name = "importlib-resources" @@ -342,11 +342,11 @@ optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" [package.dependencies] +contextlib2 = {version = "*", markers = "python_version < \"3\""} pathlib2 = {version = "*", markers = "python_version < \"3\""} singledispatch = {version = "*", markers = "python_version < \"3.4\""} typing = {version = "*", markers = "python_version < \"3.5\""} zipp = {version = ">=0.4", markers = "python_version < \"3.8\""} -contextlib2 = {version = "*", markers = "python_version < \"3\""} [package.extras] docs = ["sphinx", "rst.linker", "jaraco.packaging"] @@ -379,13 +379,13 @@ optional = false python-versions = ">=2.7" [package.dependencies] -secretstorage = {version = "<3", markers = "(sys_platform == \"linux2\" or sys_platform == \"linux\") and python_version < \"3.5\""} entrypoints = "*" pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_platform == \"win32\""} +secretstorage = {version = "<3", markers = "(sys_platform == \"linux2\" or sys_platform == \"linux\") and python_version < \"3.5\""} [package.extras] -testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs", "pytest-flake8"] docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs", "pytest-flake8"] [[package]] name = "keyring" @@ -396,13 +396,13 @@ optional = false python-versions = ">=3.5" [package.dependencies] -secretstorage = {version = "*", markers = "sys_platform == \"linux\""} importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_platform == \"win32\""} +secretstorage = {version = "*", markers = "sys_platform == \"linux\""} [package.extras] -testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-black-multipy", "pytest-cov"] docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-black-multipy", "pytest-cov"] [[package]] name = "keyring" @@ -414,13 +414,13 @@ python-versions = ">=3.6" [package.dependencies] importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} -SecretStorage = {version = ">=3", markers = "sys_platform == \"linux\""} jeepney = {version = ">=0.4.2", markers = "sys_platform == \"linux\""} pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_platform == \"win32\""} +SecretStorage = {version = ">=3", markers = "sys_platform == \"linux\""} [package.extras] -testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-black (>=0.3.7)", "pytest-cov", "pytest-mypy"] docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-black (>=0.3.7)", "pytest-cov", "pytest-mypy"] [[package]] name = "lockfile" @@ -444,8 +444,8 @@ six = "*" [package.extras] build = ["twine", "wheel", "blurb"] -test = ["pytest", "pytest-cov"] docs = ["sphinx"] +test = ["pytest", "pytest-cov"] [[package]] name = "more-itertools" @@ -458,14 +458,6 @@ python-versions = "*" [package.dependencies] six = ">=1.0.0,<2.0.0" -[[package]] -name = "more-itertools" -version = "8.4.0" -description = "More routines for operating on iterables, beyond itertools" -category = "dev" -optional = false -python-versions = ">=3.5" - [[package]] name = "more-itertools" version = "8.5.0" @@ -567,10 +559,10 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.dependencies] +enum34 = {version = ">=1.1.10,<2.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\""} functools32 = {version = ">=3.2.3-2,<4.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\""} -pathlib2 = {version = ">=2.3.5,<3.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\""} importlib-metadata = {version = ">=1.7.0,<2.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\" or python_version >= \"3.5\" and python_version < \"3.8\""} -enum34 = {version = ">=1.1.10,<2.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\""} +pathlib2 = {version = ">=2.3.5,<3.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\""} typing = {version = ">=3.7.4.1,<4.0.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\""} [[package]] @@ -582,13 +574,13 @@ optional = false python-versions = ">=3.6.1" [package.dependencies] -pyyaml = ">=5.1" +cfgv = ">=2.0.0" identify = ">=1.0.0" -toml = "*" -nodeenv = ">=0.11.1" importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} importlib-resources = {version = "*", markers = "python_version < \"3.7\""} -cfgv = ">=2.0.0" +nodeenv = ">=0.11.1" +pyyaml = ">=5.1" +toml = "*" virtualenv = ">=20.0.8" [[package]] @@ -640,21 +632,21 @@ optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" [package.dependencies] +atomicwrites = ">=1.0" +attrs = ">=17.4.0" +colorama = {version = "*", markers = "sys_platform == \"win32\" and python_version != \"3.4\""} funcsigs = {version = ">=1.0", markers = "python_version < \"3.0\""} -pathlib2 = {version = ">=2.2.0", markers = "python_version < \"3.6\""} importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} -six = ">=1.10.0" -attrs = ">=17.4.0" -packaging = "*" -pluggy = ">=0.12,<1.0" -atomicwrites = ">=1.0" -wcwidth = "*" more-itertools = [ {version = ">=4.0.0,<6.0.0", markers = "python_version <= \"2.7\""}, {version = ">=4.0.0", markers = "python_version > \"2.7\""}, ] -colorama = {version = "*", markers = "sys_platform == \"win32\" and python_version != \"3.4\""} +packaging = "*" +pathlib2 = {version = ">=2.2.0", markers = "python_version < \"3.6\""} +pluggy = ">=0.12,<1.0" py = ">=1.5.0" +six = ">=1.10.0" +wcwidth = "*" [package.extras] testing = ["argcomplete", "hypothesis (>=3.56)", "nose", "requests", "mock"] @@ -668,16 +660,16 @@ optional = false python-versions = ">=3.5" [package.dependencies] +atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} attrs = ">=17.4.0" +colorama = {version = "*", markers = "sys_platform == \"win32\""} +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} +more-itertools = ">=4.0.0" packaging = "*" -pluggy = ">=0.12,<1.0" -atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} pathlib2 = {version = ">=2.2.0", markers = "python_version < \"3.6\""} -wcwidth = "*" -importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} +pluggy = ">=0.12,<1.0" py = ">=1.5.0" -colorama = {version = "*", markers = "sys_platform == \"win32\""} -more-itertools = ">=4.0.0" +wcwidth = "*" [package.extras] checkqa-mypy = ["mypy (v0.761)"] @@ -692,8 +684,8 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.dependencies] -pytest = ">=4.6" coverage = ">=4.4" +pytest = ">=4.6" [package.extras] testing = ["fields", "hunter", "process-tests (2.0.2)", "six", "pytest-xdist", "virtualenv"] @@ -751,14 +743,14 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.dependencies] +certifi = ">=2017.4.17" chardet = ">=3.0.2,<4" idna = ">=2.5,<3" -certifi = ">=2017.4.17" urllib3 = ">=1.21.1,<1.25.0 || >1.25.0,<1.25.1 || >1.25.1,<1.26" [package.extras] -socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7)", "win-inet-pton"] security = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)"] +socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7)", "win-inet-pton"] [[package]] name = "requests-toolbelt" @@ -865,32 +857,32 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.dependencies] -functools32 = {version = ">=3.2.3,<4.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\""} enum34 = {version = ">=1.1,<2.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\""} +functools32 = {version = ">=3.2.3,<4.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\""} typing = {version = ">=3.6,<4.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\" or python_version >= \"3.4\" and python_version < \"3.5\""} [[package]] name = "tox" -version = "3.20.1" +version = "3.20.0" description = "tox is a generic virtualenv management and test command line tool" category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" [package.dependencies] +colorama = {version = ">=0.4.1", markers = "platform_system == \"Windows\""} +filelock = ">=3.0.0" +importlib-metadata = {version = ">=0.12,<2", markers = "python_version < \"3.8\""} packaging = ">=14" pluggy = ">=0.12.0" +py = ">=1.4.17" +six = ">=1.14.0" toml = ">=0.9.4" -filelock = ">=3.0.0" 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" -importlib-metadata = {version = ">=0.12,<3", markers = "python_version < \"3.8\""} -six = ">=1.14.0" -colorama = {version = ">=0.4.1", markers = "platform_system == \"Windows\""} -py = ">=1.4.17" [package.extras] -testing = ["flaky (>=3.4.0)", "freezegun (>=0.3.11)", "pathlib2 (>=2.3.3)", "psutil (>=5.6.1)", "pytest (>=4.0.0)", "pytest-cov (>=2.5.1)", "pytest-mock (>=1.10.0)", "pytest-randomly (>=1.0.0)", "pytest-xdist (>=1.22.2)"] docs = ["pygments-github-lexers (>=0.0.5)", "sphinx (>=2.0.0)", "sphinxcontrib-autoprogram (>=0.1.5)", "towncrier (>=18.5.0)"] +testing = ["flaky (>=3.4.0)", "freezegun (>=0.3.11)", "pathlib2 (>=2.3.3)", "psutil (>=5.6.1)", "pytest (>=4.0.0)", "pytest-cov (>=2.5.1)", "pytest-mock (>=1.10.0)", "pytest-randomly (>=1.0.0)", "pytest-xdist (>=1.22.2)"] [[package]] name = "typing" @@ -908,6 +900,9 @@ category = "main" optional = false python-versions = "*" +[package.dependencies] +typing = {version = ">=3.7.4", markers = "python_version < \"3.5\""} + [[package]] name = "urllib3" version = "1.25.10" @@ -917,30 +912,30 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" [package.extras] -socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7,<2.0)"] brotli = ["brotlipy (>=0.6.0)"] secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "pyOpenSSL (>=0.14)", "ipaddress"] +socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7,<2.0)"] [[package]] name = "virtualenv" -version = "20.0.34" +version = "20.0.31" description = "Virtual Python Environment builder" category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" [package.dependencies] -pathlib2 = {version = ">=2.3.3,<3", markers = "python_version < \"3.4\" and sys_platform != \"win32\""} -filelock = ">=3.0.0,<4" -importlib-metadata = {version = ">=0.12,<3", markers = "python_version < \"3.8\""} -six = ">=1.9.0,<2" appdirs = ">=1.4.3,<2" distlib = ">=0.3.1,<1" +filelock = ">=3.0.0,<4" +importlib-metadata = {version = ">=0.12,<2", markers = "python_version < \"3.8\""} importlib-resources = {version = ">=1.0", markers = "python_version < \"3.7\""} +pathlib2 = {version = ">=2.3.3,<3", markers = "python_version < \"3.4\" and sys_platform != \"win32\""} +six = ">=1.9.0,<2" [package.extras] -testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)", "pytest-xdist (>=1.31.0)", "packaging (>=20.0)", "xonsh (>=0.9.16)"] docs = ["proselint (>=0.10.2)", "sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=19.9.0rc1)"] +testing = ["coverage (>=5)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)", "pytest-xdist (>=1.31.0)", "packaging (>=20.0)", "xonsh (>=0.9.16)"] [[package]] name = "wcwidth" @@ -973,8 +968,8 @@ python-versions = ">=2.7" contextlib2 = {version = "*", markers = "python_version < \"3.4\""} [package.extras] -testing = ["pathlib2", "unittest2", "jaraco.itertools", "func-timeout"] docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] +testing = ["pathlib2", "unittest2", "jaraco.itertools", "func-timeout"] [metadata] lock-version = "1.1" @@ -1065,7 +1060,8 @@ clikit = [ {file = "clikit-0.6.2.tar.gz", hash = "sha256:442ee5db9a14120635c5990bcdbfe7c03ada5898291f0c802f77be71569ded59"}, ] colorama = [ - {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, + {file = "colorama-0.4.3-py2.py3-none-any.whl", hash = "sha256:7d73d2a99753107a36ac6b455ee49046802e59d9d076ef8e47b61499fa29afff"}, + {file = "colorama-0.4.3.tar.gz", hash = "sha256:e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1"}, ] configparser = [ {file = "configparser-4.0.2-py2.py3-none-any.whl", hash = "sha256:254c1d9c79f60c45dfde850850883d5aaa7f19a23f13561243a050d5a7c3fe4c"}, @@ -1179,8 +1175,8 @@ httpretty = [ {file = "httpretty-0.9.7.tar.gz", hash = "sha256:66216f26b9d2c52e81808f3e674a6fb65d4bf719721394a1a9be926177e55fbe"}, ] identify = [ - {file = "identify-1.5.6-py2.py3-none-any.whl", hash = "sha256:3139bf72d81dfd785b0a464e2776bd59bdc725b4cc10e6cf46b56a0db931c82e"}, - {file = "identify-1.5.6.tar.gz", hash = "sha256:969d844b7a85d32a5f9ac4e163df6e846d73c87c8b75847494ee8f4bd2186421"}, + {file = "identify-1.5.5-py2.py3-none-any.whl", hash = "sha256:da683bfb7669fa749fc7731f378229e2dbf29a1d1337cbde04106f02236eb29d"}, + {file = "identify-1.5.5.tar.gz", hash = "sha256:7c22c384a2c9b32c5cc891d13f923f6b2653aa83e2d75d8f79be240d6c86c4f4"}, ] idna = [ {file = "idna-2.10-py2.py3-none-any.whl", hash = "sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0"}, @@ -1222,8 +1218,6 @@ more-itertools = [ {file = "more-itertools-5.0.0.tar.gz", hash = "sha256:38a936c0a6d98a38bcc2d03fdaaedaba9f412879461dd2ceff8d37564d6522e4"}, {file = "more_itertools-5.0.0-py2-none-any.whl", hash = "sha256:c0a5785b1109a6bd7fac76d6837fd1feca158e54e521ccd2ae8bfe393cc9d4fc"}, {file = "more_itertools-5.0.0-py3-none-any.whl", hash = "sha256:fe7a7cae1ccb57d33952113ff4fa1bc5f879963600ed74918f1236e212ee50b9"}, - {file = "more-itertools-8.4.0.tar.gz", hash = "sha256:68c70cc7167bdf5c7c9d8f6954a7837089c6a36bf565383919bb595efb8a17e5"}, - {file = "more_itertools-8.4.0-py3-none-any.whl", hash = "sha256:b78134b2063dd214000685165d81c154522c3ee0a1c0d4d113c80361c234c5a2"}, {file = "more-itertools-8.5.0.tar.gz", hash = "sha256:6f83822ae94818eae2612063a5101a7311e68ae8002005b5e05f03fd74a86a20"}, {file = "more_itertools-8.5.0-py3-none-any.whl", hash = "sha256:9b30f12df9393f0d28af9210ff8efe48d10c94f73e5daf886f10c4b0b0b4f03c"}, ] @@ -1377,7 +1371,6 @@ six = [ ] subprocess32 = [ {file = "subprocess32-3.5.4-cp27-cp27m-macosx_10_6_intel.whl", hash = "sha256:88e37c1aac5388df41cc8a8456bb49ebffd321a3ad4d70358e3518176de3a56b"}, - {file = "subprocess32-3.5.4-cp27-cp27mu-manylinux2014_x86_64.whl", hash = "sha256:e45d985aef903c5b7444d34350b05da91a9e0ea015415ab45a21212786c649d0"}, {file = "subprocess32-3.5.4.tar.gz", hash = "sha256:eb2937c80497978d181efa1b839ec2d9622cf9600a039a79d0e108d1f9aec79d"}, ] termcolor = [ @@ -1392,8 +1385,8 @@ tomlkit = [ {file = "tomlkit-0.7.0.tar.gz", hash = "sha256:ac57f29693fab3e309ea789252fcce3061e19110085aa31af5446ca749325618"}, ] tox = [ - {file = "tox-3.20.1-py2.py3-none-any.whl", hash = "sha256:42ce19ce5dc2f6d6b1fdc5666c476e1f1e2897359b47e0aa3a5b774f335d57c2"}, - {file = "tox-3.20.1.tar.gz", hash = "sha256:4321052bfe28f9d85082341ca8e233e3ea901fdd14dab8a5d3fbd810269fbaf6"}, + {file = "tox-3.20.0-py2.py3-none-any.whl", hash = "sha256:e6318f404aff16522ff5211c88cab82b39af121735a443674e4e2e65f4e4637b"}, + {file = "tox-3.20.0.tar.gz", hash = "sha256:eb629ddc60e8542fd4a1956b2462e3b8771d49f1ff630cecceacaa0fbfb7605a"}, ] typing = [ {file = "typing-3.7.4.3-py2-none-any.whl", hash = "sha256:283d868f5071ab9ad873e5e52268d611e851c870a2ba354193026f2dfb29d8b5"}, @@ -1409,8 +1402,8 @@ urllib3 = [ {file = "urllib3-1.25.10.tar.gz", hash = "sha256:91056c15fa70756691db97756772bb1eb9678fa585d9184f24534b100dc60f4a"}, ] virtualenv = [ - {file = "virtualenv-20.0.34-py2.py3-none-any.whl", hash = "sha256:4ecd607e7809bd7384039065639a8babc9fa562fe1b73b24095ce85b83d55fcf"}, - {file = "virtualenv-20.0.34.tar.gz", hash = "sha256:4bf0e2bf99d33b123a895a5a244f0d7adb2a92171c6bbb31c3e2db235624abf1"}, + {file = "virtualenv-20.0.31-py2.py3-none-any.whl", hash = "sha256:e0305af10299a7fb0d69393d8f04cb2965dda9351140d11ac8db4e5e3970451b"}, + {file = "virtualenv-20.0.31.tar.gz", hash = "sha256:43add625c53c596d38f971a465553f6318decc39d98512bc100fa1b1e839c8dc"}, ] wcwidth = [ {file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"}, From 6ed33c7fdbbd57e9d622bd081d5a41027b9d6b0b Mon Sep 17 00:00:00 2001 From: DustinMoriarty Date: Sat, 17 Oct 2020 19:11:01 -0500 Subject: [PATCH 09/18] Remove pythons before all if both are provided. --- poetry/console/commands/env/remove.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/poetry/console/commands/env/remove.py b/poetry/console/commands/env/remove.py index 9ab112e8570..050b5565756 100644 --- a/poetry/console/commands/env/remove.py +++ b/poetry/console/commands/env/remove.py @@ -23,14 +23,16 @@ class EnvRemoveCommand(Command): def handle(self): from poetry.utils.env import EnvManager - - manager = EnvManager(self.poetry) pythons = self.argument("python") all = self.option("all") - if all: - pythons = [x.path.name for x in manager.list()] - if not pythons: + if not (pythons or all): self.line("No virtualenv provided.") + + manager = EnvManager(self.poetry) for python in pythons: venv = manager.remove(python) self.line("Deleted virtualenv: {}".format(venv.path)) + if all: + for venv in manager.list(): + manager.remove_venv(venv.path) + self.line("Deleted virtualenv: {}".format(venv.path)) From d0b81ba153d766751d4ac2162cb971821b5bbee0 Mon Sep 17 00:00:00 2001 From: DustinMoriarty Date: Sat, 17 Oct 2020 19:40:49 -0500 Subject: [PATCH 10/18] Handle ambiguity for remove all and python version with more predictability. --- tests/console/commands/env/test_remove.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/console/commands/env/test_remove.py b/tests/console/commands/env/test_remove.py index f7615658e5d..922fdde7314 100644 --- a/tests/console/commands/env/test_remove.py +++ b/tests/console/commands/env/test_remove.py @@ -42,31 +42,31 @@ def test_remove_by_name(tester, venvs_in_cache_dirs, venv_name, venv_cache): def test_remove_all(tester, venvs_in_cache_dirs, venv_name, venv_cache): - expected = "" + expected = {""} tester.execute("--all") for name in venvs_in_cache_dirs: assert not (venv_cache / name).exists() - expected += "Deleted virtualenv: {}\n".format((venv_cache / name)) - assert expected == tester.io.fetch_output() + expected.add("Deleted virtualenv: {}".format((venv_cache / name))) + assert expected == set(tester.io.fetch_output().split("\n")) def test_remove_all_and_version(tester, venvs_in_cache_dirs, venv_name, venv_cache): - expected = "" + expected = {""} tester.execute("--all {}".format(venvs_in_cache_dirs[0])) for name in venvs_in_cache_dirs: assert not (venv_cache / name).exists() - expected += "Deleted virtualenv: {}\n".format((venv_cache / name)) - assert expected == tester.io.fetch_output() + expected.add("Deleted virtualenv: {}".format((venv_cache / name))) + assert expected == set(tester.io.fetch_output().split("\n")) def test_remove_multiple(tester, venvs_in_cache_dirs, venv_name, venv_cache): - expected = "" + expected = {""} removed_envs = venvs_in_cache_dirs[0:2] remaining_envs = venvs_in_cache_dirs[2:] tester.execute(" ".join(removed_envs)) for name in removed_envs: assert not (venv_cache / name).exists() - expected += "Deleted virtualenv: {}\n".format((venv_cache / name)) + expected.add("Deleted virtualenv: {}".format((venv_cache / name))) for name in remaining_envs: assert (venv_cache / name).exists() - assert expected == tester.io.fetch_output() + assert expected == set(tester.io.fetch_output().split("\n")) From a0c16c0346f1e37578c33d86678ede8a3942dd6b Mon Sep 17 00:00:00 2001 From: DustinMoriarty Date: Sat, 17 Oct 2020 20:01:42 -0500 Subject: [PATCH 11/18] Ran pre-commit. --- poetry/console/commands/env/remove.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/poetry/console/commands/env/remove.py b/poetry/console/commands/env/remove.py index 050b5565756..bdcadb971b7 100644 --- a/poetry/console/commands/env/remove.py +++ b/poetry/console/commands/env/remove.py @@ -18,11 +18,15 @@ class EnvRemoveCommand(Command): ) ] options = [ - option("all", description="Remove all managed virtual environments associated with the project."), + option( + "all", + description="Remove all managed virtual environments associated with the project.", + ), ] def handle(self): from poetry.utils.env import EnvManager + pythons = self.argument("python") all = self.option("all") if not (pythons or all): From bf578171aa8051bcd1d87eb5e5f60dd6b376f40c Mon Sep 17 00:00:00 2001 From: DustinMoriarty Date: Thu, 11 Mar 2021 22:34:20 -0600 Subject: [PATCH 12/18] Restored wording for description. --- docs/docs/pyproject.md | 4 ++-- poetry/console/commands/env/remove.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/pyproject.md b/docs/docs/pyproject.md index bdcc6e0bc49..58ff75a7238 100644 --- a/docs/docs/pyproject.md +++ b/docs/docs/pyproject.md @@ -253,10 +253,10 @@ poetry install --extras "mysql pgsql" poetry install -E mysql -E pgsql ``` -When installing or specifying Poetry-built packages, the extras defined in this section can be activated +When installing or specifying Poetry-built packages, the extras defined in this section can be activated as described in [PEP 508](https://www.python.org/dev/peps/pep-0508/#extras). -For example, when installing the package using `pip`, the dependencies required by +For example, when installing the package using `pip`, the dependencies required by the `databases` extra can be installed as shown below. ```bash diff --git a/poetry/console/commands/env/remove.py b/poetry/console/commands/env/remove.py index af1f7037961..d86df1413f5 100644 --- a/poetry/console/commands/env/remove.py +++ b/poetry/console/commands/env/remove.py @@ -7,7 +7,7 @@ class EnvRemoveCommand(Command): name = "env remove" - description = "Removes a specific virtualenv associated with the project." + description = "Remove specific virtual environments associated with the project." arguments = [ argument( From 9753d0cdaa318761ff9526b34a5d7285e87981bb Mon Sep 17 00:00:00 2001 From: DustinMoriarty Date: Thu, 11 Mar 2021 23:04:53 -0600 Subject: [PATCH 13/18] Updated python argument description. --- poetry/console/commands/env/remove.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/poetry/console/commands/env/remove.py b/poetry/console/commands/env/remove.py index d86df1413f5..2c825db8423 100644 --- a/poetry/console/commands/env/remove.py +++ b/poetry/console/commands/env/remove.py @@ -12,7 +12,8 @@ class EnvRemoveCommand(Command): arguments = [ argument( "python", - "The python executable(s) to remove the virtual environment for.", + "The python executables of the virtual environments which are to be " + "removed.", optional=True, multiple=True, ) From a53e7679d46bd2ec2ba3da51888f911929c79737 Mon Sep 17 00:00:00 2001 From: DustinMoriarty Date: Thu, 11 Mar 2021 23:06:44 -0600 Subject: [PATCH 14/18] Updated argument description --- poetry/console/commands/env/remove.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/poetry/console/commands/env/remove.py b/poetry/console/commands/env/remove.py index 2c825db8423..fd6c54000aa 100644 --- a/poetry/console/commands/env/remove.py +++ b/poetry/console/commands/env/remove.py @@ -12,8 +12,8 @@ class EnvRemoveCommand(Command): arguments = [ argument( "python", - "The python executables of the virtual environments which are to be " - "removed.", + "The python executables or names of the virtual environments which are to " + "be removed.", optional=True, multiple=True, ) From 0b93a55dabfa2adc30094764a76b216eb79a9b58 Mon Sep 17 00:00:00 2001 From: DustinMoriarty Date: Sun, 14 Nov 2021 17:21:08 -0600 Subject: [PATCH 15/18] Update poetry/console/commands/env/remove.py Co-authored-by: Bjorn Neergaard --- poetry/console/commands/env/remove.py | 1 + 1 file changed, 1 insertion(+) diff --git a/poetry/console/commands/env/remove.py b/poetry/console/commands/env/remove.py index fd6c54000aa..f3ca33abf8b 100644 --- a/poetry/console/commands/env/remove.py +++ b/poetry/console/commands/env/remove.py @@ -35,6 +35,7 @@ def handle(self) -> None: self.line("No virtualenv provided.") manager = EnvManager(self.poetry) + # TODO: refactor env.py to allow removal with one loop for python in pythons: venv = manager.remove(python) self.line("Deleted virtualenv: {}".format(venv.path)) From 5a2b7a3fbf58487d6bf06d096a73c50554179fa4 Mon Sep 17 00:00:00 2001 From: DustinMoriarty Date: Sun, 14 Nov 2021 17:23:50 -0600 Subject: [PATCH 16/18] Update docs/managing-environments.md Co-authored-by: Bjorn Neergaard --- docs/managing-environments.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/managing-environments.md b/docs/managing-environments.md index d654533d23f..7a4b21a6643 100644 --- a/docs/managing-environments.md +++ b/docs/managing-environments.md @@ -131,7 +131,7 @@ poetry env remove test-O3eWbxRl-py3.7 You can delete more than one environment at a time. ```bash -poetry env remove 3.6 3.7 3.8 +poetry env remove python3.6 python3.7 python3.8 ``` Use the `--all` option to delete all virtual environments at once. ```bash From 1b7ec9779d7210b53d818c476ff30aac26cf1eac Mon Sep 17 00:00:00 2001 From: DustinMoriarty Date: Sun, 14 Nov 2021 17:24:13 -0600 Subject: [PATCH 17/18] Update poetry/console/commands/env/remove.py Co-authored-by: Bjorn Neergaard --- poetry/console/commands/env/remove.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poetry/console/commands/env/remove.py b/poetry/console/commands/env/remove.py index f3ca33abf8b..2179fd4df7e 100644 --- a/poetry/console/commands/env/remove.py +++ b/poetry/console/commands/env/remove.py @@ -12,7 +12,7 @@ class EnvRemoveCommand(Command): arguments = [ argument( "python", - "The python executables or names of the virtual environments which are to " + "The python executables associated with, or names of the virtual environments which are to " "be removed.", optional=True, multiple=True, From eb9ea74e822671edb5b614ee5ec001a59c70b9a1 Mon Sep 17 00:00:00 2001 From: DustinMoriarty Date: Sun, 14 Nov 2021 17:24:53 -0600 Subject: [PATCH 18/18] Update poetry/console/commands/env/remove.py Co-authored-by: Bjorn Neergaard --- poetry/console/commands/env/remove.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poetry/console/commands/env/remove.py b/poetry/console/commands/env/remove.py index 2179fd4df7e..8b95ce486dd 100644 --- a/poetry/console/commands/env/remove.py +++ b/poetry/console/commands/env/remove.py @@ -7,7 +7,7 @@ class EnvRemoveCommand(Command): name = "env remove" - description = "Remove specific virtual environments associated with the project." + description = "Remove virtual environments associated with the project." arguments = [ argument(