Package: behave
Version: 1.2.5-1
Severity: serious
Tags: patch
Justification: fails to build from source (but built successfully in the past)
User: [email protected]
Usertags: origin-ubuntu artful ubuntu-patch
Dear Maintainer,
Currently, behave fails to build from source in unstable due to the
tests failing with Python 3.6.
In Ubuntu, the attached patch was applied to achieve the following:
* debian/patches/0002-Python-3.6-compatibility.patch: Apply patch from
upstream to provide compatibility with Python 3.6 and fix FTBFS.
Thanks for considering the patch.
Logan Rosen
-- System Information:
Debian Release: stretch/sid
APT prefers zesty-updates
APT policy: (500, 'zesty-updates'), (500, 'zesty-security'), (500, 'zesty'),
(100, 'zesty-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.10.0-28-generic (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru behave-1.2.5/debian/patches/0002-Python-3.6-compatibility.patch
behave-1.2.5/debian/patches/0002-Python-3.6-compatibility.patch
--- behave-1.2.5/debian/patches/0002-Python-3.6-compatibility.patch
1969-12-31 16:00:00.000000000 -0800
+++ behave-1.2.5/debian/patches/0002-Python-3.6-compatibility.patch
2017-08-02 21:50:23.000000000 -0700
@@ -0,0 +1,23 @@
+From f52cc2f59df8e21a5caf21b268bbd9ca6fa3e1e1 Mon Sep 17 00:00:00 2001
+From: jenisys <[email protected]>
+Date: Sat, 1 Oct 2016 12:42:11 +0200
+Subject: [PATCH] PREPARE for Python 3.6: re.LOCALE was removed
+
+---
+ behave/configuration.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/behave/configuration.py
++++ b/behave/configuration.py
+@@ -661,8 +661,10 @@
+ :param names: List of name parts or regular expressions (as text).
+ :return: Compiled regular expression to use.
+ """
++ # -- NOTE: re.LOCALE is removed in Python 3.6 (deprecated in Python
3.5)
++ # flags = (re.UNICODE | re.LOCALE)
+ pattern = u"|".join(names)
+- return re.compile(pattern, flags=(re.UNICODE | re.LOCALE))
++ return re.compile(pattern, flags=re.UNICODE)
+
+ def exclude(self, filename):
+ if isinstance(filename, FileLocation):
diff -Nru behave-1.2.5/debian/patches/series behave-1.2.5/debian/patches/series
--- behave-1.2.5/debian/patches/series 2017-06-12 22:01:28.000000000 -0700
+++ behave-1.2.5/debian/patches/series 2017-08-02 21:50:17.000000000 -0700
@@ -1 +1,2 @@
0001-docs-disable-use-of-sphincontrib.cheeseshop.patch
+0002-Python-3.6-compatibility.patch