cvpysdk icon indicating copy to clipboard operation
cvpysdk copied to clipboard

invalid escape sequences trigger SyntaxWarnings

Open sspans-sbp opened this issue 1 year ago • 0 comments

On newer python versions (3.12.2+) some of the comments in the code trigger warnings.
These warnings will become errors in the future.

e5b1bd7a9a60:~# python
Python 3.12.2 (main, Feb  7 2024, 22:13:24) [GCC 13.2.1 20231014] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from cvpysdk.commcell import Commcell
/usr/local/lib/python3.12/site-packages/cvpysdk/commcell.py:2287: SyntaxWarning: invalid escape sequence '\M'
  """copies media from the specified location on the commcell
/usr/local/lib/python3.12/site-packages/cvpysdk/client.py:5452: SyntaxWarning: invalid escape sequence '\ '
  """
/usr/local/lib/python3.12/site-packages/cvpysdk/client.py:5532: SyntaxWarning: invalid escape sequence '\ '
  """
/usr/local/lib/python3.12/site-packages/cvpysdk/client.py:6707: SyntaxWarning: invalid escape sequence '\T'
  """
/usr/local/lib/python3.12/site-packages/cvpysdk/storage.py:2183: SyntaxWarning: invalid escape sequence '\*'
  """
/usr/local/lib/python3.12/site-packages/cvpysdk/workflow.py:622: SyntaxWarning: invalid escape sequence '\*'
  """Returns a workflow object if workflow name matches specified name
/usr/local/lib/python3.12/site-packages/cvpysdk/workflow.py:845: SyntaxWarning: invalid escape sequence '\*'
  """Initialize the WorkFlow class instance for performing workflow related operations.
/usr/local/lib/python3.12/site-packages/cvpysdk/credential_manager.py:195: SyntaxWarning: invalid escape sequence '\l'
  """Creates credential account on this commcell
/usr/local/lib/python3.12/site-packages/cvpysdk/deployment/download.py:275: SyntaxWarning: invalid escape sequence '\M'
  """copies media from the specified location on the commcell

From https://www.python.org/downloads/release/python-3122/

Invalid backslash escape sequences in strings now warn with SyntaxWarning instead of DeprecationWarning, making them more visible. (They will become syntax errors in the future.)

sspans-sbp avatar Mar 18 '24 08:03 sspans-sbp