Bug 8277 - SyntaxWarning errors in log when starting tlwebadm/tlwebaccess
Summary: SyntaxWarning errors in log when starting tlwebadm/tlwebaccess
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Web Administration (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: MediumPrio
Assignee: Bugzilla mail exporter
URL:
Keywords:
: 8364 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-12-29 14:21 CET by Pierre Ossman
Modified: 2024-06-14 10:26 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2023-12-29 14:21:15 CET
Cheetah has some improper strings that historically have given DeprecationWarning:s when in debug mode:

https://github.com/CheetahTemplate3/cheetah3/issues/31

However, they've now been upgraded to SyntaxWarning:s that are visible even in production builds:

> Dec 29 12:56:48 lab-154.lkpg.cendio.se systemd[1]: Starting tlwebadm.service - ThinLinc Web Administration...
> Dec 29 12:56:48 lab-154.lkpg.cendio.se bash[95267]: /opt/thinlinc/modules/thinlinc/Cheetah/Template.py:142: SyntaxWarning: invalid escape sequence '\*'
> Dec 29 12:56:48 lab-154.lkpg.cendio.se bash[95267]:   '''
> Dec 29 12:56:48 lab-154.lkpg.cendio.se bash[95267]: /opt/thinlinc/modules/thinlinc/Cheetah/Template.py:1617: SyntaxWarning: invalid escape sequence '\*'
> Dec 29 12:56:48 lab-154.lkpg.cendio.se bash[95267]:   """Compile the template. This method is automatically called by
> Dec 29 12:56:48 lab-154.lkpg.cendio.se bash[95267]: /opt/thinlinc/modules/thinlinc/Cheetah/Template.py:1728: SyntaxWarning: invalid escape sequence '\*'
> Dec 29 12:56:48 lab-154.lkpg.cendio.se bash[95267]:   """Method for importing web transaction variables in bulk.
> Dec 29 12:56:48 lab-154.lkpg.cendio.se bash[95267]: /opt/thinlinc/modules/thinlinc/Cheetah/Template.py:1984: SyntaxWarning: invalid escape sequence '\d'
> Dec 29 12:56:48 lab-154.lkpg.cendio.se bash[95267]:   re.search('[ \t]*File.*line (\d+)', formatedExc).group(1))
> Dec 29 12:56:48 lab-154.lkpg.cendio.se bash[95267]: /opt/thinlinc/modules/thinlinc/Cheetah/Template.py:2025: SyntaxWarning: invalid escape sequence '\d'
> Dec 29 12:56:48 lab-154.lkpg.cendio.se bash[95267]:   cheetahPosMatch = re.search('line (\d+), col (\d+)', formatedExc)
> Dec 29 12:56:48 lab-154.lkpg.cendio.se bash[95267]: /opt/thinlinc/modules/thinlinc/Cheetah/Template.py:2035: SyntaxWarning: invalid escape sequence '\d'
> Dec 29 12:56:48 lab-154.lkpg.cendio.se bash[95267]:   cheetahPosMatch = re.search('line (\d+), col (\d+)',
> Dec 29 12:56:48 lab-154.lkpg.cendio.se bash[95267]: /opt/thinlinc/modules/thinlinc/Cheetah/SettingsManager.py:19: SyntaxWarning: invalid escape sequence '\('
> Dec 29 12:56:48 lab-154.lkpg.cendio.se bash[95267]:   '[\(]*' + Number + r'[ \t]*\+[ \t]*' + Number + '[\)]*')
> Dec 29 12:56:48 lab-154.lkpg.cendio.se bash[95267]: /opt/thinlinc/modules/thinlinc/Cheetah/SettingsManager.py:19: SyntaxWarning: invalid escape sequence '\)'
> Dec 29 12:56:48 lab-154.lkpg.cendio.se bash[95267]:   '[\(]*' + Number + r'[ \t]*\+[ \t]*' + Number + '[\)]*')
> Dec 29 12:56:48 lab-154.lkpg.cendio.se bash[95267]: /opt/thinlinc/modules/thinlinc/Cheetah/Parser.py:464: SyntaxWarning: invalid escape sequence '\*'
> Dec 29 12:56:48 lab-154.lkpg.cendio.se bash[95267]:   + r'(?P<REFRESH_CACHE>\*' + interval + '\*)'
> Dec 29 12:56:48 lab-154.lkpg.cendio.se bash[95267]: /opt/thinlinc/modules/thinlinc/Cheetah/Parser.py:557: SyntaxWarning: invalid escape sequence '\$'
> Dec 29 12:56:48 lab-154.lkpg.cendio.se bash[95267]:   """Unescape any escaped Cheetah \$vars in the string.
> Dec 29 12:56:48 lab-154.lkpg.cendio.se bash[95267]: /opt/thinlinc/modules/thinlinc/Cheetah/SourceReader.py:8: SyntaxWarning: invalid escape sequence '\s'
> Dec 29 12:56:48 lab-154.lkpg.cendio.se bash[95267]:   ENCODINGsearch = re.compile("coding[=:]\s*([-\w.]+)").search
> Dec 29 12:56:48 lab-154.lkpg.cendio.se systemd[1]: Started tlwebadm.service - ThinLinc Web Administration.

Fortunately, it looks like upstream Cheetah has fixed the issue. So all we hopefully need is an upgrade.
Comment 1 Tobias cendio 2024-06-14 10:26:26 CEST
*** Bug 8364 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.