These doesn't seem to be part of the library but more related to utility scripts. Using raw strings or escaping them will fix this,
find . -iname '*.py' | xargs -P 4 -I{} python3.8 -Wall -m py_compile {}
./docs/conf.py:241: DeprecationWarning: invalid escape sequence \D
'preamble': '\DeclareUnicodeCharacter{00A0}{}',
./tools/mkdoc.py:109: DeprecationWarning: invalid escape sequence \w
cpp_group = '([\w:]+)'
./tools/mkdoc.py:110: DeprecationWarning: invalid escape sequence \[
param_group = '([\[\w:\]]+)'