Skip to content

Several Python is deprecated warnings #47

Description

@librasteve

(base) root@3e1dd9b36003:~# zef install Inline::Python --/test
===> Searching for: Inline::Python
===> Building: Inline::Python:ver<0.5>:authcpan:NINE
[Inline::Python] pyhelper.c: In function ‘py_init_python’:
[Inline::Python] pyhelper.c:19:5: warning: ‘Py_SetProgramName’ is deprecated [-Wdeprecated-declarations]
[Inline::Python] 19 | Py_SetProgramName(L"python");
[Inline::Python] | ^~~~~~~~~~~~~~~~~
[Inline::Python] In file included from /opt/conda/include/python3.11/Python.h:94,
[Inline::Python] from pyhelper.c:1:
[Inline::Python] /opt/conda/include/python3.11/pylifecycle.h:37:38: note: declared here
[Inline::Python] 37 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetProgramName(const wchar_t );
[Inline::Python] | ^~~~~~~~~~~~~~~~~
[Inline::Python] pyhelper.c:23:5: warning: ‘PySys_SetArgv’ is deprecated [-Wdeprecated-declarations]
[Inline::Python] 23 | PySys_SetArgv(_python_argc, _python_argv); /
Tk needs this */
[Inline::Python] | ^~~~~~~~~~~~~
[Inline::Python] In file included from /opt/conda/include/python3.11/Python.h:96,
[Inline::Python] from pyhelper.c:1:
[Inline::Python] /opt/conda/include/python3.11/sysmodule.h:13:38: note: declared here
[Inline::Python] 13 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_SetArgv(int, wchar_t **);
[Inline::Python] | ^~~~~~~~~~~~~
[Inline::Python] pyhelper.c: In function ‘py_string_as_string’:
[Inline::Python] pyhelper.c:146:12: warning: return discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
[Inline::Python] 146 | return PyUnicode_AsUTF8(obj);
[Inline::Python] | ^~~~~~~~~~~~~~~~~~~~~
[Inline::Python] pyhelper.c: In function ‘py_raise_missing_method’:
[Inline::Python] pyhelper.c:262:30: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
[Inline::Python] 262 | char *c_class_name = PyUnicode_AsUTF8(class_name);
[Inline::Python] | ^~~~~~~~~~~~~~~~
[Inline::Python] pyhelper.c: In function ‘perl6_invoke’:
[Inline::Python] pyhelper.c:362:18: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
[Inline::Python] 362 | char * buf = PyUnicode_AsUTF8AndSize(name, &length);
[Inline::Python] | ^~~~~~~~~~~~~~~~~~~~~~~
[Inline::Python] pyhelper.c: In function ‘py_call_method’:
[Inline::Python] pyhelper.c:323:12: warning: ‘py_retval’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[Inline::Python] 323 | return py_retval;
[Inline::Python] | ^~~~~~~~~
===> Building [OK] for Inline::Python:ver<0.5>:authcpan:NINE
===> Staging Inline::Python:ver<0.5>:authcpan:NINE
===> Staging [OK] for Inline::Python:ver<0.5>:authcpan:NINE
===> Installing: Inline::Python:ver<0.5>:authcpan:NINE

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions