diff --git a/poetry.lock b/poetry.lock index df3d6547bdb..8de70938b6c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -90,15 +90,15 @@ unicode-backport = ["unicodedata2"] [[package]] name = "cleo" -version = "1.0.0a5" +version = "2.0.0" description = "Cleo allows you to create beautiful and testable command-line interfaces." category = "main" optional = false python-versions = ">=3.7,<4.0" [package.dependencies] -crashtest = ">=0.3.1,<0.4.0" -pylev = ">=1.3.0,<2.0.0" +crashtest = ">=0.4.1,<0.5.0" +rapidfuzz = ">=2.2.0,<3.0.0" [[package]] name = "colorama" @@ -124,11 +124,11 @@ toml = ["tomli"] [[package]] name = "crashtest" -version = "0.3.1" +version = "0.4.1" description = "Manage Python errors with ease" category = "main" optional = false -python-versions = ">=3.6,<4.0" +python-versions = ">=3.7,<4.0" [[package]] name = "cryptography" @@ -587,14 +587,6 @@ category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -[[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" version = "3.0.9" @@ -734,6 +726,17 @@ category = "dev" optional = false python-versions = ">=3.6" +[[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" version = "2.28.1" @@ -952,7 +955,7 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools" [metadata] lock-version = "1.1" python-versions = "^3.7" -content-hash = "d81d2884ee157f8ecc240a6c1ae2c8c95dfb9a9a34272b7e5831d2a2a62a31b6" +content-hash = "c2607df5992f1075a9a0d1a067e8e935a32e65dac79f0a2445e0c619b08883c7" [metadata.files] attrs = [ @@ -1050,8 +1053,8 @@ charset-normalizer = [ {file = "charset_normalizer-2.1.1-py3-none-any.whl", hash = "sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f"}, ] cleo = [ - {file = "cleo-1.0.0a5-py3-none-any.whl", hash = "sha256:ff53056589300976e960f75afb792dfbfc9c78dcbb5a448e207a17b643826360"}, - {file = "cleo-1.0.0a5.tar.gz", hash = "sha256:097c9d0e0332fd53cc89fc11eb0a6ba0309e6a3933c08f7b38558555486925d3"}, + {file = "cleo-2.0.0-py3-none-any.whl", hash = "sha256:daad7ff76134ebe2c7bf74520b1bbd59e6e77026535b967efc5a15a0eaa2e19c"}, + {file = "cleo-2.0.0.tar.gz", hash = "sha256:fbc5cb141cbc31ea8ffd3d5cd67d3b183fa38aa5098fd37e39e9a953a232fda9"}, ] colorama = [ {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, @@ -1110,8 +1113,8 @@ coverage = [ {file = "coverage-6.5.0.tar.gz", hash = "sha256:f642e90754ee3e06b0e7e51bce3379590e76b7f76b708e1a71ff043f87025c84"}, ] crashtest = [ - {file = "crashtest-0.3.1-py3-none-any.whl", hash = "sha256:300f4b0825f57688b47b6d70c6a31de33512eb2fa1ac614f780939aa0cf91680"}, - {file = "crashtest-0.3.1.tar.gz", hash = "sha256:42ca7b6ce88b6c7433e2ce47ea884e91ec93104a4b754998be498a8e6c3d37dd"}, + {file = "crashtest-0.4.1-py3-none-any.whl", hash = "sha256:8d23eac5fa660409f57472e3851dab7ac18aba459a8d19cbbba86d3d5aecd2a5"}, + {file = "crashtest-0.4.1.tar.gz", hash = "sha256:80d7b1f316ebfbd429f648076d6275c877ba30ba48979de4191714a75266f0ce"}, ] cryptography = [ {file = "cryptography-38.0.1-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:10d1f29d6292fc95acb597bacefd5b9e812099d75a6469004fd38ba5471a977f"}, @@ -1424,10 +1427,6 @@ pycparser = [ {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, {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 = [ {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, @@ -1529,6 +1528,97 @@ PyYAML = [ {file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"}, {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 = [ {file = "requests-2.28.1-py3-none-any.whl", hash = "sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"}, {file = "requests-2.28.1.tar.gz", hash = "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"}, diff --git a/pyproject.toml b/pyproject.toml index ae9aba79c57..d0257a59230 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,8 +51,8 @@ poetry-core = "^1.3.2" poetry-plugin-export = "^1.2.0" "backports.cached-property" = { version = "^1.0.2", python = "<3.8" } cachecontrol = { version = "^0.12.9", extras = ["filecache"] } -cleo = "^1.0.0a5" -crashtest = "^0.3.0" +cleo = "^2.0.0" +crashtest = "^0.4.1" dulwich = "^0.20.46" filelock = "^3.8.0" html5lib = "^1.0" @@ -168,9 +168,6 @@ warn_unused_ignores = false [[tool.mypy.overrides]] module = [ 'cachecontrol.*', - 'cachy.*', - 'cleo.*', - 'crashtest.*', 'lockfile.*', 'pexpect.*', 'pkginfo.*', diff --git a/src/poetry/console/application.py b/src/poetry/console/application.py index 533233cadf3..7c60f99836d 100644 --- a/src/poetry/console/application.py +++ b/src/poetry/console/application.py @@ -6,13 +6,13 @@ from contextlib import suppress from importlib import import_module from typing import TYPE_CHECKING -from typing import Any from typing import cast 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.event_dispatcher import EventDispatcher -from cleo.exceptions import CleoException +from cleo.exceptions import CleoError from cleo.formatters.style import Style from cleo.io.null_io import NullIO @@ -24,7 +24,7 @@ if TYPE_CHECKING: from collections.abc import Callable - from cleo.events.console_command_event import ConsoleCommandEvent + from cleo.events.event import Event from cleo.io.inputs.argv_input import ArgvInput from cleo.io.inputs.definition import Definition from cleo.io.inputs.input import Input @@ -93,7 +93,7 @@ def _load() -> Command: ] -class Application(BaseApplication): # type: ignore[misc] +class Application(BaseApplication): def __init__(self) -> None: super().__init__("poetry", __version__) @@ -137,8 +137,8 @@ def poetry(self) -> Poetry: @property def command_loader(self) -> CommandLoader: - command_loader: CommandLoader | None = self._command_loader - assert command_loader is not None + command_loader = self._command_loader + assert isinstance(command_loader, CommandLoader) return command_loader def reset_poetry(self) -> None: @@ -194,7 +194,7 @@ def _configure_io(self, io: IO) -> None: # We need to check if the command being run # is the "run" command. definition = self.definition - with suppress(CleoException): + with suppress(CleoError): io.input.bind(definition) name = io.input.first_argument @@ -215,7 +215,7 @@ def _configure_io(self, io: IO) -> None: for shortcut in shortcuts: run_input.add_parameter_option("-" + shortcut.lstrip("-")) - with suppress(CleoException): + with suppress(CleoError): run_input.bind(definition) for option_name, value in input.options.items(): @@ -227,12 +227,13 @@ def _configure_io(self, io: IO) -> None: super()._configure_io(io) def register_command_loggers( - self, event: ConsoleCommandEvent, event_name: str, _: Any + self, event: Event, event_name: str, _: EventDispatcher ) -> None: from poetry.console.logging.filters import POETRY_FILTER from poetry.console.logging.io_formatter import IOFormatter from poetry.console.logging.io_handler import IOHandler + assert isinstance(event, ConsoleCommandEvent) command = event.command if not isinstance(command, Command): return @@ -277,12 +278,11 @@ def register_command_loggers( logger.setLevel(_level) - def configure_env( - self, event: ConsoleCommandEvent, event_name: str, _: Any - ) -> None: + def configure_env(self, event: Event, event_name: str, _: EventDispatcher) -> None: from poetry.console.commands.env_command import EnvCommand from poetry.console.commands.self.self_command import SelfCommand + assert isinstance(event, ConsoleCommandEvent) command = event.command if not isinstance(command, EnvCommand) or isinstance(command, SelfCommand): return @@ -305,10 +305,11 @@ def configure_env( @classmethod def configure_installer_for_event( - cls, event: ConsoleCommandEvent, event_name: str, _: Any + cls, event: Event, event_name: str, _: EventDispatcher ) -> None: from poetry.console.commands.installer_command import InstallerCommand + assert isinstance(event, ConsoleCommandEvent) command = event.command if not isinstance(command, InstallerCommand): return diff --git a/src/poetry/console/command_loader.py b/src/poetry/console/command_loader.py index a590552078b..74ae8bcd080 100644 --- a/src/poetry/console/command_loader.py +++ b/src/poetry/console/command_loader.py @@ -2,7 +2,7 @@ from typing import TYPE_CHECKING -from cleo.exceptions import LogicException +from cleo.exceptions import CleoLogicError from cleo.loaders.factory_command_loader import FactoryCommandLoader @@ -12,11 +12,11 @@ from cleo.commands.command import Command -class CommandLoader(FactoryCommandLoader): # type: ignore[misc] +class CommandLoader(FactoryCommandLoader): def register_factory( self, command_name: str, factory: Callable[[], Command] ) -> None: 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 diff --git a/src/poetry/console/commands/command.py b/src/poetry/console/commands/command.py index 4bc26ad567b..2aba4e6be24 100644 --- a/src/poetry/console/commands/command.py +++ b/src/poetry/console/commands/command.py @@ -4,7 +4,7 @@ from typing import Any from cleo.commands.command import Command as BaseCommand -from cleo.exceptions import ValueException +from cleo.exceptions import CleoValueError if TYPE_CHECKING: @@ -12,7 +12,7 @@ from poetry.poetry import Poetry -class Command(BaseCommand): # type: ignore[misc] +class Command(BaseCommand): loggers: list[str] = [] _poetry: Poetry | None = None @@ -28,7 +28,10 @@ def set_poetry(self, poetry: Poetry) -> None: self._poetry = poetry def get_application(self) -> Application: - application: Application = self.application + from poetry.console.application import Application + + application = self.application + assert isinstance(application, Application) return application def reset_poetry(self) -> None: @@ -37,5 +40,5 @@ def reset_poetry(self) -> None: def option(self, name: str, default: Any = None) -> Any: try: return super().option(name) - except ValueException: + except CleoValueError: return default diff --git a/src/poetry/console/commands/debug/info.py b/src/poetry/console/commands/debug/info.py index f90d8e794d3..d76c808cee9 100644 --- a/src/poetry/console/commands/debug/info.py +++ b/src/poetry/console/commands/debug/info.py @@ -22,7 +22,7 @@ def handle(self) -> int: ] ) ) - command = self.application.get("env info") + command = self.get_application().get("env info") exit_code: int = command.run(self.io) return exit_code diff --git a/src/poetry/console/commands/debug/resolve.py b/src/poetry/console/commands/debug/resolve.py index cd8bd3ed466..05cf4b15736 100644 --- a/src/poetry/console/commands/debug/resolve.py +++ b/src/poetry/console/commands/debug/resolve.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING + from cleo.helpers import argument from cleo.helpers import option from cleo.io.outputs.output import Verbosity @@ -8,6 +10,10 @@ from poetry.console.commands.show import ShowCommand +if TYPE_CHECKING: + from cleo.ui.table import Rows + + class DebugResolveCommand(InitCommand): name = "debug resolve" description = "Debugs dependency resolution." @@ -86,7 +92,7 @@ def handle(self) -> int: self.line("") if self.option("tree"): - show_command = self.application.find("show") + show_command = self.get_application().find("show") assert isinstance(show_command, ShowCommand) show_command.init_styles(self.io) @@ -103,7 +109,7 @@ def handle(self) -> int: table = self.table(style="compact") table.style.set_vertical_border_chars("", " ") - rows = [] + rows: Rows = [] if self.option("install"): env = EnvManager(self.poetry).get() diff --git a/src/poetry/console/commands/init.py b/src/poetry/console/commands/init.py index e34fa2a7d36..329afc4d374 100644 --- a/src/poetry/console/commands/init.py +++ b/src/poetry/console/commands/init.py @@ -176,7 +176,7 @@ def handle(self) -> int: 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 = """\ You can specify a package in the following forms: - A single name (requests): this will search for matches on PyPI @@ -190,7 +190,7 @@ def handle(self) -> int: """ help_displayed = False - if self.confirm(question, True): + if self.confirm(question_text, True): if self.io.is_interactive(): self.line(help_message) help_displayed = True @@ -206,10 +206,10 @@ def handle(self) -> int: self._determine_requirements(self.option("dev-dependency")) ) - question = ( + question_text = ( "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: self.line(help_message) @@ -338,8 +338,8 @@ def _determine_requirements( "Enter the version constraint to require " "(or leave blank to use the latest version):" ) - question.attempts = 3 - question.validator = lambda x: (x or "").strip() or False + question.set_max_attempts(3) + question.set_validator(lambda x: (x or "").strip() or None) package_constraint = self.ask(question) diff --git a/src/poetry/console/commands/show.py b/src/poetry/console/commands/show.py index 5f8e4f0db0f..3c92574bc32 100644 --- a/src/poetry/console/commands/show.py +++ b/src/poetry/console/commands/show.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from cleo.io.io import IO + from cleo.ui.table import Rows from packaging.utils import NormalizedName from poetry.core.packages.dependency import Dependency from poetry.core.packages.package import Package @@ -160,7 +161,7 @@ def _display_single_package_information( return 0 - rows = [ + rows: Rows = [ ["name", f" : {pkg.pretty_name}"], ["version", f" : {pkg.pretty_version}"], ["description", f" : {pkg.description}"], diff --git a/src/poetry/console/commands/source/show.py b/src/poetry/console/commands/source/show.py index 9643118c5e0..8a89a39a55c 100644 --- a/src/poetry/console/commands/source/show.py +++ b/src/poetry/console/commands/source/show.py @@ -1,10 +1,16 @@ from __future__ import annotations +from typing import TYPE_CHECKING + from cleo.helpers import argument from poetry.console.commands.command import Command +if TYPE_CHECKING: + from cleo.ui.table import Rows + + class SourceShowCommand(Command): name = "source show" description = "Show information about sources configured for the project." @@ -40,7 +46,7 @@ def handle(self) -> int: continue table = self.table(style="compact") - rows = [ + rows: Rows = [ ["name", f" : {source.name}"], ["url", f" : {source.url}"], [ diff --git a/src/poetry/console/exceptions.py b/src/poetry/console/exceptions.py index 09fa60ad81e..aadc8c17e7f 100644 --- a/src/poetry/console/exceptions.py +++ b/src/poetry/console/exceptions.py @@ -1,7 +1,7 @@ from __future__ import annotations -from cleo.exceptions import CleoSimpleException +from cleo.exceptions import CleoError -class PoetrySimpleConsoleException(CleoSimpleException): # type: ignore[misc] +class PoetryConsoleError(CleoError): pass diff --git a/src/poetry/console/io/inputs/run_argv_input.py b/src/poetry/console/io/inputs/run_argv_input.py index b27f19cab37..964d88c2c17 100644 --- a/src/poetry/console/io/inputs/run_argv_input.py +++ b/src/poetry/console/io/inputs/run_argv_input.py @@ -9,7 +9,7 @@ from cleo.io.inputs.definition import Definition -class RunArgvInput(ArgvInput): # type: ignore[misc] +class RunArgvInput(ArgvInput): def __init__( self, argv: list[str] | None = None, diff --git a/src/poetry/mixology/solutions/providers/python_requirement_solution_provider.py b/src/poetry/mixology/solutions/providers/python_requirement_solution_provider.py index dba0d58480e..b7d6e83bed2 100644 --- a/src/poetry/mixology/solutions/providers/python_requirement_solution_provider.py +++ b/src/poetry/mixology/solutions/providers/python_requirement_solution_provider.py @@ -6,17 +6,15 @@ from crashtest.contracts.has_solutions_for_exception import HasSolutionsForException +from poetry.puzzle.exceptions import SolverProblemError + if TYPE_CHECKING: 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: - from poetry.puzzle.exceptions import SolverProblemError - if not isinstance(exception, SolverProblemError): return False @@ -28,9 +26,10 @@ def can_solve(self, exception: Exception) -> bool: 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 ( PythonRequirementSolution, ) + assert isinstance(exception, SolverProblemError) return [PythonRequirementSolution(exception)] diff --git a/src/poetry/mixology/solutions/solutions/python_requirement_solution.py b/src/poetry/mixology/solutions/solutions/python_requirement_solution.py index 54e6c819107..b625e124610 100644 --- a/src/poetry/mixology/solutions/solutions/python_requirement_solution.py +++ b/src/poetry/mixology/solutions/solutions/python_requirement_solution.py @@ -10,7 +10,7 @@ from poetry.puzzle.exceptions import SolverProblemError -class PythonRequirementSolution(Solution): # type: ignore[misc] +class PythonRequirementSolution(Solution): def __init__(self, exception: SolverProblemError) -> None: from poetry.core.constraints.version import parse_constraint diff --git a/src/poetry/puzzle/provider.py b/src/poetry/puzzle/provider.py index 4d2e2d30b67..91e589b15af 100644 --- a/src/poetry/puzzle/provider.py +++ b/src/poetry/puzzle/provider.py @@ -59,7 +59,7 @@ logger = logging.getLogger(__name__) -class Indicator(ProgressIndicator): # type: ignore[misc] +class Indicator(ProgressIndicator): CONTEXT: str | None = None @staticmethod diff --git a/src/poetry/vcs/git/backend.py b/src/poetry/vcs/git/backend.py index 7b37d259690..786a9689b93 100644 --- a/src/poetry/vcs/git/backend.py +++ b/src/poetry/vcs/git/backend.py @@ -17,7 +17,7 @@ from dulwich.refs import ANNOTATED_TAG_SUFFIX from dulwich.repo import Repo -from poetry.console.exceptions import PoetrySimpleConsoleException +from poetry.console.exceptions import PoetryConsoleError from poetry.utils.authenticator import get_default_authenticator from poetry.utils.helpers import remove_directory @@ -223,7 +223,7 @@ def _clone_legacy(url: str, refspec: GitRefSpec, target: Path) -> Repo: try: SystemGit.clone(url, target) except CalledProcessError: - raise PoetrySimpleConsoleException( + raise PoetryConsoleError( f"Failed to clone {url}, check your git configuration and permissions" " for this repository." ) @@ -235,9 +235,7 @@ def _clone_legacy(url: str, refspec: GitRefSpec, target: Path) -> Repo: try: SystemGit.checkout(revision, target) except CalledProcessError: - raise PoetrySimpleConsoleException( - f"Failed to checkout {url} at '{revision}'" - ) + raise PoetryConsoleError(f"Failed to checkout {url} at '{revision}'") repo = Repo(str(target)) return repo @@ -264,7 +262,7 @@ def _clone(cls, url: str, refspec: GitRefSpec, target: Path) -> Repo: try: refspec.resolve(remote_refs=remote_refs) except KeyError: # branch / ref does not exist - raise PoetrySimpleConsoleException( + raise PoetryConsoleError( f"Failed to clone {url} at '{refspec.key}', verify ref exists on" " remote." ) @@ -313,7 +311,7 @@ def _clone(cls, url: str, refspec: GitRefSpec, target: Path) -> Repo: e, ) - raise PoetrySimpleConsoleException( + raise PoetryConsoleError( f"Failed to clone {url} at '{refspec.key}', verify ref exists on" " remote." ) diff --git a/tests/integration/test_utils_vcs_git.py b/tests/integration/test_utils_vcs_git.py index 1ca7ea0c843..5c399d5311b 100644 --- a/tests/integration/test_utils_vcs_git.py +++ b/tests/integration/test_utils_vcs_git.py @@ -16,7 +16,7 @@ from dulwich.repo import Repo from poetry.core.pyproject.toml import PyProjectTOML -from poetry.console.exceptions import PoetrySimpleConsoleException +from poetry.console.exceptions import PoetryConsoleError from poetry.utils.authenticator import Authenticator from poetry.vcs.git import Git from poetry.vcs.git.backend import GitRefSpec @@ -146,7 +146,7 @@ def test_git_clone_default_branch_head( def test_git_clone_fails_for_non_existent_branch(source_url: str): branch = uuid.uuid4().hex - with pytest.raises(PoetrySimpleConsoleException) as e: + with pytest.raises(PoetryConsoleError) as e: Git.clone(url=source_url, branch=branch) 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): def test_git_clone_fails_for_non_existent_revision(source_url: str): revision = sha1(uuid.uuid4().bytes).hexdigest() - with pytest.raises(PoetrySimpleConsoleException) as e: + with pytest.raises(PoetryConsoleError) as e: Git.clone(url=source_url, revision=revision) assert f"Failed to clone {source_url} at '{revision}'" in str(e.value)