-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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 when using Python 3.12 #4823
Comments
@goodrone could you send a pull request to fix this? |
hhoffstaette
added a commit
to hhoffstaette/bcc
that referenced
this issue
Dec 8, 2023
…3.12 Fixes: iovisor#4823 Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
gentoo-bot
pushed a commit
to gentoo/gentoo
that referenced
this issue
Dec 8, 2023
Bug: iovisor/bcc#4823 Bug: iovisor/bcc#4830 Reported-by: Holger Hoffstätte <holger@applied-asynchrony.com> Signed-off-by: Sam James <sam@gentoo.org>
yonghong-song
pushed a commit
that referenced
this issue
Dec 8, 2023
…3.12 Fixes: #4823 Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Thank you @hhoffstaette for preparing a pull request https://github.com/iovisor/bcc/pull/4832/files. Unfortunately, I see that it has two issues:
I hope to be able to contribute an improved fix when I have time. |
It would be great if the test suite actually checked for this, otherwise the regexes are essentially in an unknown state. |
dkruces
pushed a commit
to dkruces/bcc
that referenced
this issue
Nov 28, 2024
…3.12 Fixes: iovisor#4823 Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Python 3.12 improves handling of incorrect escape sequences, see https://docs.python.org/3/whatsnew/3.12.html#other-language-changes
This is a typical scenario in regular expressions. With Python 3.12, there are currently 5 places that use invalid escape sequences:
In all places I think it will be enough to use Python raw strings,
r'...'
.Here is the command I used to look up all of them:
The text was updated successfully, but these errors were encountered: