Closed drmpeg closed 5 months ago
With Python 3.12 (on Ubuntu 24.04), some new warnings have appeared.
<string>:1: SyntaxWarning: invalid escape sequence '\W'
It seems that the strings located here:
https://github.com/gnuradio/volk/blob/main/cmake/Modules/VolkPython.cmake#L147
and here:
https://github.com/gnuradio/volk/blob/main/lib/CMakeLists.txt#L108
need to made "raw". Like so:
-print(re.sub('\\W', '_', '${desc} ${reldir} ' + unique))" +print(re.sub(r'\\W', '_', '${desc} ${reldir} ' + unique))"
-print(re.sub('\\W', '_', '${desc} ${reldir} ' + unique))"
+print(re.sub(r'\\W', '_', '${desc} ${reldir} ' + unique))"
- "import re; print(re.sub('\\W', '_', '${have_flag}'))" + "import re; print(re.sub(r'\\W', '_', '${have_flag}'))"
- "import re; print(re.sub('\\W', '_', '${have_flag}'))"
+ "import re; print(re.sub(r'\\W', '_', '${have_flag}'))"
@drmpeg thanks for the report. Would you mind to open a Pull Request with these 2 changes?
With Python 3.12 (on Ubuntu 24.04), some new warnings have appeared.
<string>:1: SyntaxWarning: invalid escape sequence '\W'
It seems that the strings located here:
https://github.com/gnuradio/volk/blob/main/cmake/Modules/VolkPython.cmake#L147
and here:
https://github.com/gnuradio/volk/blob/main/lib/CMakeLists.txt#L108
need to made "raw". Like so:
-print(re.sub('\\W', '_', '${desc} ${reldir} ' + unique))"
+print(re.sub(r'\\W', '_', '${desc} ${reldir} ' + unique))"
- "import re; print(re.sub('\\W', '_', '${have_flag}'))"
+ "import re; print(re.sub(r'\\W', '_', '${have_flag}'))"