gnuradio / volk

The Vector Optimized Library of Kernels
http://libvolk.org
GNU Lesser General Public License v3.0
557 stars 202 forks source link

Warnings with Python 3.12 #763

Closed drmpeg closed 5 months ago

drmpeg commented 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))"

- "import re; print(re.sub('\\W', '_', '${have_flag}'))" + "import re; print(re.sub(r'\\W', '_', '${have_flag}'))"

jdemel commented 5 months ago

@drmpeg thanks for the report. Would you mind to open a Pull Request with these 2 changes?