commit:     ce3e7210621c23e458d74978b19d46e2b9a99690
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jul  1 07:26:56 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jul  1 08:43:37 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce3e7210

dev-python/jedi: Port 0.17.2-r1 to py3.10

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

 dev-python/jedi/jedi-0.17.2-r1.ebuild | 41 +++++++++++++++++------------------
 dev-python/jedi/jedi-0.18.0.ebuild    |  2 ++
 2 files changed, 22 insertions(+), 21 deletions(-)

diff --git a/dev-python/jedi/jedi-0.17.2-r1.ebuild 
b/dev-python/jedi/jedi-0.17.2-r1.ebuild
index 2008df3339a..7988373021e 100644
--- a/dev-python/jedi/jedi-0.17.2-r1.ebuild
+++ b/dev-python/jedi/jedi-0.17.2-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
 
 inherit distutils-r1
 
@@ -43,28 +43,27 @@ python_prepare_all() {
        sed -i "s:'docopt',:: ; s:'colorama',::" setup.py || die
        sed -i "s: --doctest-modules::" pytest.ini || die
 
-       # speed tests are fragile
-       rm test/test_speed.py || die
-
        # test_complete_expanduser relies on $HOME not being empty
-       touch "${HOME}"/somefile || die
+       > "${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
+}
 
-       # 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
+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
 
-       distutils-r1_python_prepare_all
+       )
+
+       # django and pytest tests are very version dependent
+       epytest ${deselect[@]/#/--deselect } -k "not django and not pytest"
 }

diff --git a/dev-python/jedi/jedi-0.18.0.ebuild 
b/dev-python/jedi/jedi-0.18.0.ebuild
index 65d918b4001..d2d0631a0fd 100644
--- a/dev-python/jedi/jedi-0.18.0.ebuild
+++ b/dev-python/jedi/jedi-0.18.0.ebuild
@@ -57,6 +57,8 @@ python_test() {
                # assume pristine virtualenv
                test/test_utils.py::TestSetupReadline::test_local_import
                test/test_inference/test_imports.py::test_os_issues
+               # fragile
+               test/test_speed.py
        )
        [[ ${EPYTHON} == python3.10 ]] && deselect+=(
                # new features increased the match count again

Reply via email to