SyntaxWarning: Invalid escape sequence \/ in `azure-mgmt-resource-deploymentstacks` 1.0.0

Open Beginner friendly
#50,155 0 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
85/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
cloud

Research direction

The warning comes from the docstring at line 119 of azure/mgmt/resource/deploymentstacks/models/_models.py, which contains an unescaped backslash before a slash. Reproduce by importing the package with warnings enabled (for example python -W error -c "import azure.mgmt.resource.deploymentstacks"). Done means the import emits no SyntaxWarning. The file is generated, so check whether the fix belongs in the generator output rather than the file itself.

Written by the indexing model from the issue text.

Description

needs-triage
  • Package Name: azure-mgmt-resource-deploymentstacks
  • Package Version: 1.0.0
  • Operating System: macOS-27.0.1-arm64-arm-64bit-Mach-O
  • Python Version: 3.14.8

Describe the bug
https://github.com/Azure/azure-cli/issues/34237

The package emits a SyntaxWarning due to an invalid escape sequence \/ in the generated model file.

Warning message:

azure/mgmt/resource/deploymentstacks/models/_models.py:119:
SyntaxWarning: "\/" is an invalid escape sequence.
Such sequences will not work in the future.
Did you mean "\\/"? A raw string is also an option.

The warning originates from an unescaped backslash in a docstring in _models.py.

To Reproduce

Steps to reproduce the behavior:

  1. Install the package:
    pip install azure-mgmt-resource-deploymentstacks==1.0.0
    
  2. Import the package:
    from azure.mgmt.resource.deploymentstacks import DeploymentStacksClient
    
  3. Observe the SyntaxWarning emitted during import.

Expected behavior

The package should not emit any SyntaxWarning during import.

The invalid escape sequence should be properly escaped (\\) or the affected docstring should use a raw string.

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

Additional context
Add any other context about the problem here.

Dominant language
Python
Stars
5.6k
Forks
3.4k
Avg merge
1d 22h
Merged PRs (30d)
189

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/azure-sdk-for-python

All issues in Azure/azure-sdk-for-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.