Frank Kuehndel created a merge request:
https://gitlab.rtems.org/rtems/docs/rtems-docs/-/merge_requests/103
Project:Branches: frank_k/rtems-docs:fix-python-warnings to
rtems/docs/rtems-docs:main
Author: Frank Kuehndel
## Summary
waf: Fix Python warnings
```
rtems-docs/common/waf.py:111: SyntaxWarning: invalid escape sequence '\D'
ver = tuple(map(int, re.split('[\D]', version)))
rtems-docs/common/waf.py:118: SyntaxWarning: invalid escape sequence '\D'
ver = tuple(map(int, re.split('[\D]', version)))
rtems-docs/common/waf.py:418: SyntaxWarning: invalid escape sequence '\?'
no_hash = re.sub(b'\?v=[a-z0-9]{8}', b'', fp.read())
rtems-docs/common/waf.py:419: SyntaxWarning: invalid escape sequence '\?'
no_digest = re.sub(b'\?digest=[a-z0-9]{20}', b'', no_hash)
rtems-docs/common/latex.py:9: SyntaxWarning: invalid escape sequence '\d'
'\documentclass[a4paper,11pt,english]{report}']
```
Basically, Python keeps wrong `\` but prints a warning. Using "raw" strings
with `re` (regular expressions) is recommended.
What raises some doubts is the use of "binary" strings with `re`. Yet, these
were already in the original code.
Close #58
<!-- Default settings, if it is a dropdown it will set after submission -->
--
View it on GitLab:
https://gitlab.rtems.org/rtems/docs/rtems-docs/-/merge_requests/103
You're receiving this email because of your account on gitlab.rtems.org.
_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs