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

SyntaxWarning: invalid escape sequence in Python 3.12 #582

Open
AlexPetul opened this issue Sep 4, 2024 · 0 comments
Open

SyntaxWarning: invalid escape sequence in Python 3.12 #582

AlexPetul opened this issue Sep 4, 2024 · 0 comments

Comments

@AlexPetul
Copy link

AlexPetul commented Sep 4, 2024

Describe the bug
When i updated my project to use Python 3.12 i started to get a warning from splunk-sdk:
/usr/local/lib/python3.12/site-packages/splunklib/client.py:772: SyntaxWarning: invalid escape sequence '\/'

In Python 3.12 there was a change related to this issue:

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

To Reproduce
Steps to reproduce the behavior:

  1. Just use Python3.12 with splunk-sdk

SDK (please complete the following information):

  • Version: 2.0.2
  • Language Runtime Version: Python 3.12
  • OS: Any

Linked PR: #583

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

No branches or pull requests

1 participant