-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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
gh-81548: Deprecate octal sequences with value larger than 0o377 #91668
gh-81548: Deprecate octal sequences with value larger than 0o377 #91668
Conversation
I'm glad you're doing this! |
Interesting, you posted your comment just between two commits which I have pushed with one |
If possible, I would suggest extending the information about this deprecation warning as it is not obvious for people reading this why is this made and when does the deprecation warning fires off.
$ cat a.py
print("\407", b"\407")
$ python3.11 a.py
ć b'\x07'
$ python3.11 -W default a.py
//a.py:1: DeprecationWarning: invalid octal escape sequence '\407'
print("\407", b"\407")
//a.py:1: DeprecationWarning: invalid octal escape sequence '\407'
print("\407", b"\407")
ć b'\x07' I believe this comes from the default warning filter. Idk if we really want it described there, but imho it never hurts to provide more information. |
Will give this a go soon 👍 |
|
Closes #81548.