cpe icon indicating copy to clipboard operation
cpe copied to clipboard

DeprecationWarning: invalid escape sequence on regex pattern strings

Open donpellegrino opened this issue 4 years ago • 1 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.

donpellegrino avatar Apr 03 '20 21:04 donpellegrino

Sorry, I don't have to expend time in this library anymore. Feel free to send a pull request if you fix it.

nilp0inter avatar Jun 01 '20 21:06 nilp0inter