DeprecationWarning: invalid escape sequence
kbaikov opened this issue · comments
Konstantin Baikov commented
I get the following error message on first poetry start if env variable is set: PYTHONWARNINGS = default
PS C:\Users\username> poetry --version
C:\Users\username\.poetry\lib\poetry\_vendor\py3.9\clikit\utils\string.py:81: DeprecationWarning: invalid escape sequence \s
words = re.split("\s+", string)
C:\Users\username\.poetry\lib\poetry\_vendor\py3.9\clikit\api\args\format\command_option.py:47: DeprecationWarning: invalid escape sequence \-
if not re.match("^[a-zA-Z0-9\-]+$", alias):
Poetry version 1.1.3
Poetry version 1.1.3
Poetry installed on windows 10 using get-poetry.py script.
Python version 3.9 (reproducible in 3.8)
I can propose a fix by escaping the escape slash, or by declaring the sting raw.
What would be a better approach?
Karthikeyan Singaravelan commented
The warnings seem to have been fixed with a84c056
Konstantin Baikov commented
True. Thanks @tirkarthi and @sdispater !