Source: python-django-babel
Version: 0.6.2-3
Severity: normal

Attached.



-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 
'unstable'), (500, 'testing'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.2.0-3-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_CRAP
Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8), 
LANGUAGE=pt_BR:pt:en (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
From 1e5c0b38c9d38beb1650293d95e362bd1dbcc566 Mon Sep 17 00:00:00 2001
From: Antonio Terceiro <terce...@debian.org>
Date: Wed, 23 Oct 2019 22:21:03 -0300
Subject: [PATCH] Add patch to fix string extraction with Django 2

---
 debian/changelog                     | 11 ++++++++--
 debian/patches/Fix-For-Django2.patch | 31 ++++++++++++++++++++++++++++
 debian/patches/series                |  1 +
 3 files changed, 41 insertions(+), 2 deletions(-)
 create mode 100644 debian/patches/Fix-For-Django2.patch
 create mode 100644 debian/patches/series

diff --git a/debian/changelog b/debian/changelog
index f3753ae..0d18b78 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,16 @@
-python-django-babel (0.6.2-4) UNRELEASED; urgency=medium
+python-django-babel (0.6.2-4) unstable; urgency=medium
 
+  * Team upload
+
+  [ Ondřej Nový ]
   * Use debhelper-compat instead of debian/compat.
   * Bump Standards-Version to 4.4.1.
 
- -- Ondřej Nový <on...@debian.org>  Thu, 18 Jul 2019 18:26:42 +0200
+  [ Antonio Terceiro ]
+  * debian/patches/Fix-For-Django2.patch: Add patch to fix string extraction
+    with Django 2
+
+ -- Antonio Terceiro <terce...@debian.org>  Thu, 24 Oct 2019 07:57:39 -0300
 
 python-django-babel (0.6.2-3) unstable; urgency=medium
 
diff --git a/debian/patches/Fix-For-Django2.patch b/debian/patches/Fix-For-Django2.patch
new file mode 100644
index 0000000..50d8960
--- /dev/null
+++ b/debian/patches/Fix-For-Django2.patch
@@ -0,0 +1,31 @@
+From bf11befdec13efd49ee27a92029199d264e29973 Mon Sep 17 00:00:00 2001
+From: Ivan Tsouvarev <tsouva...@gmail.com>
+Date: Fri, 7 Sep 2018 19:24:14 +0300
+Subject: [PATCH 1/2] Fix imports of token types for Django 2.1
+
+Source: https://github.com/python-babel/django-babel/pull/45
+
+---
+ django_babel/extract.py | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/django_babel/extract.py b/django_babel/extract.py
+index edb42c7..6748bae 100644
+--- a/django_babel/extract.py
++++ b/django_babel/extract.py
+@@ -1,5 +1,14 @@
+ # -*- coding: utf-8 -*-
+-from django.template.base import Lexer, TOKEN_TEXT, TOKEN_VAR, TOKEN_BLOCK
++try:
++    # Django >= 2.1
++    from django.template.base import Lexer, TokenType
++    TOKEN_TEXT = TokenType.TEXT
++    TOKEN_VAR = TokenType.VAR
++    TOKEN_BLOCK = TokenType.BLOCK
++except ImportError:
++    # Django < 2.1
++    from django.template.base import Lexer, TOKEN_TEXT, TOKEN_VAR, TOKEN_BLOCK
++
+ from django.utils.translation import trim_whitespace
+ from django.utils.encoding import smart_text
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..9583b13
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+Fix-For-Django2.patch
-- 
2.24.0.rc0

Attachment: signature.asc
Description: PGP signature

Reply via email to