1 |
commit: 626e1a9d049ff498d64160a487715e4324871f4b |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 30 15:49:38 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 30 15:50:07 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=626e1a9d |
7 |
|
8 |
dev-python/Babel: Remove old |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/Babel/Babel-2.8.1.ebuild | 36 ------ |
13 |
dev-python/Babel/Babel-2.9.0.ebuild | 37 ------ |
14 |
dev-python/Babel/Manifest | 2 - |
15 |
dev-python/Babel/files/Babel-2.8.0-py39.patch | 169 ------------------------- |
16 |
dev-python/Babel/files/Babel-2.9.0-pypy3.patch | 33 ----- |
17 |
5 files changed, 277 deletions(-) |
18 |
|
19 |
diff --git a/dev-python/Babel/Babel-2.8.1.ebuild b/dev-python/Babel/Babel-2.8.1.ebuild |
20 |
deleted file mode 100644 |
21 |
index 59a1c0b8d63..00000000000 |
22 |
--- a/dev-python/Babel/Babel-2.8.1.ebuild |
23 |
+++ /dev/null |
24 |
@@ -1,36 +0,0 @@ |
25 |
-# Copyright 1999-2021 Gentoo Authors |
26 |
-# Distributed under the terms of the GNU General Public License v2 |
27 |
- |
28 |
-EAPI=7 |
29 |
- |
30 |
-PYTHON_COMPAT=( pypy3 python3_{7..9} ) |
31 |
-PYTHON_REQ_USE="threads(+)" |
32 |
-DISTUTILS_USE_SETUPTOOLS=rdepend |
33 |
- |
34 |
-inherit distutils-r1 |
35 |
- |
36 |
-DESCRIPTION="Collection of tools for internationalizing Python applications" |
37 |
-HOMEPAGE="https://babel.pocoo.org/ https://pypi.org/project/Babel/" |
38 |
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
39 |
- |
40 |
-LICENSE="BSD" |
41 |
-SLOT="0" |
42 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" |
43 |
- |
44 |
-RDEPEND="dev-python/pytz[${PYTHON_USEDEP}] |
45 |
- dev-python/setuptools[${PYTHON_USEDEP}]" |
46 |
-DEPEND="${DEPEND} |
47 |
- test? ( dev-python/freezegun[${PYTHON_USEDEP}] )" |
48 |
- |
49 |
-distutils_enable_sphinx docs |
50 |
-distutils_enable_tests pytest |
51 |
- |
52 |
-PATCHES=( |
53 |
- "${FILESDIR}"/Babel-2.8.0-py39.patch |
54 |
- "${FILESDIR}"/Babel-2.9.0-pypy3.patch |
55 |
-) |
56 |
- |
57 |
-src_test() { |
58 |
- local -x TZ=UTC |
59 |
- distutils-r1_src_test |
60 |
-} |
61 |
|
62 |
diff --git a/dev-python/Babel/Babel-2.9.0.ebuild b/dev-python/Babel/Babel-2.9.0.ebuild |
63 |
deleted file mode 100644 |
64 |
index 55fd72ae890..00000000000 |
65 |
--- a/dev-python/Babel/Babel-2.9.0.ebuild |
66 |
+++ /dev/null |
67 |
@@ -1,37 +0,0 @@ |
68 |
-# Copyright 1999-2021 Gentoo Authors |
69 |
-# Distributed under the terms of the GNU General Public License v2 |
70 |
- |
71 |
-EAPI=7 |
72 |
- |
73 |
-PYTHON_COMPAT=( pypy3 python3_{7..9} ) |
74 |
-PYTHON_REQ_USE="threads(+)" |
75 |
-DISTUTILS_USE_SETUPTOOLS=rdepend |
76 |
- |
77 |
-inherit distutils-r1 |
78 |
- |
79 |
-DESCRIPTION="Collection of tools for internationalizing Python applications" |
80 |
-HOMEPAGE="https://babel.pocoo.org/ https://pypi.org/project/Babel/" |
81 |
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
82 |
- |
83 |
-LICENSE="BSD" |
84 |
-SLOT="0" |
85 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos" |
86 |
- |
87 |
-RDEPEND="dev-python/pytz[${PYTHON_USEDEP}] |
88 |
- $(python_gen_cond_dep ' |
89 |
- dev-python/backports-zoneinfo[${PYTHON_USEDEP}] |
90 |
- ' python3_{6..8} pypy3)" |
91 |
-DEPEND="${DEPEND} |
92 |
- test? ( dev-python/freezegun[${PYTHON_USEDEP}] )" |
93 |
- |
94 |
-distutils_enable_sphinx docs |
95 |
-distutils_enable_tests pytest |
96 |
- |
97 |
-PATCHES=( |
98 |
- "${FILESDIR}"/Babel-2.9.0-pypy3.patch |
99 |
-) |
100 |
- |
101 |
-src_test() { |
102 |
- local -x TZ=UTC |
103 |
- distutils-r1_src_test |
104 |
-} |
105 |
|
106 |
diff --git a/dev-python/Babel/Manifest b/dev-python/Babel/Manifest |
107 |
index 7fe56472581..e22fec96358 100644 |
108 |
--- a/dev-python/Babel/Manifest |
109 |
+++ b/dev-python/Babel/Manifest |
110 |
@@ -1,3 +1 @@ |
111 |
-DIST Babel-2.8.1.tar.gz 8471453 BLAKE2B bc2e66a3c1c77e5b190cdb3f53d149268b6f49adde3040cbe6a3dd8eb98f6caffb3988232e76083e606186a87b9ee6b2b5352de89b7bc43d4f72905f1f594127 SHA512 ed39ad01b873d40d0bc611739761d412ff442b2df3d4c2363ec24501547da678cb752f640a02470c8513073a76c468c27fc16248820c779ef7adbe14d0f07199 |
112 |
-DIST Babel-2.9.0.tar.gz 8682986 BLAKE2B 0e1e8fe647fdd27230ee9c97f0994772bd5877f262f9cd00eb450445c5780b278249f87d50f98c5ca3fa5eca287c6b4fc74c5e082c522c250d640912f0ebc581 SHA512 250d1a19741eb0d1bda9d6b862f2d4779b6c67f10b8e045f450a271a16587e30f26f35ccccfea8ca13bb519582d2ef83569fa4381d0590fb9b61bf3ebf67e5f6 |
113 |
DIST Babel-2.9.1.tar.gz 8683505 BLAKE2B e4c6fe7284f03cd9e3e712156d87a520a437316955679f765aa68ca941bf668c544c96598486f3dad1bbb1f1d9a0719ccd527f23a2b1fb0274e453bdba557bd7 SHA512 89a2ce18301b522907bb66ec5453cbcd4c6b2d494d6928c9c62dc07bd8b6983982db571a85e251a1ea413b6f76fbd515f65c67c9bccf5441c62d351a57f2f4d0 |
114 |
|
115 |
diff --git a/dev-python/Babel/files/Babel-2.8.0-py39.patch b/dev-python/Babel/files/Babel-2.8.0-py39.patch |
116 |
deleted file mode 100644 |
117 |
index efada9c1d08..00000000000 |
118 |
--- a/dev-python/Babel/files/Babel-2.8.0-py39.patch |
119 |
+++ /dev/null |
120 |
@@ -1,169 +0,0 @@ |
121 |
-From 167b71421f113e2210e4deefef5020402492e5be Mon Sep 17 00:00:00 2001 |
122 |
-From: Felix Schwarz <felix.schwarz@×××××××××××.eu> |
123 |
-Date: Tue, 5 May 2020 09:58:01 +0200 |
124 |
-Subject: [PATCH] stop using deprecated ElementTree methods "getchildren()" and |
125 |
- "getiterator()" |
126 |
- |
127 |
-Both methods were removed in Python 3.9 as mentioned in the release notes: |
128 |
- |
129 |
-> Methods getchildren() and getiterator() of classes ElementTree and Element in |
130 |
-> the ElementTree module have been removed. They were deprecated in Python 3.2. |
131 |
-> Use iter(x) or list(x) instead of x.getchildren() and x.iter() or |
132 |
-> list(x.iter()) instead of x.getiterator(). |
133 |
---- |
134 |
- scripts/import_cldr.py | 18 +++++++++--------- |
135 |
- 1 file changed, 9 insertions(+), 9 deletions(-) |
136 |
- |
137 |
-diff --git a/scripts/import_cldr.py b/scripts/import_cldr.py |
138 |
-index 8993b68e..2ed3af91 100755 |
139 |
---- a/scripts/import_cldr.py |
140 |
-+++ b/scripts/import_cldr.py |
141 |
-@@ -598,7 +598,7 @@ def parse_calendar_months(data, calendar): |
142 |
- for width in ctxt.findall('monthWidth'): |
143 |
- width_type = width.attrib['type'] |
144 |
- widths = ctxts.setdefault(width_type, {}) |
145 |
-- for elem in width.getiterator(): |
146 |
-+ for elem in width.iter(): |
147 |
- if elem.tag == 'month': |
148 |
- _import_type_text(widths, elem, int(elem.attrib['type'])) |
149 |
- elif elem.tag == 'alias': |
150 |
-@@ -616,7 +616,7 @@ def parse_calendar_days(data, calendar): |
151 |
- for width in ctxt.findall('dayWidth'): |
152 |
- width_type = width.attrib['type'] |
153 |
- widths = ctxts.setdefault(width_type, {}) |
154 |
-- for elem in width.getiterator(): |
155 |
-+ for elem in width.iter(): |
156 |
- if elem.tag == 'day': |
157 |
- _import_type_text(widths, elem, weekdays[elem.attrib['type']]) |
158 |
- elif elem.tag == 'alias': |
159 |
-@@ -634,7 +634,7 @@ def parse_calendar_quarters(data, calendar): |
160 |
- for width in ctxt.findall('quarterWidth'): |
161 |
- width_type = width.attrib['type'] |
162 |
- widths = ctxts.setdefault(width_type, {}) |
163 |
-- for elem in width.getiterator(): |
164 |
-+ for elem in width.iter(): |
165 |
- if elem.tag == 'quarter': |
166 |
- _import_type_text(widths, elem, int(elem.attrib['type'])) |
167 |
- elif elem.tag == 'alias': |
168 |
-@@ -649,7 +649,7 @@ def parse_calendar_eras(data, calendar): |
169 |
- for width in calendar.findall('eras/*'): |
170 |
- width_type = NAME_MAP[width.tag] |
171 |
- widths = eras.setdefault(width_type, {}) |
172 |
-- for elem in width.getiterator(): |
173 |
-+ for elem in width.iter(): |
174 |
- if elem.tag == 'era': |
175 |
- _import_type_text(widths, elem, type=int(elem.attrib.get('type'))) |
176 |
- elif elem.tag == 'alias': |
177 |
-@@ -676,7 +676,7 @@ def parse_calendar_periods(data, calendar): |
178 |
- def parse_calendar_date_formats(data, calendar): |
179 |
- date_formats = data.setdefault('date_formats', {}) |
180 |
- for format in calendar.findall('dateFormats'): |
181 |
-- for elem in format.getiterator(): |
182 |
-+ for elem in format.iter(): |
183 |
- if elem.tag == 'dateFormatLength': |
184 |
- type = elem.attrib.get('type') |
185 |
- if _should_skip_elem(elem, type, date_formats): |
186 |
-@@ -696,7 +696,7 @@ def parse_calendar_date_formats(data, calendar): |
187 |
- def parse_calendar_time_formats(data, calendar): |
188 |
- time_formats = data.setdefault('time_formats', {}) |
189 |
- for format in calendar.findall('timeFormats'): |
190 |
-- for elem in format.getiterator(): |
191 |
-+ for elem in format.iter(): |
192 |
- if elem.tag == 'timeFormatLength': |
193 |
- type = elem.attrib.get('type') |
194 |
- if _should_skip_elem(elem, type, time_formats): |
195 |
-@@ -717,7 +717,7 @@ def parse_calendar_datetime_skeletons(data, calendar): |
196 |
- datetime_formats = data.setdefault('datetime_formats', {}) |
197 |
- datetime_skeletons = data.setdefault('datetime_skeletons', {}) |
198 |
- for format in calendar.findall('dateTimeFormats'): |
199 |
-- for elem in format.getiterator(): |
200 |
-+ for elem in format.iter(): |
201 |
- if elem.tag == 'dateTimeFormatLength': |
202 |
- type = elem.attrib.get('type') |
203 |
- if _should_skip_elem(elem, type, datetime_formats): |
204 |
-@@ -880,7 +880,7 @@ def parse_interval_formats(data, tree): |
205 |
- interval_formats[None] = elem.text |
206 |
- elif elem.tag == "intervalFormatItem": |
207 |
- skel_data = interval_formats.setdefault(elem.attrib["id"], {}) |
208 |
-- for item_sub in elem.getchildren(): |
209 |
-+ for item_sub in elem: |
210 |
- if item_sub.tag == "greatestDifference": |
211 |
- skel_data[item_sub.attrib["id"]] = split_interval_pattern(item_sub.text) |
212 |
- else: |
213 |
-@@ -903,7 +903,7 @@ def parse_currency_formats(data, tree): |
214 |
- type = '%s:%s' % (type, curr_length_type) |
215 |
- if _should_skip_elem(elem, type, currency_formats): |
216 |
- continue |
217 |
-- for child in elem.getiterator(): |
218 |
-+ for child in elem.iter(): |
219 |
- if child.tag == 'alias': |
220 |
- currency_formats[type] = Alias( |
221 |
- _translate_alias(['currency_formats', elem.attrib['type']], |
222 |
-From 7bdaa28a55e8d8228d5434effa4b1473ab7b3669 Mon Sep 17 00:00:00 2001 |
223 |
-From: Felix Schwarz <felix.schwarz@×××××××××××.eu> |
224 |
-Date: Tue, 5 May 2020 08:05:56 +0000 |
225 |
-Subject: [PATCH] fix tests when using Python 3.9a6 |
226 |
- |
227 |
-In Python 3.9a6 integer values for future flags were changed to prevent |
228 |
-collision with compiler flags. We need to retrieve these at runtime so |
229 |
-the test suite works with Python <= 3.8 as well as Python 3.9. |
230 |
---- |
231 |
- tests/test_util.py | 17 ++++++++++++----- |
232 |
- 1 file changed, 12 insertions(+), 5 deletions(-) |
233 |
- |
234 |
-diff --git a/tests/test_util.py b/tests/test_util.py |
235 |
-index a6a4450c..b9343aaa 100644 |
236 |
---- a/tests/test_util.py |
237 |
-+++ b/tests/test_util.py |
238 |
-@@ -11,6 +11,7 @@ |
239 |
- # individuals. For the exact contribution history, see the revision |
240 |
- # history and logs, available at http://babel.edgewall.org/log/. |
241 |
- |
242 |
-+import __future__ |
243 |
- import unittest |
244 |
- |
245 |
- import pytest |
246 |
-@@ -20,6 +21,12 @@ |
247 |
- from babel.util import parse_future_flags |
248 |
- |
249 |
- |
250 |
-+class _FF: |
251 |
-+ division = __future__.division.compiler_flag |
252 |
-+ print_function = __future__.print_function.compiler_flag |
253 |
-+ with_statement = __future__.with_statement.compiler_flag |
254 |
-+ unicode_literals = __future__.unicode_literals.compiler_flag |
255 |
-+ |
256 |
- def test_distinct(): |
257 |
- assert list(util.distinct([1, 2, 1, 3, 4, 4])) == [1, 2, 3, 4] |
258 |
- assert list(util.distinct('foobar')) == ['f', 'o', 'b', 'a', 'r'] |
259 |
-@@ -70,25 +77,25 @@ def test_parse_encoding_non_ascii(): |
260 |
- from __future__ import print_function, |
261 |
- division, with_statement, |
262 |
- unicode_literals |
263 |
--''', 0x10000 | 0x2000 | 0x8000 | 0x20000), |
264 |
-+''', _FF.print_function | _FF.division | _FF.with_statement | _FF.unicode_literals), |
265 |
- (''' |
266 |
- from __future__ import print_function, division |
267 |
- print('hello') |
268 |
--''', 0x10000 | 0x2000), |
269 |
-+''', _FF.print_function | _FF.division), |
270 |
- (''' |
271 |
- from __future__ import print_function, division, unknown,,,,, |
272 |
- print 'hello' |
273 |
--''', 0x10000 | 0x2000), |
274 |
-+''', _FF.print_function | _FF.division), |
275 |
- (''' |
276 |
- from __future__ import ( |
277 |
- print_function, |
278 |
- division) |
279 |
--''', 0x10000 | 0x2000), |
280 |
-+''', _FF.print_function | _FF.division), |
281 |
- (''' |
282 |
- from __future__ import \\ |
283 |
- print_function, \\ |
284 |
- division |
285 |
--''', 0x10000 | 0x2000), |
286 |
-+''', _FF.print_function | _FF.division), |
287 |
- ]) |
288 |
- def test_parse_future(source, result): |
289 |
- fp = BytesIO(source.encode('latin-1')) |
290 |
|
291 |
diff --git a/dev-python/Babel/files/Babel-2.9.0-pypy3.patch b/dev-python/Babel/files/Babel-2.9.0-pypy3.patch |
292 |
deleted file mode 100644 |
293 |
index 45d50f5ff0b..00000000000 |
294 |
--- a/dev-python/Babel/files/Babel-2.9.0-pypy3.patch |
295 |
+++ /dev/null |
296 |
@@ -1,33 +0,0 @@ |
297 |
-From a291ee5da29fb9767ce8dc5f94e3fa19908f2596 Mon Sep 17 00:00:00 2001 |
298 |
-From: Keri Volans <keri.volans@×××××.com> |
299 |
-Date: Sun, 10 May 2020 18:43:58 +0100 |
300 |
-Subject: [PATCH] tests/test_dates.py: Fix broken test |
301 |
- |
302 |
-datetime was being incorrectly patched, so the unittest was failing |
303 |
- |
304 |
-Closes https://github.com/python-babel/babel/issues/675 |
305 |
---- |
306 |
- tests/test_dates.py | 3 +-- |
307 |
- 1 file changed, 1 insertion(+), 2 deletions(-) |
308 |
- |
309 |
-diff --git a/tests/test_dates.py b/tests/test_dates.py |
310 |
-index 5be0d16a..3cd70d3e 100644 |
311 |
---- a/tests/test_dates.py |
312 |
-+++ b/tests/test_dates.py |
313 |
-@@ -761,7 +761,6 @@ def test_zh_TW_format(): |
314 |
- |
315 |
- |
316 |
- def test_format_current_moment(monkeypatch): |
317 |
-- import datetime as datetime_module |
318 |
- frozen_instant = datetime.utcnow() |
319 |
- |
320 |
- class frozen_datetime(datetime): |
321 |
-@@ -771,7 +770,7 @@ def utcnow(cls): |
322 |
- return frozen_instant |
323 |
- |
324 |
- # Freeze time! Well, some of it anyway. |
325 |
-- monkeypatch.setattr(datetime_module, "datetime", frozen_datetime) |
326 |
-+ monkeypatch.setattr(dates, "datetime_", frozen_datetime) |
327 |
- assert dates.format_datetime(locale="en_US") == dates.format_datetime(frozen_instant, locale="en_US") |
328 |
- |
329 |
- |