PyCXX provides interface for Py_UNICODE but the type is deprecated since Python 3.13, so that massive of warnings will be yield.
e.g.
/home/***/FreeCAD/src/CXX/Python3/Objects.hxx:1787:31: warning: ‘Py_UNICODE’ is deprecated [-Wdeprecated-declarations]
1787 | typedef std::basic_string<Py_UNICODE> unicodestring;
| ^~~~~~~~~~
In file included from /usr/include/python3.13/unicodeobject.h:1014,
from /usr/include/python3.13/Python.h:79,
from /home/***/FreeCAD/src/CXX/WrapPython.h:58,
from /home/***/FreeCAD/src/CXX/Objects.hxx:37:
/usr/include/python3.13/cpython/unicodeobject.h:10:37: note: declared here
10 | Py_DEPRECATED(3.13) typedef wchar_t Py_UNICODE;
| ^~~~~~~~~~ /home/***/FreeCAD/src/CXX/Python3/Objects.hxx:1788:44: warning: ‘Py_UNICODE’ is deprecated [-Wdeprecated-declarations] 1788 | extern Py_UNICODE unicode_null_string[1];
| ^
/usr/include/python3.13/cpython/unicodeobject.h:10:37: note: declared here
10 | Py_DEPRECATED(3.13) typedef wchar_t Py_UNICODE;
| ^~~~~~~~~~
/home/***/FreeCAD/src/CXX/Python3/Objects.hxx:1983:28: warning: ‘Py_UNICODE’ is deprecated [-Wdeprecated-declarations]
1983 | Char( Py_UNICODE v )
| ^
/usr/include/python3.13/cpython/unicodeobject.h:10:37: note: declared here 10 | Py_DEPRECATED(3.13) typedef wchar_t Py_UNICODE;
| ^~~~~~~~~~
/home/***/FreeCAD/src/CXX/Python3/Objects.hxx:2029:39: warning: ‘Py_UNICODE’ is deprecated [-Wdeprecated-declarations]
2029 | Char &operator=( Py_UNICODE v )
| ^
/usr/include/python3.13/cpython/unicodeobject.h:10:37: note: declared here
10 | Py_DEPRECATED(3.13) typedef wchar_t Py_UNICODE;
There is code that uses Py_UNICODE which means that the warning are expected.
Once Py_UNICODE is removed from the API then I will #if use of Py_UNICODE to older python versions that support it.
But until then the warning will be present unless you know a way to supress them?
Yes, the warnings are always appeared and very noisy even if the program doesn't use Py_UNICODE interface. It is very helpful if adding #if switch to suppress them.
There are compiler options to disable reporting deprecation warning.
Check your compiler docs to see what the option is and add it to your build.