1 |
commit: f400b9b53ce0dddb41adaad0c27c96a57c90bf49 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Oct 29 18:41:04 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Oct 29 20:25:13 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f400b9b5 |
7 |
|
8 |
dev-python/django: Backport gettext-0.21 compat fix |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/django/django-2.2.16.ebuild | 4 +-- |
13 |
dev-python/django/django-3.0.10-r1.ebuild | 4 +-- |
14 |
dev-python/django/django-3.1.1-r1.ebuild | 4 +-- |
15 |
dev-python/django/django-3.1.2-r1.ebuild | 4 +-- |
16 |
dev-python/django/files/django-gettext-0.21.patch | 39 +++++++++++++++++++++++ |
17 |
5 files changed, 47 insertions(+), 8 deletions(-) |
18 |
|
19 |
diff --git a/dev-python/django/django-2.2.16.ebuild b/dev-python/django/django-2.2.16.ebuild |
20 |
index a104153638a..a6fd5e608d0 100644 |
21 |
--- a/dev-python/django/django-2.2.16.ebuild |
22 |
+++ b/dev-python/django/django-2.2.16.ebuild |
23 |
@@ -30,7 +30,6 @@ RESTRICT="!test? ( test )" |
24 |
RDEPEND=" |
25 |
dev-python/pytz[${PYTHON_USEDEP}] |
26 |
>=dev-python/sqlparse-0.2.2[${PYTHON_USEDEP}]" |
27 |
-# gettext: https://code.djangoproject.com/ticket/31850 |
28 |
BDEPEND=" |
29 |
doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) |
30 |
test? ( |
31 |
@@ -43,11 +42,12 @@ BDEPEND=" |
32 |
dev-python/pyyaml[${PYTHON_USEDEP}] |
33 |
dev-python/selenium[${PYTHON_USEDEP}] |
34 |
dev-python/tblib[${PYTHON_USEDEP}] |
35 |
- <sys-devel/gettext-0.21 |
36 |
+ sys-devel/gettext |
37 |
)" |
38 |
|
39 |
PATCHES=( |
40 |
"${FILESDIR}"/${PN}-2.0.7-bashcomp.patch |
41 |
+ "${FILESDIR}"/django-gettext-0.21.patch |
42 |
) |
43 |
|
44 |
distutils_enable_sphinx docs --no-autodoc |
45 |
|
46 |
diff --git a/dev-python/django/django-3.0.10-r1.ebuild b/dev-python/django/django-3.0.10-r1.ebuild |
47 |
index 58de4970519..75ded0b622f 100644 |
48 |
--- a/dev-python/django/django-3.0.10-r1.ebuild |
49 |
+++ b/dev-python/django/django-3.0.10-r1.ebuild |
50 |
@@ -31,7 +31,6 @@ RDEPEND=" |
51 |
dev-python/asgiref[${PYTHON_USEDEP}] |
52 |
dev-python/pytz[${PYTHON_USEDEP}] |
53 |
>=dev-python/sqlparse-0.2.2[${PYTHON_USEDEP}]" |
54 |
-# gettext: https://code.djangoproject.com/ticket/31850 |
55 |
BDEPEND=" |
56 |
doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) |
57 |
test? ( |
58 |
@@ -44,11 +43,12 @@ BDEPEND=" |
59 |
dev-python/pyyaml[${PYTHON_USEDEP}] |
60 |
dev-python/selenium[${PYTHON_USEDEP}] |
61 |
dev-python/tblib[${PYTHON_USEDEP}] |
62 |
- <sys-devel/gettext-0.21 |
63 |
+ sys-devel/gettext |
64 |
)" |
65 |
|
66 |
PATCHES=( |
67 |
"${FILESDIR}"/${PN}-3.0.6-bashcomp.patch |
68 |
+ "${FILESDIR}"/django-gettext-0.21.patch |
69 |
) |
70 |
|
71 |
distutils_enable_sphinx docs --no-autodoc |
72 |
|
73 |
diff --git a/dev-python/django/django-3.1.1-r1.ebuild b/dev-python/django/django-3.1.1-r1.ebuild |
74 |
index 858be578907..2c544a79688 100644 |
75 |
--- a/dev-python/django/django-3.1.1-r1.ebuild |
76 |
+++ b/dev-python/django/django-3.1.1-r1.ebuild |
77 |
@@ -31,7 +31,6 @@ RDEPEND=" |
78 |
dev-python/asgiref[${PYTHON_USEDEP}] |
79 |
dev-python/pytz[${PYTHON_USEDEP}] |
80 |
>=dev-python/sqlparse-0.2.2[${PYTHON_USEDEP}]" |
81 |
-# gettext: https://code.djangoproject.com/ticket/31850 |
82 |
BDEPEND=" |
83 |
doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) |
84 |
test? ( |
85 |
@@ -44,11 +43,12 @@ BDEPEND=" |
86 |
dev-python/pyyaml[${PYTHON_USEDEP}] |
87 |
dev-python/selenium[${PYTHON_USEDEP}] |
88 |
dev-python/tblib[${PYTHON_USEDEP}] |
89 |
- <sys-devel/gettext-0.21 |
90 |
+ sys-devel/gettext |
91 |
)" |
92 |
|
93 |
PATCHES=( |
94 |
"${FILESDIR}"/${PN}-3.1-bashcomp.patch |
95 |
+ "${FILESDIR}"/django-gettext-0.21.patch |
96 |
) |
97 |
|
98 |
distutils_enable_sphinx docs --no-autodoc |
99 |
|
100 |
diff --git a/dev-python/django/django-3.1.2-r1.ebuild b/dev-python/django/django-3.1.2-r1.ebuild |
101 |
index 858be578907..2c544a79688 100644 |
102 |
--- a/dev-python/django/django-3.1.2-r1.ebuild |
103 |
+++ b/dev-python/django/django-3.1.2-r1.ebuild |
104 |
@@ -31,7 +31,6 @@ RDEPEND=" |
105 |
dev-python/asgiref[${PYTHON_USEDEP}] |
106 |
dev-python/pytz[${PYTHON_USEDEP}] |
107 |
>=dev-python/sqlparse-0.2.2[${PYTHON_USEDEP}]" |
108 |
-# gettext: https://code.djangoproject.com/ticket/31850 |
109 |
BDEPEND=" |
110 |
doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) |
111 |
test? ( |
112 |
@@ -44,11 +43,12 @@ BDEPEND=" |
113 |
dev-python/pyyaml[${PYTHON_USEDEP}] |
114 |
dev-python/selenium[${PYTHON_USEDEP}] |
115 |
dev-python/tblib[${PYTHON_USEDEP}] |
116 |
- <sys-devel/gettext-0.21 |
117 |
+ sys-devel/gettext |
118 |
)" |
119 |
|
120 |
PATCHES=( |
121 |
"${FILESDIR}"/${PN}-3.1-bashcomp.patch |
122 |
+ "${FILESDIR}"/django-gettext-0.21.patch |
123 |
) |
124 |
|
125 |
distutils_enable_sphinx docs --no-autodoc |
126 |
|
127 |
diff --git a/dev-python/django/files/django-gettext-0.21.patch b/dev-python/django/files/django-gettext-0.21.patch |
128 |
new file mode 100644 |
129 |
index 00000000000..5d3edfea4a1 |
130 |
--- /dev/null |
131 |
+++ b/dev-python/django/files/django-gettext-0.21.patch |
132 |
@@ -0,0 +1,39 @@ |
133 |
+From 07a30f561661efae1691ff45d10ec6014b395b58 Mon Sep 17 00:00:00 2001 |
134 |
+From: Max Smolens <msmolens@×××××.com> |
135 |
+Date: Tue, 6 Oct 2020 17:58:52 -0400 |
136 |
+Subject: [PATCH] Fixed #31850 -- Fixed |
137 |
+ BasicExtractorTests.test_extraction_warning with xgettext 0.21+. |
138 |
+ |
139 |
+"format string with unnamed arguments cannot be properly localized" |
140 |
+warning is not raised in xgettext 0.21+. |
141 |
+ |
142 |
+This patch uses a message that causes an xgettext warning regardless of |
143 |
+the version. |
144 |
+--- |
145 |
+ AUTHORS | 1 + |
146 |
+ tests/i18n/commands/code.sample | 4 ++-- |
147 |
+ 2 files changed, 3 insertions(+), 2 deletions(-) |
148 |
+ |
149 |
+diff --git a/AUTHORS b/AUTHORS |
150 |
+index b10852f407a4..9253740857de 100644 |
151 |
+--- a/AUTHORS |
152 |
++++ b/AUTHORS |
153 |
+@@ -622,6 +622,7 @@ answer newbie questions, and generally made Django that much better: |
154 |
+ mattycakes@×××××.com |
155 |
+ Max Burstein <http://maxburstein.com> |
156 |
+ Max Derkachev <mderk@××××××.ru> |
157 |
++ Max Smolens <msmolens@×××××.com> |
158 |
+ Maxime Lorant <maxime.lorant@×××××.com> |
159 |
+ Maxime Turcotte <maxocub@××××××.net> |
160 |
+ Maximilian Merz <django@××××××.de> |
161 |
+diff --git a/tests/i18n/commands/code.sample b/tests/i18n/commands/code.sample |
162 |
+index a5f1520ecba5..2c305a3a1dcf 100644 |
163 |
+--- a/tests/i18n/commands/code.sample |
164 |
++++ b/tests/i18n/commands/code.sample |
165 |
+@@ -1,4 +1,4 @@ |
166 |
+ from django.utils.translation import gettext |
167 |
+ |
168 |
+-# This will generate an xgettext warning |
169 |
+-my_string = gettext("This string contain two placeholders: %s and %s" % ('a', 'b')) |
170 |
++# This will generate an xgettext "Empty msgid" warning. |
171 |
++my_string = gettext('') |