[Python-modules-commits] [behave] 01/03: Python 3.6 compatibility patch (re.LOCALE removed)

Vincent Bernat bernat at moszumanska.debian.org
Sat Aug 5 10:46:56 UTC 2017


This is an automated email from the git hooks/post-receive script.

bernat pushed a commit to branch master
in repository behave.

commit 6c303a1255e86e7c6d8a9f9b958ea83a7db5db70
Author: Vincent Bernat <bernat at debian.org>
Date:   Sat Aug 5 12:44:17 2017 +0200

    Python 3.6 compatibility patch (re.LOCALE removed)
---
 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):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/behave.git



More information about the Python-modules-commits mailing list