From b750b601da576517340dc5cb8a3ddb921dad740c Mon Sep 17 00:00:00 2001
From: jenisys <jenisys@users.noreply.github.com>
Date: Sat, 1 Oct 2016 12:42:11 +0200
Subject: [PATCH 3/3] PREPARE for Python 3.6: re.LOCALE was removed
(cherry picked from commit f52cc2f59df8e21a5caf21b268bbd9ca6fa3e1e1)
---
behave/configuration.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/behave/configuration.py b/behave/configuration.py
index a2563df..134004c 100644
--- a/behave/configuration.py
+++ b/behave/configuration.py
@@ -661,8 +661,10 @@ class Configuration(object):
: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):
--
2.11.0