Skip to content

Commit

Permalink
PREPARE for Python 3.6: re.LOCALE was removed
Browse files Browse the repository at this point in the history
  • Loading branch information
jenisys committed Oct 1, 2016
1 parent 3c47bf5 commit f52cc2f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion behave/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,8 +683,10 @@ def build_name_re(names):
: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):
Expand Down

0 comments on commit f52cc2f

Please sign in to comment.