DeprecationWarning: invalid escape sequence on regex pattern strings
donpellegrino opened this issue · comments
When running Python 3.6.5 and using the cpe module with python -OO, it outputs the following DeprecationWarning messages:
<virtual_env>/lib/python3.6/site-packages/cpe/comp/cpecomp1_1.py:57:` DeprecationWarning: invalid escape sequence \w
_STRING = "\w.-,()@#"
<virtual_env>/lib/python3.6/site-packages/cpe/comp/cpecomp2_2.py:52: DeprecationWarning: invalid escape sequence \d
VALUE_PATTERN = "^([\d\w.-~%]+)$"
It looks like those lines might just need to be prefixed with 'r' in the code to indicate that they are raw strings.
Sorry, I don't have to expend time in this library anymore. Feel free to send a pull request if you fix it.