Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/jedi/
Date: Thu, 01 Jul 2021 08:43:44
Message-Id: 1625129017.ce3e7210621c23e458d74978b19d46e2b9a99690.mgorny@gentoo
1 commit: ce3e7210621c23e458d74978b19d46e2b9a99690
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 1 07:26:56 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 1 08:43:37 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce3e7210
7
8 dev-python/jedi: Port 0.17.2-r1 to py3.10
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/jedi/jedi-0.17.2-r1.ebuild | 41 +++++++++++++++++------------------
13 dev-python/jedi/jedi-0.18.0.ebuild | 2 ++
14 2 files changed, 22 insertions(+), 21 deletions(-)
15
16 diff --git a/dev-python/jedi/jedi-0.17.2-r1.ebuild b/dev-python/jedi/jedi-0.17.2-r1.ebuild
17 index 2008df3339a..7988373021e 100644
18 --- a/dev-python/jedi/jedi-0.17.2-r1.ebuild
19 +++ b/dev-python/jedi/jedi-0.17.2-r1.ebuild
20 @@ -3,7 +3,7 @@
21
22 EAPI=7
23
24 -PYTHON_COMPAT=( python3_{7..9} )
25 +PYTHON_COMPAT=( python3_{8..10} )
26
27 inherit distutils-r1
28
29 @@ -43,28 +43,27 @@ python_prepare_all() {
30 sed -i "s:'docopt',:: ; s:'colorama',::" setup.py || die
31 sed -i "s: --doctest-modules::" pytest.ini || die
32
33 - # speed tests are fragile
34 - rm test/test_speed.py || die
35 -
36 # test_complete_expanduser relies on $HOME not being empty
37 - touch "${HOME}"/somefile || die
38 + > "${HOME}"/somefile || die
39
40 - # TODO: investigate
41 - sed -e 's:test_local_import:_&:' \
42 - -i test/test_utils.py || die
43 - sed -e '/with sqlite3\.connect/,+2d' \
44 - -i test/completion/stdlib.py || die
45 - rm test/completion/django.py || die
46 + distutils-r1_python_prepare_all
47 +}
48
49 - # tests relying on pristine virtualenv
50 - # this relies on test* not matching anything else
51 - sed -e "/#\? \['test'\]/,+1d" \
52 - -i test/completion/on_import.py || die
53 - # this one's broken by 'path' module (dev-python/path-py)
54 - sed -e 's:test_os_issues:_&:' \
55 - -i test/test_inference/test_imports.py || die
56 - sed -e 's:test_venv_and_pths:_&:' \
57 - -i test/test_inference/test_sys_path.py || die
58 +python_test() {
59 + local deselect=(
60 + # TODO
61 + 'test/test_integration.py::test_completion[stdlib:155]'
62 + 'test/test_integration.py::test_completion[on_import:29]'
63 + # assume pristine virtualenv
64 + test/test_utils.py::TestSetupReadline::test_local_import
65 + test/test_inference/test_imports.py::test_os_issues
66 + )
67 + [[ ${EPYTHON} == python3.10 ]] && deselect+=(
68 + # new features increased the match count again
69 + test/test_utils.py::TestSetupReadline::test_import
70
71 - distutils-r1_python_prepare_all
72 + )
73 +
74 + # django and pytest tests are very version dependent
75 + epytest ${deselect[@]/#/--deselect } -k "not django and not pytest"
76 }
77
78 diff --git a/dev-python/jedi/jedi-0.18.0.ebuild b/dev-python/jedi/jedi-0.18.0.ebuild
79 index 65d918b4001..d2d0631a0fd 100644
80 --- a/dev-python/jedi/jedi-0.18.0.ebuild
81 +++ b/dev-python/jedi/jedi-0.18.0.ebuild
82 @@ -57,6 +57,8 @@ python_test() {
83 # assume pristine virtualenv
84 test/test_utils.py::TestSetupReadline::test_local_import
85 test/test_inference/test_imports.py::test_os_issues
86 + # fragile
87 + test/test_speed.py
88 )
89 [[ ${EPYTHON} == python3.10 ]] && deselect+=(
90 # new features increased the match count again