Ran into deprecation warnings while running tests in my own project concerning escape characters in the docstrings for a number of types / functions in fastecdsa. These deprecation warnings will turn to syntax warnings in Python 3.12 and will be syntax errors further down the line:
A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning, instead of DeprecationWarning. For example, re.compile("\d+.\d+") now emits a SyntaxWarning ("\d" is an invalid escape sequence), use raw strings for regular expression: re.compile(r"\d+.\d+"). In a future Python version, SyntaxError will eventually be raised, instead of SyntaxWarning. (Contributed by Victor Stinner in gh-98401.)
The easiest fix for this was to mark the offending docstrings as raw strings. Alternatively, I could turn the offending escape characters into doubly escaped ones (e.g. \equiv into \\equiv) if the maintainers would prefer that solution.
Ran into deprecation warnings while running tests in my own project concerning escape characters in the docstrings for a number of types / functions in fastecdsa. These deprecation warnings will turn to syntax warnings in Python 3.12 and will be syntax errors further down the line:
The easiest fix for this was to mark the offending docstrings as raw strings. Alternatively, I could turn the offending escape characters into doubly escaped ones (e.g.
\equiv
into\\equiv
) if the maintainers would prefer that solution.