Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.63k stars 2.84k forks source link

SyntaxWarning: invalid escape sequence '\s' in azure-batch #38618

Open bebound opened 5 days ago

bebound commented 5 days ago

Describe the bug In azure-batch-14.2.0.tar.gz, azure/batch/models/_models_py3.py line 4846 raises SyntaxWarning in Python 3.12. \s should be \\s.

Node. (AZ_BATCH_NODE_ROOT_DIR\shared), or starting a local service on the

Expected behavior No syntax warning.

I'm not sure if there are more syntax warnings in sdk package.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Related issue: https://github.com/Azure/azure-cli/issues/28829#issuecomment-2485161285

github-actions[bot] commented 5 days ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @cRui861 @dpwatrous @jingjlii @JJJessieWang @wanghoppe @wiboris.

corganfuzz commented 1 day ago

to me this still happens when I do

az webapp ... (anything)

/opt/homebrew/Cellar/azure-cli/2.67.0/libexec/lib/python3.12/site-packages/azure/mgmt/web/v2023_01_01/models/_models_py3.py:20621: SyntaxWarning: invalid escape sequence '\S'
  """Configuration of an App Service app.
/opt/homebrew/Cellar/azure-cli/2.67.0/libexec/lib/python3.12/site-packages/azure/mgmt/web/v2023_01_01/models/_models_py3.py:20981: SyntaxWarning: invalid escape sequence '\S'
  """
/opt/homebrew/Cellar/azure-cli/2.67.0/libexec/lib/python3.12/site-packages/azure/mgmt/web/v2023_01_01/models/_models_py3.py:21292: SyntaxWarning: invalid escape sequence '\S'
  """Web app configuration ARM resource.
/opt/homebrew/Cellar/azure-cli/2.67.0/libexec/lib/python3.12/site-packages/azure/mgmt/web/v2023_01_01/models/_models_py3.py:21680: SyntaxWarning: invalid escape sequence '\S'
  """

but everything else works normally


az --version

azure-cli                         2.67.0

core                              2.67.0
telemetry                          1.1.0

Extensions:
account                            0.2.5
azure-devops                       1.0.1
logic                              1.1.0
ssh                                2.0.6

Dependencies:
msal                              1.31.0
azure-mgmt-resource               23.1.1

Python location '/opt/homebrew/Cellar/azure-cli/2.67.0/libexec/bin/python'
Extensions directory '/Users/gerruiz/.azure/cliextensions'

Python (Darwin) 3.12.7 (main, Oct  1 2024, 02:05:46) [Clang 16.0.0 (clang-1600.0.26.3)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.