commit:     bc48731e6e0231e34b1933b82c6d1d3c6f43b4a3
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 30 12:10:15 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jun 30 12:21:15 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc48731e

dev-python/jedi: Port to py3.10

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/jedi/jedi-0.18.0.ebuild | 37 ++++++++++++++++++-------------------
 1 file changed, 18 insertions(+), 19 deletions(-)

diff --git a/dev-python/jedi/jedi-0.18.0.ebuild 
b/dev-python/jedi/jedi-0.18.0.ebuild
index 2c588b7dc47..65d918b4001 100644
--- a/dev-python/jedi/jedi-0.18.0.ebuild
+++ b/dev-python/jedi/jedi-0.18.0.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
 
 inherit distutils-r1
 
@@ -46,25 +46,24 @@ python_prepare_all() {
        # test_complete_expanduser relies on $HOME not being empty
        > "${HOME}"/somefile || die
 
-       # TODO: investigate
-       sed -e 's:test_local_import:_&:' \
-               -i test/test_utils.py || die
-       sed -e '/with sqlite3\.connect/,+2d' \
-               -i test/completion/stdlib.py || die
-       rm test/completion/django.py || die
+       distutils-r1_python_prepare_all
+}
 
-       # these tests fail with various pytest<->python version combinations
-       rm test/completion/pytest.py || die
+python_test() {
+       local deselect=(
+               # TODO
+               'test/test_integration.py::test_completion[stdlib:155]'
+               'test/test_integration.py::test_completion[on_import:29]'
+               # assume pristine virtualenv
+               test/test_utils.py::TestSetupReadline::test_local_import
+               test/test_inference/test_imports.py::test_os_issues
+       )
+       [[ ${EPYTHON} == python3.10 ]] && deselect+=(
+               # new features increased the match count again
+               test/test_utils.py::TestSetupReadline::test_import
 
-       # tests relying on pristine virtualenv
-       # this relies on test* not matching anything else
-       sed -e "/#\? \['test'\]/,+1d" \
-               -i test/completion/on_import.py || die
-       # this one's broken by 'path' module (dev-python/path-py)
-       sed -e 's:test_os_issues:_&:' \
-               -i test/test_inference/test_imports.py || die
-       sed -e 's:test_venv_and_pths:_&:' \
-               -i test/test_inference/test_sys_path.py || die
+       )
 
-       distutils-r1_python_prepare_all
+       # django and pytest tests are very version dependent
+       epytest ${deselect[@]/#/--deselect } -k "not django and not pytest"
 }

Reply via email to