After migrating my project to Python 3.12, I started receiving the following warning:
C:\PATH_TO_MY_VENV\Lib\site-packages\mongodb_migrations\cli.py:32: SyntaxWarning: invalid escape sequence '\d'
result = re.match('^(\d+)[_a-z]*\.py$', file)
This warning is indicating that the escape sequence \d is invalid in the regular expression provided:
https://docs.python.org/3/whatsnew/3.12.html#other-language-changes
So locally I tried to replace regex pattern '^(\d+)[_a-z]*\.py$' to raw string r'^(\d+)[_a-z]*\.py$' and it works fine.
What are your thoughts on this issue? Can I help with PR?
Hi,
After migrating my project to Python 3.12, I started receiving the following warning:
This warning is indicating that the escape sequence
\d
is invalid in the regular expression provided: https://docs.python.org/3/whatsnew/3.12.html#other-language-changes So locally I tried to replace regex pattern'^(\d+)[_a-z]*\.py$'
to raw stringr'^(\d+)[_a-z]*\.py$'
and it works fine.What are your thoughts on this issue? Can I help with PR?
And thank you a lot for this great tool!