ceph-salt icon indicating copy to clipboard operation
ceph-salt copied to clipboard

Do we need to do something about these tox warnings?

Open smithfarm opened this issue 3 years ago • 1 comments

=============================== warnings summary ===============================

ceph_salt/config_shell.py:1199

  /home/travis/build/ceph/ceph-salt/ceph_salt/config_shell.py:1199: DeprecationWarning: invalid escape sequence \+

    var = QuotedString('"') | QuotedString("'") | Word(alphanums + '?;&*$!#,=_\+/.<>()~@:-%[]')

ceph_salt/config_shell.py:1201

  /home/travis/build/ceph/ceph-salt/ceph_salt/config_shell.py:1201: DeprecationWarning: invalid escape sequence \-

    keyword = Word(alphanums + '_\-')

ceph_salt/config_shell.py:1207

ceph_salt/config_shell.py:1207

  /home/travis/build/ceph/ceph-salt/ceph_salt/config_shell.py:1207: DeprecationWarning: invalid escape sequence \[

    pathstd = Regex('([A-Za-z0-9:_.\[\]]|-)*' + '/' + '([A-Za-z0-9:_.\[\]/]|-)*') | '..' | '.'

.tox/py36/lib/python3.6/distutils/__init__.py:4

  /home/travis/build/ceph/ceph-salt/.tox/py36/lib/python3.6/distutils/__init__.py:4: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses

    import imp

smithfarm avatar Oct 06 '20 15:10 smithfarm

Deprecation warnings are raised due to invalid escape sequences. This can be fixed by using raw strings or escaping the literals. pyupgrade also helps in automatic conversion : https://github.com/asottile/pyupgrade/ . They might be made syntax warnings in future.

tirkarthi avatar Oct 28 '20 16:10 tirkarthi