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/parso/files/, dev-python/parso/
Date: Sat, 01 Jan 2022 01:29:53
Message-Id: 1641000581.a2ffa718ce7cd0747b8d2e7b2f1c91f919136540.mgorny@gentoo
1 commit: a2ffa718ce7cd0747b8d2e7b2f1c91f919136540
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 1 01:15:37 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 1 01:29:41 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2ffa718
7
8 dev-python/parso: Remove old
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/parso/Manifest | 1 -
13 dev-python/parso/files/parso-0.8.2-py310-2.patch | 57 ------------------------
14 dev-python/parso/files/parso-0.8.2-py310.patch | 29 ------------
15 dev-python/parso/parso-0.8.2.ebuild | 34 --------------
16 4 files changed, 121 deletions(-)
17
18 diff --git a/dev-python/parso/Manifest b/dev-python/parso/Manifest
19 index 1ff516e0eddc..91bdb40e9e69 100644
20 --- a/dev-python/parso/Manifest
21 +++ b/dev-python/parso/Manifest
22 @@ -1,3 +1,2 @@
23 DIST parso-0.7.1.tar.gz 399842 BLAKE2B 1e47c1dd6846d01aa5820d7cedc3eafcf12ea0d4a2e95fa3f54429633b1c12dc39a4abe237fa46eb629408006777bd1f512cf878025b55119568ac19729b8c19 SHA512 318969a7a941c4a0948e58643b07b6f5c446ea166b3a8e44a556f0677ec9a36d7dc8c6d37ca7bce3f8276ee3d7144e22fbaaeac90c738fb90f7e94a0cf8abf7d
24 -DIST parso-0.8.2.tar.gz 394419 BLAKE2B f4e86ae55140adc9bbfdd34a8044e7fdfbf9d318a6385ac5feedc07127061943c2d690581af144f158846e3bf6f82124046c7e625369a4055ab92a54f9210c49 SHA512 a90810ad89301d804d215392ed77593b015f13bc7ef8512302a8893b314a9e74c15e2aaa77157c8595a134d3481e8115f306f9628835271478837ec6f19e645f
25 DIST parso-0.8.3.tar.gz 397648 BLAKE2B 8942408e27198075c92ef51f7a191cc7781eb3a5110119b91fd95f86e13ebe2fbfee11022a2bfec794150f60b3af8c4d5f324cb011703cd581c17f92232ae5bf SHA512 7874460053662d40c2cfcf0015e330e1c8201eeb07682e2079a636db553a82dc25b70b14ad0f0c82fb817f655359d695101a17f616abf9a39f49c61ae5fd49b1
26
27 diff --git a/dev-python/parso/files/parso-0.8.2-py310-2.patch b/dev-python/parso/files/parso-0.8.2-py310-2.patch
28 deleted file mode 100644
29 index 7c6b1ad78286..000000000000
30 --- a/dev-python/parso/files/parso-0.8.2-py310-2.patch
31 +++ /dev/null
32 @@ -1,57 +0,0 @@
33 -From dc41958947770849c8b3b4d344db434e2c8548cc Mon Sep 17 00:00:00 2001
34 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
35 -Date: Thu, 5 Aug 2021 09:09:28 +0200
36 -Subject: [PATCH] Update expected exception line numbers for Python 3.10.0rc1
37 -
38 -It seems that upstream has fixed line numbers in some of the expections
39 -in Python 3.10.0rc1, so update the tests accordingly. This means that
40 -test_non_async_in_async() gets the correct line again,
41 -and test_default_except_error_postition() no longer suffers from
42 -the apparent off-by-one problem.
43 -
44 -This doesn't fix tests entirely with Python 3.10 but it's a step
45 -forward.
46 ----
47 - test/test_python_errors.py | 13 ++++++++-----
48 - 1 file changed, 8 insertions(+), 5 deletions(-)
49 -
50 -diff --git a/test/test_python_errors.py b/test/test_python_errors.py
51 -index cda9bd2..e847ebb 100644
52 ---- a/test/test_python_errors.py
53 -+++ b/test/test_python_errors.py
54 -@@ -57,10 +57,10 @@ def test_non_async_in_async():
55 - error, = errors
56 - actual = error.message
57 - assert actual in wanted
58 -- if sys.version_info[:2] < (3, 8):
59 -+ if sys.version_info[:2] not in ((3, 8), (3,9)):
60 - assert line_nr == error.start_pos[0]
61 - else:
62 -- assert line_nr == 0 # For whatever reason this is zero in Python 3.8+
63 -+ assert line_nr == 0 # For whatever reason this is zero in Python 3.8/3.9
64 -
65 -
66 - @pytest.mark.parametrize(
67 -@@ -140,13 +140,16 @@ def _get_actual_exception(code):
68 -
69 -
70 - def test_default_except_error_postition():
71 -- # For this error the position seemed to be one line off, but that doesn't
72 -- # really matter.
73 -+ # For this error the position seemed to be one line off in Python < 3.10,
74 -+ # but that doesn't really matter.
75 - code = 'try: pass\nexcept: pass\nexcept X: pass'
76 - wanted, line_nr = _get_actual_exception(code)
77 - error, = _get_error_list(code)
78 - assert error.message in wanted
79 -- assert line_nr != error.start_pos[0]
80 -+ if sys.version_info[:2] >= (3, 10):
81 -+ assert line_nr == error.start_pos[0]
82 -+ else:
83 -+ assert line_nr != error.start_pos[0]
84 - # I think this is the better position.
85 - assert error.start_pos[0] == 2
86 -
87 ---
88 -2.32.0
89 -
90
91 diff --git a/dev-python/parso/files/parso-0.8.2-py310.patch b/dev-python/parso/files/parso-0.8.2-py310.patch
92 deleted file mode 100644
93 index 2f3487dd2f61..000000000000
94 --- a/dev-python/parso/files/parso-0.8.2-py310.patch
95 +++ /dev/null
96 @@ -1,29 +0,0 @@
97 -From cbb61fb81955a8cdbb5cdeedc9bcfffa39a5f270 Mon Sep 17 00:00:00 2001
98 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@×××××××.cz>
99 -Date: Thu, 22 Apr 2021 21:04:49 +0200
100 -Subject: [PATCH] Relax a test regex to match new enum repr in Python 3.10.0a7+
101 - (#186)
102 -
103 -bpo-40066: Enum: adjust repr() to show only enum and member name (not value,
104 -nor angle brackets) and str() to show only member name.
105 -https://bugs.python.org/issue40066
106 ----
107 - test/test_pgen2.py | 2 +-
108 - 1 file changed, 1 insertion(+), 1 deletion(-)
109 -
110 -diff --git a/test/test_pgen2.py b/test/test_pgen2.py
111 -index 9b0dd34..85ccacf 100644
112 ---- a/test/test_pgen2.py
113 -+++ b/test/test_pgen2.py
114 -@@ -339,7 +339,7 @@ def test_left_recursion():
115 - @pytest.mark.parametrize(
116 - 'grammar, error_match', [
117 - ['foo: bar | baz\nbar: NAME\nbaz: NAME\n',
118 -- r"foo is ambiguous.*given a PythonTokenTypes\.NAME.*bar or baz"],
119 -+ r"foo is ambiguous.*given a (PythonTokenTypes\.)?NAME.*bar or baz"],
120 - ['''foo: bar | baz\nbar: 'x'\nbaz: "x"\n''',
121 - r"foo is ambiguous.*given a ReservedString\(x\).*bar or baz"],
122 - ['''foo: bar | 'x'\nbar: 'x'\n''',
123 ---
124 -2.32.0
125 -
126
127 diff --git a/dev-python/parso/parso-0.8.2.ebuild b/dev-python/parso/parso-0.8.2.ebuild
128 deleted file mode 100644
129 index 0d7b47040d48..000000000000
130 --- a/dev-python/parso/parso-0.8.2.ebuild
131 +++ /dev/null
132 @@ -1,34 +0,0 @@
133 -# Copyright 1999-2021 Gentoo Authors
134 -# Distributed under the terms of the GNU General Public License v2
135 -
136 -EAPI=8
137 -
138 -PYTHON_COMPAT=( python3_{8..10} pypy3 )
139 -
140 -inherit distutils-r1
141 -
142 -DESCRIPTION="a python parser that supports error recovery and round-trip parsing"
143 -HOMEPAGE="https://github.com/davidhalter/parso https://pypi.org/project/parso/"
144 -SRC_URI="https://github.com/davidhalter/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
145 -
146 -LICENSE="MIT"
147 -SLOT="0"
148 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ppc ppc64 ~riscv ~s390 sparc x86"
149 -
150 -distutils_enable_sphinx docs
151 -distutils_enable_tests pytest
152 -
153 -PATCHES=(
154 - "${FILESDIR}"/${P}-py310.patch
155 - "${FILESDIR}"/${P}-py310-2.patch
156 - "${FILESDIR}"/${P}-flaky-test.patch
157 -)
158 -
159 -python_test() {
160 - local deselect=()
161 - [[ ${EPYTHON} == python3.10 ]] && deselect+=(
162 - # py3.10 changed exception messages
163 - test/test_python_errors.py::test_python_exception_matches
164 - )
165 - epytest ${deselect[@]/#/--deselect }
166 -}