Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
14b7f1ee
Unverified
Commit
14b7f1ee
authored
Nov 22, 2022
by
David Hotham
Committed by
GitHub
Nov 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleo 2.0 (#7070)
parent
ba97fea0
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
180 additions
and
79 deletions
+180
-79
poetry.lock
+112
-22
pyproject.toml
+2
-5
src/poetry/console/application.py
+14
-13
src/poetry/console/command_loader.py
+3
-3
src/poetry/console/commands/command.py
+7
-4
src/poetry/console/commands/debug/info.py
+1
-1
src/poetry/console/commands/debug/resolve.py
+8
-2
src/poetry/console/commands/init.py
+6
-6
src/poetry/console/commands/show.py
+2
-1
src/poetry/console/commands/source/show.py
+7
-1
src/poetry/console/exceptions.py
+2
-2
src/poetry/console/io/inputs/run_argv_input.py
+1
-1
src/poetry/mixology/solutions/providers/python_requirement_solution_provider.py
+5
-6
src/poetry/mixology/solutions/solutions/python_requirement_solution.py
+1
-1
src/poetry/puzzle/provider.py
+1
-1
src/poetry/vcs/git/backend.py
+5
-7
tests/integration/test_utils_vcs_git.py
+3
-3
No files found.
poetry.lock
View file @
14b7f1ee
...
@@ -90,15 +90,15 @@ unicode-backport = ["unicodedata2"]
...
@@ -90,15 +90,15 @@ unicode-backport = ["unicodedata2"]
[[package]]
[[package]]
name = "cleo"
name = "cleo"
version = "
1.0.0a5
"
version = "
2.0.0
"
description = "Cleo allows you to create beautiful and testable command-line interfaces."
description = "Cleo allows you to create beautiful and testable command-line interfaces."
category = "main"
category = "main"
optional = false
optional = false
python-versions = ">=3.7,<4.0"
python-versions = ">=3.7,<4.0"
[package.dependencies]
[package.dependencies]
crashtest = ">=0.
3.1,<0.4
.0"
crashtest = ">=0.
4.1,<0.5
.0"
pylev = ">=1.3.0,<2
.0.0"
rapidfuzz = ">=2.2.0,<3
.0.0"
[[package]]
[[package]]
name = "colorama"
name = "colorama"
...
@@ -124,11 +124,11 @@ toml = ["tomli"]
...
@@ -124,11 +124,11 @@ toml = ["tomli"]
[[package]]
[[package]]
name = "crashtest"
name = "crashtest"
version = "0.
3
.1"
version = "0.
4
.1"
description = "Manage Python errors with ease"
description = "Manage Python errors with ease"
category = "main"
category = "main"
optional = false
optional = false
python-versions = ">=3.
6
,<4.0"
python-versions = ">=3.
7
,<4.0"
[[package]]
[[package]]
name = "cryptography"
name = "cryptography"
...
@@ -588,14 +588,6 @@ optional = false
...
@@ -588,14 +588,6 @@ optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
[[package]]
[[package]]
name = "pylev"
version = "1.4.0"
description = "A pure Python Levenshtein implementation that's not freaking GPL'd."
category = "main"
optional = false
python-versions = "*"
[[package]]
name = "pyparsing"
name = "pyparsing"
version = "3.0.9"
version = "3.0.9"
description = "pyparsing module - Classes and methods to define and execute parsing grammars"
description = "pyparsing module - Classes and methods to define and execute parsing grammars"
...
@@ -735,6 +727,17 @@ optional = false
...
@@ -735,6 +727,17 @@ optional = false
python-versions = ">=3.6"
python-versions = ">=3.6"
[[package]]
[[package]]
name = "rapidfuzz"
version = "2.13.2"
description = "rapid fuzzy string matching"
category = "main"
optional = false
python-versions = ">=3.7"
[package.extras]
full = ["numpy"]
[[package]]
name = "requests"
name = "requests"
version = "2.28.1"
version = "2.28.1"
description = "Python HTTP for Humans."
description = "Python HTTP for Humans."
...
@@ -952,7 +955,7 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools"
...
@@ -952,7 +955,7 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools"
[metadata]
[metadata]
lock-version = "1.1"
lock-version = "1.1"
python-versions = "^3.7"
python-versions = "^3.7"
content-hash = "
d81d2884ee157f8ecc240a6c1ae2c8c95dfb9a9a34272b7e5831d2a2a62a31b6
"
content-hash = "
c2607df5992f1075a9a0d1a067e8e935a32e65dac79f0a2445e0c619b08883c7
"
[metadata.files]
[metadata.files]
attrs = [
attrs = [
...
@@ -1050,8 +1053,8 @@ charset-normalizer = [
...
@@ -1050,8 +1053,8 @@ charset-normalizer = [
{file = "charset_normalizer-2.1.1-py3-none-any.whl", hash = "sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f"},
{file = "charset_normalizer-2.1.1-py3-none-any.whl", hash = "sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f"},
]
]
cleo = [
cleo = [
{file = "cleo-
1.0.0a5-py3-none-any.whl", hash = "sha256:ff53056589300976e960f75afb792dfbfc9c78dcbb5a448e207a17b643826360
"},
{file = "cleo-
2.0.0-py3-none-any.whl", hash = "sha256:daad7ff76134ebe2c7bf74520b1bbd59e6e77026535b967efc5a15a0eaa2e19c
"},
{file = "cleo-
1.0.0a5.tar.gz", hash = "sha256:097c9d0e0332fd53cc89fc11eb0a6ba0309e6a3933c08f7b38558555486925d3
"},
{file = "cleo-
2.0.0.tar.gz", hash = "sha256:fbc5cb141cbc31ea8ffd3d5cd67d3b183fa38aa5098fd37e39e9a953a232fda9
"},
]
]
colorama = [
colorama = [
{file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"},
{file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"},
...
@@ -1110,8 +1113,8 @@ coverage = [
...
@@ -1110,8 +1113,8 @@ coverage = [
{file = "coverage-6.5.0.tar.gz", hash = "sha256:f642e90754ee3e06b0e7e51bce3379590e76b7f76b708e1a71ff043f87025c84"},
{file = "coverage-6.5.0.tar.gz", hash = "sha256:f642e90754ee3e06b0e7e51bce3379590e76b7f76b708e1a71ff043f87025c84"},
]
]
crashtest = [
crashtest = [
{file = "crashtest-0.
3.1-py3-none-any.whl", hash = "sha256:300f4b0825f57688b47b6d70c6a31de33512eb2fa1ac614f780939aa0cf91680
"},
{file = "crashtest-0.
4.1-py3-none-any.whl", hash = "sha256:8d23eac5fa660409f57472e3851dab7ac18aba459a8d19cbbba86d3d5aecd2a5
"},
{file = "crashtest-0.
3.1.tar.gz", hash = "sha256:42ca7b6ce88b6c7433e2ce47ea884e91ec93104a4b754998be498a8e6c3d37dd
"},
{file = "crashtest-0.
4.1.tar.gz", hash = "sha256:80d7b1f316ebfbd429f648076d6275c877ba30ba48979de4191714a75266f0ce
"},
]
]
cryptography = [
cryptography = [
{file = "cryptography-38.0.1-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:10d1f29d6292fc95acb597bacefd5b9e812099d75a6469004fd38ba5471a977f"},
{file = "cryptography-38.0.1-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:10d1f29d6292fc95acb597bacefd5b9e812099d75a6469004fd38ba5471a977f"},
...
@@ -1424,10 +1427,6 @@ pycparser = [
...
@@ -1424,10 +1427,6 @@ pycparser = [
{file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"},
{file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"},
{file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"},
{file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"},
]
]
pylev = [
{file = "pylev-1.4.0-py2.py3-none-any.whl", hash = "sha256:7b2e2aa7b00e05bb3f7650eb506fc89f474f70493271a35c242d9a92188ad3dd"},
{file = "pylev-1.4.0.tar.gz", hash = "sha256:9e77e941042ad3a4cc305dcdf2b2dec1aec2fbe3dd9015d2698ad02b173006d1"},
]
pyparsing = [
pyparsing = [
{file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"},
{file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"},
{file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"},
{file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"},
...
@@ -1529,6 +1528,97 @@ PyYAML = [
...
@@ -1529,6 +1528,97 @@ PyYAML = [
{file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"},
{file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"},
{file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"},
{file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"},
]
]
rapidfuzz = [
{file = "rapidfuzz-2.13.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:91c049f7591d9e9f8bcc3c556c0c4b448223f564ad04511a8719d28f5d38daed"},
{file = "rapidfuzz-2.13.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:26e4b7f7941b92546a9b06ed75b40b5d7ceace8f3074d06cb3369349388d700d"},
{file = "rapidfuzz-2.13.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ba2a8fbd21079093118c40e8e80068750c1619a5988e54220ea0929de48e7d65"},
{file = "rapidfuzz-2.13.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:de707808f1997574014d9ba87c2d9f8a619688d615520e3dce958bf4398514c7"},
{file = "rapidfuzz-2.13.2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ba3f47a5b82de7304ae08e2a111ccc90a6ea06ecc3f25d7870d08be0973c94cb"},
{file = "rapidfuzz-2.13.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a181b6ef9b480b56b29bdc58dc50c198e93d33398d2f8e57da05cbddb095bd9e"},
{file = "rapidfuzz-2.13.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e1e569953a2abe945f116a6c22b71e8fc02d7c27068af2af40990115f25c93e4"},
{file = "rapidfuzz-2.13.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:026f6ecd8948e168a89fc015ef34b6bcb200f30ac33f1480554d722181b38bea"},
{file = "rapidfuzz-2.13.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:daf5e4f6b048c225a494c941a21463a0d397c39a080db8fece9b3136297ed240"},
{file = "rapidfuzz-2.13.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e39ae60598ed533f513db6d0370755685666024ab187a144fc688dd16cfa2d33"},
{file = "rapidfuzz-2.13.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:e8d71f1611431c445ced872b303cd61f215551a11df0c7171e5993bed84867d5"},
{file = "rapidfuzz-2.13.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:f5d07dca69bf5a9f1e1cd5756ded6c197a27e8d8f2d8a3d99565add37a3bd1ec"},
{file = "rapidfuzz-2.13.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ac95981911559c842e1e4532e2f89ca255531db1d87257e5e69cd8c0c0d585fc"},
{file = "rapidfuzz-2.13.2-cp310-cp310-win32.whl", hash = "sha256:b4162b96d0908cb0ca218513eab559e9a77c8a1d9705c9133813634d9db27f4f"},
{file = "rapidfuzz-2.13.2-cp310-cp310-win_amd64.whl", hash = "sha256:84fd3cfc1cb872019e60a3844b1deedb176de0b9ded11bf30147137ac65185f5"},
{file = "rapidfuzz-2.13.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:a599cc5cec196c0776faf65b74ac957354bd036f878905a16be9e20884870d02"},
{file = "rapidfuzz-2.13.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:dbad2b7dad98b854a468d2c6a0b11464f68ce841428aded2f24f201a17a144eb"},
{file = "rapidfuzz-2.13.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ad78fb90540dc752b532345065146371acd3804a917c31fdd8a337951da9def2"},
{file = "rapidfuzz-2.13.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed0f99e0037b7f9f7117493e8723851c9eece4629906b2d5da21d3ef124149a2"},
{file = "rapidfuzz-2.13.2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9abdffc590ef08d27dfd14d32e571f4a0f5f797f433f00c5faf4cf56ab62792a"},
{file = "rapidfuzz-2.13.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:352c920e166e838bc560014885ba979df656938fcc29a12c73ff06dc76b150d8"},
{file = "rapidfuzz-2.13.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c40acbadc965e72f1b44b3c665a59ec78a5e959757e52520bf73687c84ce6854"},
{file = "rapidfuzz-2.13.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6a4053d5b62cedec83ff67d55e50da35f7736bed0a3b2af51fa6143f5fef3785"},
{file = "rapidfuzz-2.13.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0c324d82871fe50471f7ba38a21c3e68167e868f541f57ac0ef23c053bbef6e6"},
{file = "rapidfuzz-2.13.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:cb4bd75518838b141dab8fe663de988c4d08502999068dc0b3949d43bd86ace6"},
{file = "rapidfuzz-2.13.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:4b785ffbc16795fca27c9e899993df7721d886249061689c48dbfe60fa7d02a1"},
{file = "rapidfuzz-2.13.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:1f363bf95d79dbafa8eac17697965e02e74da6f21b231b3fb808b2185bfed337"},
{file = "rapidfuzz-2.13.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:f7cfc25d8143a7570f5e4c9da072a1e1c335d81a6926eb10c1fd3f637fa3c022"},
{file = "rapidfuzz-2.13.2-cp311-cp311-win32.whl", hash = "sha256:580f32cda7f911fef8266c7d811e580c18734cd12308d099b9975b914f33fcaf"},
{file = "rapidfuzz-2.13.2-cp311-cp311-win_amd64.whl", hash = "sha256:98be3e873c8f9d90a982891b2b061521ba4e5e49552ba2d3c1b0806dd5677f88"},
{file = "rapidfuzz-2.13.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:de8ec700127b645b0e2e28e694a2bba6dcb6a305ef080ad312f3086d47fb6973"},
{file = "rapidfuzz-2.13.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0ec73e6d3ad9442cfb5b94c137cf4241fff2860d81a9ee8be8c3d987bb400c0"},
{file = "rapidfuzz-2.13.2-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:da5b7f35fc824cff36a2baa62486d5b427bf0fd7714c19704b5a7df82c2950b4"},
{file = "rapidfuzz-2.13.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0f186b3a32d78af7a805584a7e1c2fdf6f6fd62939936e4f3df869158c147a55"},
{file = "rapidfuzz-2.13.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:68f2e23eec59fc77bef164157889a2f7fb9800c47d615c58ee3809e2be3c8509"},
{file = "rapidfuzz-2.13.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4291a8c02d32aa6ebdffe63cf91abc2846383de95ae04a275f036c4e7a27f9ba"},
{file = "rapidfuzz-2.13.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:a2eeee09ff716c8ff75942c1b93f0bca129590499f1127cbeb1b5cefbdc0c3d5"},
{file = "rapidfuzz-2.13.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2345656b30d7e18d18a4df5b765e4059111860a69bf3a36608a7d625e92567e6"},
{file = "rapidfuzz-2.13.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:1e1dd1a328464dd2ae70f0e31ec403593fbb1b254bab7ac9f0cd08ba71c797d0"},
{file = "rapidfuzz-2.13.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:54fe1835f96c1033cdb7e4677497e784704c81d028c962d2222239ded93d978b"},
{file = "rapidfuzz-2.13.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:6b68b6a12411cfacca16ace22d42ae8e9946315d79f49c6c97089789c235e795"},
{file = "rapidfuzz-2.13.2-cp37-cp37m-win32.whl", hash = "sha256:9a740ddd3f7725c80e500f16b1b02b83a58b47164c0f3ddd9379208629c8c4b5"},
{file = "rapidfuzz-2.13.2-cp37-cp37m-win_amd64.whl", hash = "sha256:378554acdcf8370cc5c777b1312921a2a670f68888e999ea1305599c55b67f5d"},
{file = "rapidfuzz-2.13.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:aa96955f2878116239db55506fe825f574651a8893d07a83de7b3c76a2f0386e"},
{file = "rapidfuzz-2.13.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b4df886481ca27a6d53d30a73625fb86dd308cf7d6d99d32e0dfbfcc8e8a75b9"},
{file = "rapidfuzz-2.13.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:2c66f3b8e93cdc3063ffd7224cad84951834d9434ffd27fa3fabad2e942ddab7"},
{file = "rapidfuzz-2.13.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8d6d5ab0f12f2d7ae6aad77af67ae6253b6c1d54c320484f1acd2fce38b39ac2"},
{file = "rapidfuzz-2.13.2-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8f0574d5d97722cfaf51b7dd667c8c836fa9fdf5a7d8158a787b98ee2788f6c5"},
{file = "rapidfuzz-2.13.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:83ff31d33c1391a0a6b23273b7f839dc8f7b5fb75ddca59ce4f334b83ca822bb"},
{file = "rapidfuzz-2.13.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:94d8c65f48665f82064bea8a48ff185409a309ba396f5aec3a846831cbe36e6d"},
{file = "rapidfuzz-2.13.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5c065a83883af2a9a0303b6c06844a700af0db97ff6dc894324f656ad8efe405"},
{file = "rapidfuzz-2.13.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:773c60a5368a361253efea194552ff9ed6879756f6feb71b61b514723f8cb726"},
{file = "rapidfuzz-2.13.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:12ece1a4d024297afa4b76d2ce71c2c65fc7eaa487a9ae9f6e17c160253cfd23"},
{file = "rapidfuzz-2.13.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:2b491f2fac36718247070c3343f53aadbbe8684f3e0cf3b6cce1bd099e1d05cb"},
{file = "rapidfuzz-2.13.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:31370273787dca851e2df6f32f1ec8c61f86e9bbeb1cc42787020b6dfff952fd"},
{file = "rapidfuzz-2.13.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:47b5b227dc0bd53530dda55f344e1b24087fa99bb1bd7fceb6f5a2b1e2831ad4"},
{file = "rapidfuzz-2.13.2-cp38-cp38-win32.whl", hash = "sha256:8f09a16ae84b1decb9df9a7e393ec84a0b2a11da6356c3eedcf86da8cabe3071"},
{file = "rapidfuzz-2.13.2-cp38-cp38-win_amd64.whl", hash = "sha256:e038e187270cbb987cf7c5d4b574fce7a32bc3d9593e9346d129874a7dc08dc3"},
{file = "rapidfuzz-2.13.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:aee5dce78e157e503269121ad6f886acab4b1ab3e3956bcdf0549d54596eab57"},
{file = "rapidfuzz-2.13.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:80073e897af0669f496d23899583b5c2f0decc2ec06aa7c36a3b8fb16eda5e0e"},
{file = "rapidfuzz-2.13.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ce40c2a68fe28e05a4f66229c11885ef928086fbcd2eff086decdacfe5254da9"},
{file = "rapidfuzz-2.13.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd268701bf930bbb2d12f6f7f75c681e16fee646ea1663d258e825bf919ca7a1"},
{file = "rapidfuzz-2.13.2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f5d93e77881497f76e77056feea4c375732d27151151273d6e4cb8a1defbf17a"},
{file = "rapidfuzz-2.13.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b27c3e2b1789a635b9df1d74838ae032dc2dbc596ece5d89f9de2c37ba0a6dfe"},
{file = "rapidfuzz-2.13.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e49f412fe58c793af61b04fb5536534dfc95000b6c2bf0bfa42fcf7eb1453d42"},
{file = "rapidfuzz-2.13.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:27bbdee91718019e251d315c6e9b03aa5b7663b90e4228ac1ddb0a567ff3634b"},
{file = "rapidfuzz-2.13.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b51d45cb9ed81669206e338413ba224c06a8900ab0cc9106f4750ac73dc687bb"},
{file = "rapidfuzz-2.13.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:3479a2fd88504cc41eb707650e81fd7ce864f2418fee24f7224775b539536b39"},
{file = "rapidfuzz-2.13.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7adb4327453c1550f51d6ba13d718a84091f82230c1d0daca6db628e57d0fa5a"},
{file = "rapidfuzz-2.13.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:3a4e87aae287d757d9c5b045c819c985b02b38dea3f75630cc24d53826e640be"},
{file = "rapidfuzz-2.13.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:13e175b1643306558a3d7604789c4a8c217a64406fe82bf1a9e52efb5dea53ae"},
{file = "rapidfuzz-2.13.2-cp39-cp39-win32.whl", hash = "sha256:fb896fafa206db4d55f4412135c3ae28fbc56b8afc476970d0c5f29d2ce50948"},
{file = "rapidfuzz-2.13.2-cp39-cp39-win_amd64.whl", hash = "sha256:37a9a8f5737b8e429291148be67d2dd8ba779a69a87ad95d2785bb3d80fd1df7"},
{file = "rapidfuzz-2.13.2-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:d6cb51a8459e7160366c6c7b31e8f9a671f7d617591c0ad305f2697707061da2"},
{file = "rapidfuzz-2.13.2-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:343fe1fcbbf55c994b22962bfb46f6b6903faeac5a2671b2f0fa5e3664de3e66"},
{file = "rapidfuzz-2.13.2-pp37-pypy37_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8d9d081cd8e0110661c8a3e728d7b491a903bb54d34de40b17d19144563bd5f6"},
{file = "rapidfuzz-2.13.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3f93a6740fef239a8aca6521cc1891d448664115b53528a3dd7f95c1781a5fa6"},
{file = "rapidfuzz-2.13.2-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:deaf26cc23cfbf90650993108de888533635b981a7157a0234b4753527ac6e5c"},
{file = "rapidfuzz-2.13.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b6a0617ba60f81a8df3b9ddca09f591a0a0c8269402169825fcd50daa03e5c25"},
{file = "rapidfuzz-2.13.2-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6bee1065d55edfeabdb98211bb673cb44a8b118cded42d743f7d59c07b05a80d"},
{file = "rapidfuzz-2.13.2-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4e5afd5477332ceeb960e2002d5bb0b04ad00b40037a0ab1de9916041badcf00"},
{file = "rapidfuzz-2.13.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eead76c172ba08d49ea621016cf84031fff1ee33d7db751d7003e491e55e66af"},
{file = "rapidfuzz-2.13.2-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:83b1e8aca6c3fad058d8a2b7653b7496df0c4aca903d589bb0e4184868290767"},
{file = "rapidfuzz-2.13.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:41610c3a9be4febcbcac2b69b2f45d0da33e39d1194e5ffa3dd3a104d5a67a70"},
{file = "rapidfuzz-2.13.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3aacc4eb58d6bccf6ec571619bee35861d4103961b9873d9b0829d347ca8a63e"},
{file = "rapidfuzz-2.13.2-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:791d90aa1c68b5485f6340a8dc485aba7e9bcb729572449174ded0692e7e7ad0"},
{file = "rapidfuzz-2.13.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d4f94b408c9f9218d61e8af55e43c8102f813eea2cf82de10906b032ddcb9aa"},
{file = "rapidfuzz-2.13.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:ac6a8a34f858f3862798383f51012788df6be823e2874fa426667a4da94ded7e"},
{file = "rapidfuzz-2.13.2.tar.gz", hash = "sha256:1c67007161655c59e13bba130a2db29d7c9e5c81bcecb8846a3dd7386065eb24"},
]
requests = [
requests = [
{file = "requests-2.28.1-py3-none-any.whl", hash = "sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"},
{file = "requests-2.28.1-py3-none-any.whl", hash = "sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"},
{file = "requests-2.28.1.tar.gz", hash = "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"},
{file = "requests-2.28.1.tar.gz", hash = "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"},
...
...
pyproject.toml
View file @
14b7f1ee
...
@@ -51,8 +51,8 @@ poetry-core = "^1.3.2"
...
@@ -51,8 +51,8 @@ poetry-core = "^1.3.2"
poetry-plugin-export
=
"^1.2.0"
poetry-plugin-export
=
"^1.2.0"
"backports.cached-property"
=
{
version
=
"^1.0.2"
,
python
=
"<3.8"
}
"backports.cached-property"
=
{
version
=
"^1.0.2"
,
python
=
"<3.8"
}
cachecontrol
=
{
version
=
"^0.12.9"
,
extras
=
["filecache"]
}
cachecontrol
=
{
version
=
"^0.12.9"
,
extras
=
["filecache"]
}
cleo
=
"^
1.0.0a5
"
cleo
=
"^
2.0.0
"
crashtest
=
"^0.
3.0
"
crashtest
=
"^0.
4.1
"
dulwich
=
"^0.20.46"
dulwich
=
"^0.20.46"
filelock
=
"^3.8.0"
filelock
=
"^3.8.0"
html5lib
=
"^1.0"
html5lib
=
"^1.0"
...
@@ -168,9 +168,6 @@ warn_unused_ignores = false
...
@@ -168,9 +168,6 @@ warn_unused_ignores = false
[[tool.mypy.overrides]]
[[tool.mypy.overrides]]
module
=
[
module
=
[
'cachecontrol.*'
,
'cachecontrol.*'
,
'cachy.*'
,
'cleo.*'
,
'crashtest.*'
,
'lockfile.*'
,
'lockfile.*'
,
'pexpect.*'
,
'pexpect.*'
,
'pkginfo.*'
,
'pkginfo.*'
,
...
...
src/poetry/console/application.py
View file @
14b7f1ee
...
@@ -6,13 +6,13 @@ import re
...
@@ -6,13 +6,13 @@ import re
from
contextlib
import
suppress
from
contextlib
import
suppress
from
importlib
import
import_module
from
importlib
import
import_module
from
typing
import
TYPE_CHECKING
from
typing
import
TYPE_CHECKING
from
typing
import
Any
from
typing
import
cast
from
typing
import
cast
from
cleo.application
import
Application
as
BaseApplication
from
cleo.application
import
Application
as
BaseApplication
from
cleo.events.console_command_event
import
ConsoleCommandEvent
from
cleo.events.console_events
import
COMMAND
from
cleo.events.console_events
import
COMMAND
from
cleo.events.event_dispatcher
import
EventDispatcher
from
cleo.events.event_dispatcher
import
EventDispatcher
from
cleo.exceptions
import
CleoE
xception
from
cleo.exceptions
import
CleoE
rror
from
cleo.formatters.style
import
Style
from
cleo.formatters.style
import
Style
from
cleo.io.null_io
import
NullIO
from
cleo.io.null_io
import
NullIO
...
@@ -24,7 +24,7 @@ from poetry.console.commands.command import Command
...
@@ -24,7 +24,7 @@ from poetry.console.commands.command import Command
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
collections.abc
import
Callable
from
collections.abc
import
Callable
from
cleo.events.
console_command_event
import
ConsoleCommand
Event
from
cleo.events.
event
import
Event
from
cleo.io.inputs.argv_input
import
ArgvInput
from
cleo.io.inputs.argv_input
import
ArgvInput
from
cleo.io.inputs.definition
import
Definition
from
cleo.io.inputs.definition
import
Definition
from
cleo.io.inputs.input
import
Input
from
cleo.io.inputs.input
import
Input
...
@@ -93,7 +93,7 @@ COMMANDS = [
...
@@ -93,7 +93,7 @@ COMMANDS = [
]
]
class
Application
(
BaseApplication
):
# type: ignore[misc]
class
Application
(
BaseApplication
):
def
__init__
(
self
)
->
None
:
def
__init__
(
self
)
->
None
:
super
()
.
__init__
(
"poetry"
,
__version__
)
super
()
.
__init__
(
"poetry"
,
__version__
)
...
@@ -137,8 +137,8 @@ class Application(BaseApplication): # type: ignore[misc]
...
@@ -137,8 +137,8 @@ class Application(BaseApplication): # type: ignore[misc]
@property
@property
def
command_loader
(
self
)
->
CommandLoader
:
def
command_loader
(
self
)
->
CommandLoader
:
command_loader
:
CommandLoader
|
None
=
self
.
_command_loader
command_loader
=
self
.
_command_loader
assert
command_loader
is
not
None
assert
isinstance
(
command_loader
,
CommandLoader
)
return
command_loader
return
command_loader
def
reset_poetry
(
self
)
->
None
:
def
reset_poetry
(
self
)
->
None
:
...
@@ -194,7 +194,7 @@ class Application(BaseApplication): # type: ignore[misc]
...
@@ -194,7 +194,7 @@ class Application(BaseApplication): # type: ignore[misc]
# We need to check if the command being run
# We need to check if the command being run
# is the "run" command.
# is the "run" command.
definition
=
self
.
definition
definition
=
self
.
definition
with
suppress
(
CleoE
xception
):
with
suppress
(
CleoE
rror
):
io
.
input
.
bind
(
definition
)
io
.
input
.
bind
(
definition
)
name
=
io
.
input
.
first_argument
name
=
io
.
input
.
first_argument
...
@@ -215,7 +215,7 @@ class Application(BaseApplication): # type: ignore[misc]
...
@@ -215,7 +215,7 @@ class Application(BaseApplication): # type: ignore[misc]
for
shortcut
in
shortcuts
:
for
shortcut
in
shortcuts
:
run_input
.
add_parameter_option
(
"-"
+
shortcut
.
lstrip
(
"-"
))
run_input
.
add_parameter_option
(
"-"
+
shortcut
.
lstrip
(
"-"
))
with
suppress
(
CleoE
xception
):
with
suppress
(
CleoE
rror
):
run_input
.
bind
(
definition
)
run_input
.
bind
(
definition
)
for
option_name
,
value
in
input
.
options
.
items
():
for
option_name
,
value
in
input
.
options
.
items
():
...
@@ -227,12 +227,13 @@ class Application(BaseApplication): # type: ignore[misc]
...
@@ -227,12 +227,13 @@ class Application(BaseApplication): # type: ignore[misc]
super
()
.
_configure_io
(
io
)
super
()
.
_configure_io
(
io
)
def
register_command_loggers
(
def
register_command_loggers
(
self
,
event
:
ConsoleCommandEvent
,
event_name
:
str
,
_
:
Any
self
,
event
:
Event
,
event_name
:
str
,
_
:
EventDispatcher
)
->
None
:
)
->
None
:
from
poetry.console.logging.filters
import
POETRY_FILTER
from
poetry.console.logging.filters
import
POETRY_FILTER
from
poetry.console.logging.io_formatter
import
IOFormatter
from
poetry.console.logging.io_formatter
import
IOFormatter
from
poetry.console.logging.io_handler
import
IOHandler
from
poetry.console.logging.io_handler
import
IOHandler
assert
isinstance
(
event
,
ConsoleCommandEvent
)
command
=
event
.
command
command
=
event
.
command
if
not
isinstance
(
command
,
Command
):
if
not
isinstance
(
command
,
Command
):
return
return
...
@@ -277,12 +278,11 @@ class Application(BaseApplication): # type: ignore[misc]
...
@@ -277,12 +278,11 @@ class Application(BaseApplication): # type: ignore[misc]
logger
.
setLevel
(
_level
)
logger
.
setLevel
(
_level
)
def
configure_env
(
def
configure_env
(
self
,
event
:
Event
,
event_name
:
str
,
_
:
EventDispatcher
)
->
None
:
self
,
event
:
ConsoleCommandEvent
,
event_name
:
str
,
_
:
Any
)
->
None
:
from
poetry.console.commands.env_command
import
EnvCommand
from
poetry.console.commands.env_command
import
EnvCommand
from
poetry.console.commands.self.self_command
import
SelfCommand
from
poetry.console.commands.self.self_command
import
SelfCommand
assert
isinstance
(
event
,
ConsoleCommandEvent
)
command
=
event
.
command
command
=
event
.
command
if
not
isinstance
(
command
,
EnvCommand
)
or
isinstance
(
command
,
SelfCommand
):
if
not
isinstance
(
command
,
EnvCommand
)
or
isinstance
(
command
,
SelfCommand
):
return
return
...
@@ -305,10 +305,11 @@ class Application(BaseApplication): # type: ignore[misc]
...
@@ -305,10 +305,11 @@ class Application(BaseApplication): # type: ignore[misc]
@classmethod
@classmethod
def
configure_installer_for_event
(
def
configure_installer_for_event
(
cls
,
event
:
ConsoleCommandEvent
,
event_name
:
str
,
_
:
Any
cls
,
event
:
Event
,
event_name
:
str
,
_
:
EventDispatcher
)
->
None
:
)
->
None
:
from
poetry.console.commands.installer_command
import
InstallerCommand
from
poetry.console.commands.installer_command
import
InstallerCommand
assert
isinstance
(
event
,
ConsoleCommandEvent
)
command
=
event
.
command
command
=
event
.
command
if
not
isinstance
(
command
,
InstallerCommand
):
if
not
isinstance
(
command
,
InstallerCommand
):
return
return
...
...
src/poetry/console/command_loader.py
View file @
14b7f1ee
...
@@ -2,7 +2,7 @@ from __future__ import annotations
...
@@ -2,7 +2,7 @@ from __future__ import annotations
from
typing
import
TYPE_CHECKING
from
typing
import
TYPE_CHECKING
from
cleo.exceptions
import
LogicException
from
cleo.exceptions
import
CleoLogicError
from
cleo.loaders.factory_command_loader
import
FactoryCommandLoader
from
cleo.loaders.factory_command_loader
import
FactoryCommandLoader
...
@@ -12,11 +12,11 @@ if TYPE_CHECKING:
...
@@ -12,11 +12,11 @@ if TYPE_CHECKING:
from
cleo.commands.command
import
Command
from
cleo.commands.command
import
Command
class
CommandLoader
(
FactoryCommandLoader
):
# type: ignore[misc]
class
CommandLoader
(
FactoryCommandLoader
):
def
register_factory
(
def
register_factory
(
self
,
command_name
:
str
,
factory
:
Callable
[[],
Command
]
self
,
command_name
:
str
,
factory
:
Callable
[[],
Command
]
)
->
None
:
)
->
None
:
if
command_name
in
self
.
_factories
:
if
command_name
in
self
.
_factories
:
raise
LogicException
(
f
'The command "{command_name}" already exists.'
)
raise
CleoLogicError
(
f
'The command "{command_name}" already exists.'
)
self
.
_factories
[
command_name
]
=
factory
self
.
_factories
[
command_name
]
=
factory
src/poetry/console/commands/command.py
View file @
14b7f1ee
...
@@ -4,7 +4,7 @@ from typing import TYPE_CHECKING
...
@@ -4,7 +4,7 @@ from typing import TYPE_CHECKING
from
typing
import
Any
from
typing
import
Any
from
cleo.commands.command
import
Command
as
BaseCommand
from
cleo.commands.command
import
Command
as
BaseCommand
from
cleo.exceptions
import
ValueException
from
cleo.exceptions
import
CleoValueError
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
@@ -12,7 +12,7 @@ if TYPE_CHECKING:
...
@@ -12,7 +12,7 @@ if TYPE_CHECKING:
from
poetry.poetry
import
Poetry
from
poetry.poetry
import
Poetry
class
Command
(
BaseCommand
):
# type: ignore[misc]
class
Command
(
BaseCommand
):
loggers
:
list
[
str
]
=
[]
loggers
:
list
[
str
]
=
[]
_poetry
:
Poetry
|
None
=
None
_poetry
:
Poetry
|
None
=
None
...
@@ -28,7 +28,10 @@ class Command(BaseCommand): # type: ignore[misc]
...
@@ -28,7 +28,10 @@ class Command(BaseCommand): # type: ignore[misc]
self
.
_poetry
=
poetry
self
.
_poetry
=
poetry
def
get_application
(
self
)
->
Application
:
def
get_application
(
self
)
->
Application
:
application
:
Application
=
self
.
application
from
poetry.console.application
import
Application
application
=
self
.
application
assert
isinstance
(
application
,
Application
)
return
application
return
application
def
reset_poetry
(
self
)
->
None
:
def
reset_poetry
(
self
)
->
None
:
...
@@ -37,5 +40,5 @@ class Command(BaseCommand): # type: ignore[misc]
...
@@ -37,5 +40,5 @@ class Command(BaseCommand): # type: ignore[misc]
def
option
(
self
,
name
:
str
,
default
:
Any
=
None
)
->
Any
:
def
option
(
self
,
name
:
str
,
default
:
Any
=
None
)
->
Any
:
try
:
try
:
return
super
()
.
option
(
name
)
return
super
()
.
option
(
name
)
except
ValueException
:
except
CleoValueError
:
return
default
return
default
src/poetry/console/commands/debug/info.py
View file @
14b7f1ee
...
@@ -22,7 +22,7 @@ class DebugInfoCommand(Command):
...
@@ -22,7 +22,7 @@ class DebugInfoCommand(Command):
]
]
)
)
)
)
command
=
self
.
application
.
get
(
"env info"
)
command
=
self
.
get_application
()
.
get
(
"env info"
)
exit_code
:
int
=
command
.
run
(
self
.
io
)
exit_code
:
int
=
command
.
run
(
self
.
io
)
return
exit_code
return
exit_code
src/poetry/console/commands/debug/resolve.py
View file @
14b7f1ee
from
__future__
import
annotations
from
__future__
import
annotations
from
typing
import
TYPE_CHECKING
from
cleo.helpers
import
argument
from
cleo.helpers
import
argument
from
cleo.helpers
import
option
from
cleo.helpers
import
option
from
cleo.io.outputs.output
import
Verbosity
from
cleo.io.outputs.output
import
Verbosity
...
@@ -8,6 +10,10 @@ from poetry.console.commands.init import InitCommand
...
@@ -8,6 +10,10 @@ from poetry.console.commands.init import InitCommand
from
poetry.console.commands.show
import
ShowCommand
from
poetry.console.commands.show
import
ShowCommand
if
TYPE_CHECKING
:
from
cleo.ui.table
import
Rows
class
DebugResolveCommand
(
InitCommand
):
class
DebugResolveCommand
(
InitCommand
):
name
=
"debug resolve"
name
=
"debug resolve"
description
=
"Debugs dependency resolution."
description
=
"Debugs dependency resolution."
...
@@ -86,7 +92,7 @@ class DebugResolveCommand(InitCommand):
...
@@ -86,7 +92,7 @@ class DebugResolveCommand(InitCommand):
self
.
line
(
""
)
self
.
line
(
""
)
if
self
.
option
(
"tree"
):
if
self
.
option
(
"tree"
):
show_command
=
self
.
application
.
find
(
"show"
)
show_command
=
self
.
get_application
()
.
find
(
"show"
)
assert
isinstance
(
show_command
,
ShowCommand
)
assert
isinstance
(
show_command
,
ShowCommand
)
show_command
.
init_styles
(
self
.
io
)
show_command
.
init_styles
(
self
.
io
)
...
@@ -103,7 +109,7 @@ class DebugResolveCommand(InitCommand):
...
@@ -103,7 +109,7 @@ class DebugResolveCommand(InitCommand):
table
=
self
.
table
(
style
=
"compact"
)
table
=
self
.
table
(
style
=
"compact"
)
table
.
style
.
set_vertical_border_chars
(
""
,
" "
)
table
.
style
.
set_vertical_border_chars
(
""
,
" "
)
rows
=
[]
rows
:
Rows
=
[]
if
self
.
option
(
"install"
):
if
self
.
option
(
"install"
):
env
=
EnvManager
(
self
.
poetry
)
.
get
()
env
=
EnvManager
(
self
.
poetry
)
.
get
()
...
...
src/poetry/console/commands/init.py
View file @
14b7f1ee
...
@@ -176,7 +176,7 @@ The <c1>init</c1> command creates a basic <comment>pyproject.toml</> file in the
...
@@ -176,7 +176,7 @@ The <c1>init</c1> command creates a basic <comment>pyproject.toml</> file in the
self
.
_determine_requirements
(
self
.
option
(
"dependency"
))
self
.
_determine_requirements
(
self
.
option
(
"dependency"
))
)
)
question
=
"Would you like to define your main dependencies interactively?"
question
_text
=
"Would you like to define your main dependencies interactively?"
help_message
=
"""
\
help_message
=
"""
\
You can specify a package in the following forms:
You can specify a package in the following forms:
- A single name (<b>requests</b>): this will search for matches on PyPI
- A single name (<b>requests</b>): this will search for matches on PyPI
...
@@ -190,7 +190,7 @@ You can specify a package in the following forms:
...
@@ -190,7 +190,7 @@ You can specify a package in the following forms:
"""
"""
help_displayed
=
False
help_displayed
=
False
if
self
.
confirm
(
question
,
True
):
if
self
.
confirm
(
question
_text
,
True
):
if
self
.
io
.
is_interactive
():
if
self
.
io
.
is_interactive
():
self
.
line
(
help_message
)
self
.
line
(
help_message
)
help_displayed
=
True
help_displayed
=
True
...
@@ -206,10 +206,10 @@ You can specify a package in the following forms:
...
@@ -206,10 +206,10 @@ You can specify a package in the following forms:
self
.
_determine_requirements
(
self
.
option
(
"dev-dependency"
))
self
.
_determine_requirements
(
self
.
option
(
"dev-dependency"
))
)
)
question
=
(
question
_text
=
(
"Would you like to define your development dependencies interactively?"
"Would you like to define your development dependencies interactively?"
)
)
if
self
.
confirm
(
question
,
True
):
if
self
.
confirm
(
question
_text
,
True
):
if
self
.
io
.
is_interactive
()
and
not
help_displayed
:
if
self
.
io
.
is_interactive
()
and
not
help_displayed
:
self
.
line
(
help_message
)
self
.
line
(
help_message
)
...
@@ -338,8 +338,8 @@ You can specify a package in the following forms:
...
@@ -338,8 +338,8 @@ You can specify a package in the following forms:
"Enter the version constraint to require "
"Enter the version constraint to require "
"(or leave blank to use the latest version):"
"(or leave blank to use the latest version):"
)
)
question
.
attempts
=
3
question
.
set_max_attempts
(
3
)
question
.
validator
=
lambda
x
:
(
x
or
""
)
.
strip
()
or
False
question
.
set_validator
(
lambda
x
:
(
x
or
""
)
.
strip
()
or
None
)
package_constraint
=
self
.
ask
(
question
)
package_constraint
=
self
.
ask
(
question
)
...
...
src/poetry/console/commands/show.py
View file @
14b7f1ee
...
@@ -12,6 +12,7 @@ from poetry.console.commands.group_command import GroupCommand
...
@@ -12,6 +12,7 @@ from poetry.console.commands.group_command import GroupCommand
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
cleo.io.io
import
IO
from
cleo.io.io
import
IO
from
cleo.ui.table
import
Rows
from
packaging.utils
import
NormalizedName
from
packaging.utils
import
NormalizedName
from
poetry.core.packages.dependency
import
Dependency
from
poetry.core.packages.dependency
import
Dependency
from
poetry.core.packages.package
import
Package
from
poetry.core.packages.package
import
Package
...
@@ -160,7 +161,7 @@ lists all packages available."""
...
@@ -160,7 +161,7 @@ lists all packages available."""
return
0
return
0
rows
=
[
rows
:
Rows
=
[
[
"<info>name</>"
,
f
" : <c1>{pkg.pretty_name}</>"
],
[
"<info>name</>"
,
f
" : <c1>{pkg.pretty_name}</>"
],
[
"<info>version</>"
,
f
" : <b>{pkg.pretty_version}</b>"
],
[
"<info>version</>"
,
f
" : <b>{pkg.pretty_version}</b>"
],
[
"<info>description</>"
,
f
" : {pkg.description}"
],
[
"<info>description</>"
,
f
" : {pkg.description}"
],
...
...
src/poetry/console/commands/source/show.py
View file @
14b7f1ee
from
__future__
import
annotations
from
__future__
import
annotations
from
typing
import
TYPE_CHECKING
from
cleo.helpers
import
argument
from
cleo.helpers
import
argument
from
poetry.console.commands.command
import
Command
from
poetry.console.commands.command
import
Command
if
TYPE_CHECKING
:
from
cleo.ui.table
import
Rows
class
SourceShowCommand
(
Command
):
class
SourceShowCommand
(
Command
):
name
=
"source show"
name
=
"source show"
description
=
"Show information about sources configured for the project."
description
=
"Show information about sources configured for the project."
...
@@ -40,7 +46,7 @@ class SourceShowCommand(Command):
...
@@ -40,7 +46,7 @@ class SourceShowCommand(Command):
continue
continue
table
=
self
.
table
(
style
=
"compact"
)
table
=
self
.
table
(
style
=
"compact"
)
rows
=
[
rows
:
Rows
=
[
[
"<info>name</>"
,
f
" : <c1>{source.name}</>"
],
[
"<info>name</>"
,
f
" : <c1>{source.name}</>"
],
[
"<info>url</>"
,
f
" : {source.url}"
],
[
"<info>url</>"
,
f
" : {source.url}"
],
[
[
...
...
src/poetry/console/exceptions.py
View file @
14b7f1ee
from
__future__
import
annotations
from
__future__
import
annotations
from
cleo.exceptions
import
Cleo
SimpleException
from
cleo.exceptions
import
Cleo
Error
class
Poetry
SimpleConsoleException
(
CleoSimpleException
):
# type: ignore[misc]
class
Poetry
ConsoleError
(
CleoError
):
pass
pass
src/poetry/console/io/inputs/run_argv_input.py
View file @
14b7f1ee
...
@@ -9,7 +9,7 @@ if TYPE_CHECKING:
...
@@ -9,7 +9,7 @@ if TYPE_CHECKING:
from
cleo.io.inputs.definition
import
Definition
from
cleo.io.inputs.definition
import
Definition
class
RunArgvInput
(
ArgvInput
):
# type: ignore[misc]
class
RunArgvInput
(
ArgvInput
):
def
__init__
(
def
__init__
(
self
,
self
,
argv
:
list
[
str
]
|
None
=
None
,
argv
:
list
[
str
]
|
None
=
None
,
...
...
src/poetry/mixology/solutions/providers/python_requirement_solution_provider.py
View file @
14b7f1ee
...
@@ -6,17 +6,15 @@ from typing import TYPE_CHECKING
...
@@ -6,17 +6,15 @@ from typing import TYPE_CHECKING
from
crashtest.contracts.has_solutions_for_exception
import
HasSolutionsForException
from
crashtest.contracts.has_solutions_for_exception
import
HasSolutionsForException
from
poetry.puzzle.exceptions
import
SolverProblemError
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
crashtest.contracts.solution
import
Solution
from
crashtest.contracts.solution
import
Solution
from
poetry.puzzle.exceptions
import
SolverProblemError
class
PythonRequirementSolutionProvider
(
HasSolutionsForException
):
# type: ignore[misc]
class
PythonRequirementSolutionProvider
(
HasSolutionsForException
):
def
can_solve
(
self
,
exception
:
Exception
)
->
bool
:
def
can_solve
(
self
,
exception
:
Exception
)
->
bool
:
from
poetry.puzzle.exceptions
import
SolverProblemError
if
not
isinstance
(
exception
,
SolverProblemError
):
if
not
isinstance
(
exception
,
SolverProblemError
):
return
False
return
False
...
@@ -28,9 +26,10 @@ class PythonRequirementSolutionProvider(HasSolutionsForException): # type: igno
...
@@ -28,9 +26,10 @@ class PythonRequirementSolutionProvider(HasSolutionsForException): # type: igno
return
bool
(
m
)
return
bool
(
m
)
def
get_solutions
(
self
,
exception
:
SolverProblemError
)
->
list
[
Solution
]:
def
get_solutions
(
self
,
exception
:
Exception
)
->
list
[
Solution
]:
from
poetry.mixology.solutions.solutions.python_requirement_solution
import
(
from
poetry.mixology.solutions.solutions.python_requirement_solution
import
(
PythonRequirementSolution
,
PythonRequirementSolution
,
)
)
assert
isinstance
(
exception
,
SolverProblemError
)
return
[
PythonRequirementSolution
(
exception
)]
return
[
PythonRequirementSolution
(
exception
)]
src/poetry/mixology/solutions/solutions/python_requirement_solution.py
View file @
14b7f1ee
...
@@ -10,7 +10,7 @@ if TYPE_CHECKING:
...
@@ -10,7 +10,7 @@ if TYPE_CHECKING:
from
poetry.puzzle.exceptions
import
SolverProblemError
from
poetry.puzzle.exceptions
import
SolverProblemError
class
PythonRequirementSolution
(
Solution
):
# type: ignore[misc]
class
PythonRequirementSolution
(
Solution
):
def
__init__
(
self
,
exception
:
SolverProblemError
)
->
None
:
def
__init__
(
self
,
exception
:
SolverProblemError
)
->
None
:
from
poetry.core.constraints.version
import
parse_constraint
from
poetry.core.constraints.version
import
parse_constraint
...
...
src/poetry/puzzle/provider.py
View file @
14b7f1ee
...
@@ -59,7 +59,7 @@ if TYPE_CHECKING:
...
@@ -59,7 +59,7 @@ if TYPE_CHECKING:
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
class
Indicator
(
ProgressIndicator
):
# type: ignore[misc]
class
Indicator
(
ProgressIndicator
):
CONTEXT
:
str
|
None
=
None
CONTEXT
:
str
|
None
=
None
@staticmethod
@staticmethod
...
...
src/poetry/vcs/git/backend.py
View file @
14b7f1ee
...
@@ -17,7 +17,7 @@ from dulwich.errors import NotGitRepository
...
@@ -17,7 +17,7 @@ from dulwich.errors import NotGitRepository
from
dulwich.refs
import
ANNOTATED_TAG_SUFFIX
from
dulwich.refs
import
ANNOTATED_TAG_SUFFIX
from
dulwich.repo
import
Repo
from
dulwich.repo
import
Repo
from
poetry.console.exceptions
import
Poetry
SimpleConsoleException
from
poetry.console.exceptions
import
Poetry
ConsoleError
from
poetry.utils.authenticator
import
get_default_authenticator
from
poetry.utils.authenticator
import
get_default_authenticator
from
poetry.utils.helpers
import
remove_directory
from
poetry.utils.helpers
import
remove_directory
...
@@ -223,7 +223,7 @@ class Git:
...
@@ -223,7 +223,7 @@ class Git:
try
:
try
:
SystemGit
.
clone
(
url
,
target
)
SystemGit
.
clone
(
url
,
target
)
except
CalledProcessError
:
except
CalledProcessError
:
raise
Poetry
SimpleConsoleException
(
raise
Poetry
ConsoleError
(
f
"Failed to clone {url}, check your git configuration and permissions"
f
"Failed to clone {url}, check your git configuration and permissions"
" for this repository."
" for this repository."
)
)
...
@@ -235,9 +235,7 @@ class Git:
...
@@ -235,9 +235,7 @@ class Git:
try
:
try
:
SystemGit
.
checkout
(
revision
,
target
)
SystemGit
.
checkout
(
revision
,
target
)
except
CalledProcessError
:
except
CalledProcessError
:
raise
PoetrySimpleConsoleException
(
raise
PoetryConsoleError
(
f
"Failed to checkout {url} at '{revision}'"
)
f
"Failed to checkout {url} at '{revision}'"
)
repo
=
Repo
(
str
(
target
))
repo
=
Repo
(
str
(
target
))
return
repo
return
repo
...
@@ -264,7 +262,7 @@ class Git:
...
@@ -264,7 +262,7 @@ class Git:
try
:
try
:
refspec
.
resolve
(
remote_refs
=
remote_refs
)
refspec
.
resolve
(
remote_refs
=
remote_refs
)
except
KeyError
:
# branch / ref does not exist
except
KeyError
:
# branch / ref does not exist
raise
Poetry
SimpleConsoleException
(
raise
Poetry
ConsoleError
(
f
"Failed to clone {url} at '{refspec.key}', verify ref exists on"
f
"Failed to clone {url} at '{refspec.key}', verify ref exists on"
" remote."
" remote."
)
)
...
@@ -313,7 +311,7 @@ class Git:
...
@@ -313,7 +311,7 @@ class Git:
e
,
e
,
)
)
raise
Poetry
SimpleConsoleException
(
raise
Poetry
ConsoleError
(
f
"Failed to clone {url} at '{refspec.key}', verify ref exists on"
f
"Failed to clone {url} at '{refspec.key}', verify ref exists on"
" remote."
" remote."
)
)
...
...
tests/integration/test_utils_vcs_git.py
View file @
14b7f1ee
...
@@ -16,7 +16,7 @@ from dulwich.config import ConfigFile
...
@@ -16,7 +16,7 @@ from dulwich.config import ConfigFile
from
dulwich.repo
import
Repo
from
dulwich.repo
import
Repo
from
poetry.core.pyproject.toml
import
PyProjectTOML
from
poetry.core.pyproject.toml
import
PyProjectTOML
from
poetry.console.exceptions
import
Poetry
SimpleConsoleException
from
poetry.console.exceptions
import
Poetry
ConsoleError
from
poetry.utils.authenticator
import
Authenticator
from
poetry.utils.authenticator
import
Authenticator
from
poetry.vcs.git
import
Git
from
poetry.vcs.git
import
Git
from
poetry.vcs.git.backend
import
GitRefSpec
from
poetry.vcs.git.backend
import
GitRefSpec
...
@@ -146,7 +146,7 @@ def test_git_clone_default_branch_head(
...
@@ -146,7 +146,7 @@ def test_git_clone_default_branch_head(
def
test_git_clone_fails_for_non_existent_branch
(
source_url
:
str
):
def
test_git_clone_fails_for_non_existent_branch
(
source_url
:
str
):
branch
=
uuid
.
uuid4
()
.
hex
branch
=
uuid
.
uuid4
()
.
hex
with
pytest
.
raises
(
Poetry
SimpleConsoleException
)
as
e
:
with
pytest
.
raises
(
Poetry
ConsoleError
)
as
e
:
Git
.
clone
(
url
=
source_url
,
branch
=
branch
)
Git
.
clone
(
url
=
source_url
,
branch
=
branch
)
assert
f
"Failed to clone {source_url} at '{branch}'"
in
str
(
e
.
value
)
assert
f
"Failed to clone {source_url} at '{branch}'"
in
str
(
e
.
value
)
...
@@ -155,7 +155,7 @@ def test_git_clone_fails_for_non_existent_branch(source_url: str):
...
@@ -155,7 +155,7 @@ def test_git_clone_fails_for_non_existent_branch(source_url: str):
def
test_git_clone_fails_for_non_existent_revision
(
source_url
:
str
):
def
test_git_clone_fails_for_non_existent_revision
(
source_url
:
str
):
revision
=
sha1
(
uuid
.
uuid4
()
.
bytes
)
.
hexdigest
()
revision
=
sha1
(
uuid
.
uuid4
()
.
bytes
)
.
hexdigest
()
with
pytest
.
raises
(
Poetry
SimpleConsoleException
)
as
e
:
with
pytest
.
raises
(
Poetry
ConsoleError
)
as
e
:
Git
.
clone
(
url
=
source_url
,
revision
=
revision
)
Git
.
clone
(
url
=
source_url
,
revision
=
revision
)
assert
f
"Failed to clone {source_url} at '{revision}'"
in
str
(
e
.
value
)
assert
f
"Failed to clone {source_url} at '{revision}'"
in
str
(
e
.
value
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment