-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Hundreds of "SyntaxWarning: invalid escape sequence" will break in future python versions #28829
Comments
Thank you for opening this issue, we will look into it. |
For reference this is the change in cPython that raises the SyntaxWarning, in a future version of python it will be an error: This has been deprecated since 3.6. |
Azure/autorest.python#2560 is merged and it means that new Azure SDK package versions won't have this warning. For commands themselves, I opened Azure/aaz-dev-tools#360. I think these will solve the issue completely, when the latter is merged and new code is generated. |
I needed to open Azure/aaz-dev-tools#365 too. |
This error doesn't appear in official CLI packages because it's already compiled into byte code. Official fix guide
Here is the code that need to be fixed:
|
First run of just "az" results in these three:
versions:
|
|
Describe the bug
We see many syntax warnings with python 3.12 which will be syntax errors in a future versions of python.
Related command
Any command that goes through the bad code, including
az login
.Errors
Issue script & Debug output
N/A
Expected behavior
The az-cli should not spew any syntax warnings.
Environment Summary
azure-cli==2.59.0
Python 3.12.3
Additional context
These syntax issues have been deprecated in Python for several python releases, 3.12 is showing the issues more explicitly since they are planned to break runtime in the future.
This should be fixed very promptly.
The text was updated successfully, but these errors were encountered: