[Libreoffice-bugs] [Bug 138987] New: Deprecation warnings when building against Python 3.9

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Dec 17 07:41:57 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=138987

            Bug ID: 138987
           Summary: Deprecation warnings when building against Python 3.9
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: framework
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: d.ostrovsky at gmx.de

I'm seeing deprecation warnings when building against system Python 3.9:

/home/davido/projects/libreoffice/pyuno/source/module/pyuno_type.cxx: In
function ‘sal_Unicode pyuno::PyChar2Unicode(PyObject*)’:
/home/davido/projects/libreoffice/pyuno/source/module/pyuno_type.cxx:141:79:
error: ‘Py_UNICODE* PyUnicode_AsUnicode(PyObject*)’ is deprecated
[-Werror=deprecated-declarations]
  141 |     sal_Unicode c = static_cast<sal_Unicode>(PyUnicode_AsUnicode(
value.get() )[0]);
      |                                                                        
      ^
In file included from /usr/include/python3.9/unicodeobject.h:1026,
                 from /usr/include/python3.9/Python.h:97,
                 from
/home/davido/projects/libreoffice/pyuno/source/module/pyuno_impl.hxx:27,
                 from
/home/davido/projects/libreoffice/pyuno/source/module/pyuno_type.cxx:19:
/usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
  580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
/home/davido/projects/libreoffice/pyuno/source/module/pyuno_type.cxx: In
function ‘PyObject* pyuno::PyUNO_char_new(sal_Unicode, const pyuno::Runtime&)’:
/home/davido/projects/libreoffice/pyuno/source/module/pyuno_type.cxx:272:66:
error: ‘PyObject* PyUnicode_FromUnicode(const Py_UNICODE*, Py_ssize_t)’ is
deprecated [-Werror=deprecated-declarations]
  272 |     PyTuple_SetItem( args.get() , 0 , PyUnicode_FromUnicode( u ,1) );
      |                                                                  ^
In file included from /usr/include/python3.9/unicodeobject.h:1026,
                 from /usr/include/python3.9/Python.h:97,
                 from
/home/davido/projects/libreoffice/pyuno/source/module/pyuno_impl.hxx:27,
                 from
/home/davido/projects/libreoffice/pyuno/source/module/pyuno_type.cxx:19:
/usr/include/python3.9/cpython/unicodeobject.h:551:42: note: declared here
  551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
      |                                          ^~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
[build PRL] CustomTarget/postprocess/images/images_karasa_jaga.zip
[build PRL] CustomTarget/postprocess/images/images_karasa_jaga_svg.zip
[build PRL] CustomTarget/postprocess/images/images_sifr.zip
[build PRL] CustomTarget/postprocess/images/images_sifr_dark.zip
make[1]: ***
[/home/davido/projects/libreoffice/solenv/gbuild/LinkTarget.mk:298:
/home/davido/projects/libreoffice/workdir/CxxObject/pyuno/source/module/pyuno_type.o]
Error 1
make[1]: *** Waiting for unfinished jobs....
/home/davido/projects/libreoffice/pyuno/source/module/pyuno_module.cxx: In
function ‘PyObject* PyInit_pyuno()’:
/home/davido/projects/libreoffice/pyuno/source/module/pyuno_module.cxx:886:24:
error: ‘void PyEval_InitThreads()’ is deprecated
[-Werror=deprecated-declarations]
  886 |     PyEval_InitThreads();
      |                        ^
In file included from /usr/include/python3.9/Python.h:145,
                 from
/home/davido/projects/libreoffice/pyuno/source/module/pyuno_impl.hxx:27,
                 from
/home/davido/projects/libreoffice/pyuno/source/module/pyuno_module.cxx:22:
/usr/include/python3.9/ceval.h:130:37: note: declared here
  130 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
      |                                     ^~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
/home/davido/projects/libreoffice/pyuno/source/loader/pyuno_loader.cxx: In
function ‘void pyuno_loader::{anonymous}::pythonInit()’:
/home/davido/projects/libreoffice/pyuno/source/loader/pyuno_loader.cxx:219:24:
error: ‘void PyEval_InitThreads()’ is deprecated
[-Werror=deprecated-declarations]
  219 |     PyEval_InitThreads();
      |                        ^
In file included from /usr/include/python3.9/Python.h:145,
                 from /home/davido/projects/libreoffice/pyuno/inc/pyuno.hxx:23,
                 from
/home/davido/projects/libreoffice/pyuno/source/loader/pyuno_loader.cxx:23:
/usr/include/python3.9/ceval.h:130:37: note: declared here
  130 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
      |                                     ^~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[1]: ***
[/home/davido/projects/libreoffice/solenv/gbuild/LinkTarget.mk:298:
/home/davido/projects/libreoffice/workdir/CxxObject/pyuno/source/loader/pyuno_loader.o]
Error 1
make[1]: ***
[/home/davido/projects/libreoffice/solenv/gbuild/LinkTarget.mk:298:
/home/davido/projects/libreoffice/workdir/CxxObject/pyuno/source/module/pyuno_module.o]
Error 1
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note:
/home/davido/projects/libreoffice/ridljar/com/sun/star/lib/util/WeakMap.java
uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
make: *** [Makefile:283: build] Error 2
[davido at localhost libreoffice]$
/home/davido/projects/libreoffice/pyuno/source/module/pyuno_type.cxx: In
function ‘sal_Unicode pyuno::PyChar2Unicode(PyObject*)’:

Libreoffice commit: 11382ccf2ff58ba470dfa604654685730e0411f8

gcc --version:

gcc (GCC) 11.0.0 20201204

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20201217/a999032c/attachment.htm>


More information about the Libreoffice-bugs mailing list