Skip to content

Commit 35cf379

Browse files
committed
update patch
1 parent 0ee4012 commit 35cf379

2 files changed

Lines changed: 17 additions & 10 deletions

File tree

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
11
Should use Python's native function instead of the six package for unicode.py
22

33
---
4-
re2/unicode.py | 2 +-
5-
1 file changed, 1 insertion(+), 1 deletion(-)
6-
74
diff --git a/re2/unicode.py b/re2/unicode.py
8-
index 727bea5f..e3293839 100644
5+
index e0f33ef..651b7cc 100644
96
--- a/re2/unicode.py
107
+++ b/re2/unicode.py
11-
@@ -10,7 +10,7 @@
12-
8+
@@ -10,7 +10,6 @@
9+
1310
import os
1411
import re
1512
-from six.moves import urllib
16-
+import urllib.request
17-
13+
1814
# Directory or URL where Unicode tables reside.
19-
_UNICODE_DIR = "${UNICODE_AUTO_RAW_DATA_DIR}"
15+
_UNICODE_DIR = "${UNICODE_AUTO_RAW_DATA_DIR}"
16+
@@ -152,10 +151,7 @@
17+
raise InputError("invalid number of fields %d" % (nfields,))
18+
19+
if type(filename) == str:
20+
- if filename.startswith("https://"):
21+
- fil = urllib.request.urlopen(filename)
22+
- else:
23+
- fil = open(filename, "rb")
24+
+ fil = open(filename, "rb")
25+
else:
26+
fil = filename
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
kphp-unicode-data.patch
2-
kphp-remove-six-package.patch
2+
kphp-remove-six-package.patch

0 commit comments

Comments
 (0)