Skip to content

Commit 517b4fb

Browse files
committed
Merge branch 'master' into fix-issue-12851
2 parents 18b755a + 8ff5356 commit 517b4fb

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ env:
1515
- OPENSSL=1.1.0g
1616
- OPENSSL_DIR="$HOME/multissl/openssl/${OPENSSL}"
1717
- PATH="${OPENSSL_DIR}/bin:$PATH"
18-
- CFLAGS="-I${OPENSSL_DIR}/include"
18+
# Use -O3 because we don't use debugger on Travis-CI
19+
- CFLAGS="-I${OPENSSL_DIR}/include -O3"
1920
- LDFLAGS="-L${OPENSSL_DIR}/lib"
2021
# Set rpath with env var instead of -Wl,-rpath linker flag
2122
# OpenSSL ignores LDFLAGS when linking bin/openssl

Lib/sre_parse.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
# XXX: show string offset and offending character for all errors
1414

1515
from sre_constants import *
16-
import unicodedata
1716

1817
SPECIAL_CHARS = ".\\[{()*+?^$|"
1918
REPEAT_CHARS = "*+?{"
@@ -324,6 +323,7 @@ def _class_escape(source, escape):
324323
chr(c) # raise ValueError for invalid code
325324
return LITERAL, c
326325
elif c == "N" and source.istext:
326+
import unicodedata
327327
# named unicode escape e.g. \N{EM DASH}
328328
if not source.match('{'):
329329
raise source.error("missing {")
@@ -383,6 +383,7 @@ def _escape(source, escape, state):
383383
chr(c) # raise ValueError for invalid code
384384
return LITERAL, c
385385
elif c == "N" and source.istext:
386+
import unicodedata
386387
# named unicode escape e.g. \N{EM DASH}
387388
if not source.match('{'):
388389
raise source.error("missing {")

0 commit comments

Comments
 (0)