Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid escape sequences in strings #116

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SunilMohanAdapa
Copy link
Contributor

  • In Python 3.12 and above, these lead to messages such as "SyntaxWarning: invalid escape sequence '\s'". In versions of Python earlier than 3.12, they were DeprecationWarnings. In a later version of Python these will lead to a SyntaxError.

Tests:

  • Verify that the new strings are equivalent to the old strings by old_string == new_string in the python interpreter in Python 3.12. old_string throws SyntaxWarning new_string does not.

  • Run 'python3 -m py_compile' on each python source file (except legacy files) and ensure that there are no syntax errors or warnings.

- In Python 3.12 and above, these lead to messages such as "SyntaxWarning:
invalid escape sequence '\s'". In versions of Python earlier than 3.12, they
were DeprecationWarnings. In a later version of Python these will lead to a
SyntaxError.

Tests:

- Verify that the new strings are equivalent to the old strings by old_string ==
new_string in the python interpreter in Python 3.12. old_string throws
SyntaxWarning new_string does not.

- Run 'python3 -m py_compile' on each python source file (except legacy files)
and ensure that there are no syntax errors or warnings.

Signed-off-by: Sunil Mohan Adapa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant