diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2017-03-14 11:20:29 +0200 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2017-03-19 21:00:15 +0200 |
commit | dc1620f50b63ebee03fcba8956ddab05a5a02327 (patch) | |
tree | e7204e5e05efd5d9673c10605405981109bd42f9 /update-error-constants.py | |
parent | a79307c5173963beb7bd03e54339e6ff7f11fb81 (diff) | |
download | python-lxml-dc1620f50b63ebee03fcba8956ddab05a5a02327.tar.gz |
Python 3.6 invalid escape sequence deprecation fixes
https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior
Diffstat (limited to 'update-error-constants.py')
-rw-r--r-- | update-error-constants.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/update-error-constants.py b/update-error-constants.py index 649517de..d904dc3a 100644 --- a/update-error-constants.py +++ b/update-error-constants.py @@ -76,8 +76,8 @@ find_enums = etree.XPath( namespaces = {'html' : 'http://www.w3.org/1999/xhtml'}) def parse_enums(html_dir, html_filename, enum_dict): - PARSE_ENUM_NAME = re.compile('\s*enum\s+(\w+)\s*{', re.I).match - PARSE_ENUM_VALUE = re.compile('\s*=\s+([0-9]+)\s*(?::\s*(.*))?').match + PARSE_ENUM_NAME = re.compile(r'\s*enum\s+(\w+)\s*{', re.I).match + PARSE_ENUM_VALUE = re.compile(r'\s*=\s+([0-9]+)\s*(?::\s*(.*))?').match tree = etree.parse(os.path.join(html_dir, html_filename)) enums = find_enums(tree) for enum in enums: |