-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Labels
Accountaz login/accountaz login/accountAuto-AssignAuto assign by botAuto assign by botBatchaz batchaz batchPossible-SolutionService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.Similar-Issuecustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Description
Describe the bug
When running the azure-cli on macOS (Homebrew install), Python shows SyntaxWarning messages about invalid escape sequences in docstrings within the azure.batch.models._models.py file.
Related command
az login
Errors
/opt/homebrew/Cellar/azure-cli/2.75.0/libexec/lib/python3.12/site-packages/azure/batch/models/_models.py:9067: SyntaxWarning: invalid escape sequence '\ '
"""The source port ranges to match for the rule. Valid values are '\ *' (for all ports 0 - 65535),
/opt/homebrew/Cellar/azure-cli/2.75.0/libexec/lib/python3.12/site-packages/azure/batch/models/_models.py:9235: SyntaxWarning: invalid escape sequence '\ '
using brackets (for example abc[\ *] would match a file named abc*\ ). Note that both and / areIssue script & Debug output
Not sure this step is necessary for a syntax error telling the line number.
/opt/homebrew/Cellar/azure-cli/2.75.0/libexec/lib/python3.12/site-packages/azure/batch/models/_models.py:9067: SyntaxWarning: invalid escape sequence '\ '
"""The source port ranges to match for the rule. Valid values are '\ *' (for all ports 0 - 65535),
/opt/homebrew/Cellar/azure-cli/2.75.0/libexec/lib/python3.12/site-packages/azure/batch/models/_models.py:9235: SyntaxWarning: invalid escape sequence '\ '
using brackets (for example abc[\ *] would match a file named abc*\ ). Note that both and / are
Expected behavior
No SyntaxWarning should appear. Backslashes in docstrings should be escaped (\\) or the string should be marked as a raw string (r'...').Expected behavior
No SyntaxWarning should appear. Backslashes in docstrings should be escaped (\) or the string should be marked as a raw string (r'...').
Environment Summary
macOS Sequoia 15.5 (24F74)
Python 3.12
Azure CLI installed via Homebrew (azure-cli/2.75.0)
Additional context
This is a docstring only — so there’s no runtime breakage. It just clutters the output with warnings.
thphamyuto-kimura-g
Metadata
Metadata
Assignees
Labels
Accountaz login/accountaz login/accountAuto-AssignAuto assign by botAuto assign by botBatchaz batchaz batchPossible-SolutionService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.Similar-Issuecustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that