summarylogtreecommitdiffstats
path: root/remove-locale-from-str-regex.patch
diff options
context:
space:
mode:
Diffstat (limited to 'remove-locale-from-str-regex.patch')
-rw-r--r--remove-locale-from-str-regex.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/remove-locale-from-str-regex.patch b/remove-locale-from-str-regex.patch
new file mode 100644
index 000000000000..f2b1294f2d68
--- /dev/null
+++ b/remove-locale-from-str-regex.patch
@@ -0,0 +1,54 @@
+From 54f9041f2c3cd47643bf4b9183f8cb530caf6313 Mon Sep 17 00:00:00 2001
+From: Andrii Soldatenko <andrii.soldatenko@ethoos.com>
+Date: Sun, 18 Dec 2016 16:44:18 +0200
+Subject: [PATCH] Remove LOCALE from str regular expression
+
+---
+ tablib/packages/xlwt/ExcelFormulaLexer.py | 4 ++--
+ tablib/packages/xlwt3/ExcelFormulaLexer.py | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tablib/packages/xlwt/ExcelFormulaLexer.py b/tablib/packages/xlwt/ExcelFormulaLexer.py
+index 91d999f..5004d8e 100644
+--- a/tablib/packages/xlwt/ExcelFormulaLexer.py
++++ b/tablib/packages/xlwt/ExcelFormulaLexer.py
+@@ -4,7 +4,7 @@
+ from antlr import EOF, CommonToken as Tok, TokenStream, TokenStreamException
+ import struct
+ import ExcelFormulaParser
+-from re import compile as recompile, match, LOCALE, UNICODE, IGNORECASE, VERBOSE
++from re import compile as recompile, match, UNICODE, IGNORECASE, VERBOSE
+
+
+ int_const_pattern = r"\d+\b"
+@@ -51,7 +51,7 @@
+
+ _re = recompile(
+ '(' + ')|('.join([i[0] for i in pattern_type_tuples]) + ')',
+- VERBOSE+LOCALE+IGNORECASE)
++ VERBOSE+IGNORECASE)
+
+ _toktype = [None] + [i[1] for i in pattern_type_tuples]
+ # need dummy at start because re.MatchObject.lastindex counts from 1
+diff --git a/tablib/packages/xlwt3/ExcelFormulaLexer.py b/tablib/packages/xlwt3/ExcelFormulaLexer.py
+index 5dc546c..9b6103c 100644
+--- a/tablib/packages/xlwt3/ExcelFormulaLexer.py
++++ b/tablib/packages/xlwt3/ExcelFormulaLexer.py
+@@ -2,7 +2,7 @@
+ from .antlr import EOF, CommonToken as Tok, TokenStream, TokenStreamException
+ import struct
+ from . import ExcelFormulaParser
+-from re import compile as recompile, match, LOCALE, UNICODE, IGNORECASE, VERBOSE
++from re import compile as recompile, match, UNICODE, IGNORECASE, VERBOSE
+
+
+ int_const_pattern = r"\d+\b"
+@@ -49,7 +49,7 @@
+
+ _re = recompile(
+ '(' + ')|('.join([i[0] for i in pattern_type_tuples]) + ')',
+- VERBOSE+LOCALE+IGNORECASE)
++ VERBOSE+IGNORECASE)
+
+ _toktype = [None] + [i[1] for i in pattern_type_tuples]
+ # need dummy at start because re.MatchObject.lastindex counts from 1