DeprecationWarning over invalid escape sequences.
Closed this issue · 5 comments
tirkarthi commented
- Package Version: master branch
- Operating System: Linux
- Python Version: 3.7/3.8
Describe the bug
DeprecationWarning
are produced over invalid escape sequences
To Reproduce
find . -iname '*.py' | xargs -P 4 -I{} python3 -Wall -m py_compile {}
./sdk/core/azure-servicemanagement-legacy/azure/servicemanagement/servicebusmanagementservice.py:51: DeprecationWarning: invalid escape sequence \m
'''
./sdk/core/azure-servicemanagement-legacy/azure/servicemanagement/servicemanagementservice.py:73: DeprecationWarning: invalid escape sequence \m
'''
./sdk/core/azure-servicemanagement-legacy/azure/servicemanagement/sqldatabasemanagementservice.py:47: DeprecationWarning: invalid escape sequence \m
'''
./sdk/core/azure-servicemanagement-legacy/azure/servicemanagement/websitemanagementservice.py:47: DeprecationWarning: invalid escape sequence \m
'''
./sdk/core/azure-servicemanagement-legacy/azure/servicemanagement/schedulermanagementservice.py:51: DeprecationWarning: invalid escape sequence \m
'''
./sdk/batch/azure-batch/azure/batch/models/_models.py:4564: DeprecationWarning: invalid escape sequence \s
"""A Job Preparation Task to run before any Tasks of the Job on any given
./sdk/batch/azure-batch/azure/batch/models/_models_py3.py:4564: DeprecationWarning: invalid escape sequence \s
"""A Job Preparation Task to run before any Tasks of the Job on any given
./sdk/containerregistry/azure-mgmt-containerregistry/tests/test_mgmt_containerregistry_2018_02_01_preview.py:411: DeprecationWarning: invalid escape sequence \D
docker_file_path='src\Dockerfile',
./sdk/containerregistry/azure-mgmt-containerregistry/tests/test_mgmt_containerregistry_2018_02_01_preview.py:432: DeprecationWarning: invalid escape sequence \D
self.assertEqual(build_step.properties.docker_file_path, 'src\Dockerfile')
./sdk/containerregistry/azure-mgmt-containerregistry/tests/test_mgmt_containerregistry_2018_02_01_preview.py:451: DeprecationWarning: invalid escape sequence \D
self.assertEqual(build_step.properties.docker_file_path, 'src\Dockerfile')
./sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py:63: DeprecationWarning: invalid escape sequence \w
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'),
./sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py:130: DeprecationWarning: invalid escape sequence \w
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'),
./sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py:224: DeprecationWarning: invalid escape sequence \w
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'),
./sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py:312: DeprecationWarning: invalid escape sequence \w
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'),
./sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py:398: DeprecationWarning: invalid escape sequence \w
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'),
./sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py:543: DeprecationWarning: invalid escape sequence \w
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'),
./sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py:612: DeprecationWarning: invalid escape sequence \w
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'),
./sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py:675: DeprecationWarning: invalid escape sequence \w
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'),
./sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py:738: DeprecationWarning: invalid escape sequence \w
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'),
./sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py:807: DeprecationWarning: invalid escape sequence \w
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'),
./eng/versioning/version_shared.py:114: DeprecationWarning: invalid escape sequence \g
"\g<1>'{}'".format(classification),
Deleted user commented
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @SteveLasker, @yugangw-msft
yugangw-msft commented
This is not a ACR issue; rather a generic code gen issues across service bus, documentdb, and ACR.
CC @zikalino
tirkarthi commented
pyupgrade automatically fixes these warnings : https://github.com/asottile/pyupgrade/
lmazuel commented
azure-mgmt-documentdb
and azure-servicemanagement-legacy
are deprecated and won't be updated (they are here so latest source is available), the rest will be updated part of next gen re-generation, closing