SyntaxWarning: invalid escape sequence
Running sardana in python 3.12 one gets many SyntaxWarning: invalid escape sequence e.g.
/usr/lib/python3/dist-packages/sardana/macroserver/macro.py:238: SyntaxWarning: invalid escape sequence '\<'
"""Hooks (callables) attached to the macro object together with the
/usr/lib/python3/dist-packages/sardana/macroserver/macros/discrete.py:103: SyntaxWarning: invalid escape sequence '\{'
msg = 'Cannot update configuration]\n{0}\{1}'.format(e, self)
/usr/lib/python3/dist-packages/sardana/macroserver/macros/hkl.py:185: SyntaxWarning: invalid escape sequence '\d'
'(?<![\d.])'
/usr/lib/python3/dist-packages/sardana/macroserver/macros/hkl.py:186: SyntaxWarning: invalid escape sequence '\d'
'(?![1-9]\d*(?![\d.])|\d*\.\d*\.)'
/usr/lib/python3/dist-packages/sardana/macroserver/macros/hkl.py:187: SyntaxWarning: invalid escape sequence '\.'
'0*(?!(?<=0)\.)'
/usr/lib/python3/dist-packages/sardana/macroserver/macros/hkl.py:188: SyntaxWarning: invalid escape sequence '\d'
'([\d.]+?)'
/usr/lib/python3/dist-packages/sardana/macroserver/macros/hkl.py:189: SyntaxWarning: invalid escape sequence '\.'
'\.?0*'
/usr/lib/python3/dist-packages/sardana/macroserver/macros/hkl.py:190: SyntaxWarning: invalid escape sequence '\d'
'(?![\d.])'
/usr/lib/python3/dist-packages/sardana/taurus/qt/qtgui/extra_macroexecutor/macrobutton.py:275: SyntaxWarning: invalid escape sequence '\s'
if re.search('\s', value):
It would be nice to fix them either by changing '...'
to r'...'
or replacing '\d'
by '\\d'