Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning: ‘Py_SetProgramName’ is deprecated #906

Closed
saint-lascivious opened this issue Jun 30, 2023 · 1 comment
Closed

warning: ‘Py_SetProgramName’ is deprecated #906

saint-lascivious opened this issue Jun 30, 2023 · 1 comment

Comments

@saint-lascivious
Copy link

Miscellaneous build noise in python module:

libtool: compile: gcc -I. -Wdate-time -D_FORTIFY_SOURCE=2 -I./../unbound -I/usr/include/python3.11 -DSRCDIR=./../unbound -g -O2 -ffile-prefix-map=/home/saint/source/unbound-out=. -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/google -c util/configlexer.c -o configlexer.o >/dev/null 2>&1 ../unbound/pythonmod/pythonmod.c: In function ‘pythonmod_init’: ../unbound/pythonmod/pythonmod.c:312:7: warning: ‘Py_SetProgramName’ is deprecated [-Wdeprecated-declarations] 312 | Py_SetProgramName(progname); | ^~~~~~~~~~~~~~~~~ In file included from /usr/include/python3.11/Python.h:94, from ../unbound/pythonmod/pythonmod.c:54: /usr/include/python3.11/pylifecycle.h:37:38: note: declared here 37 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetProgramName(const wchar_t *); | ^~~~~~~~~~~~~~~~~

Unbound version and configure string (Debian-ish, with a side of everything):

$ unbound -V
Version 1.17.2

Configure line: --build=aarch64-linux-gnu --prefix=/usr --includedir=/include --mandir=/share/man --infodir=/share/info --sysconfdir=/etc --localstatedir=/var --disable-option-checking --disable-silent-rules --libdir=/lib/aarch64-linux-gnu --libexecdir=/lib/aarch64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --disable-rpath --with-pidfile=/run/unbound.pid --with-rootkey-file=/var/lib/unbound/root.key --with-libevent --with-pythonmodule --enable-subnet --enable-dnstap --enable-systemd --with-chroot-dir= --with-dnstap-socket-path=/run/dnstap.sock --libdir=/usr/lib --disable-flto --enable-cachedb --enable-dnscrypt --enable-ipsecmod --enable-ipset --enable-tfo-client --enable-tfo-server --with-libhiredis --with-libnghttp2
Linked libs: libevent 2.1.12-stable (it uses epoll), OpenSSL 3.0.8 7 Feb 2023
Linked modules: dns64 python cachedb ipsecmod subnetcache ipset respip validator iterator
DNSCrypt feature available
TCP Fastopen feature available

@wcawijngaards
Copy link
Member

Thank you for the report! Python added new python initialization configuration that uses PyInitializeFromConfig. The fix commit adds that and also preinitializes python for the AppendInittab call, for swig. The Py_NoSiteFlag does not seem to be deprecated, but config.site_import is set as well by the commit.

jedisct1 added a commit to jedisct1/unbound that referenced this issue Jul 15, 2023
* nlnet/master: (43 commits)
  - More clear description of the different auth-zone behaviors on the   man page.
  - Merge NLnetLabs#880 from chipitsine: services/authzone.c: remove redundant   check.
  - Merge NLnetLabs#664 from tilan7763: Add prefetch support for subnet cache   entries. - For NLnetLabs#664: Easier code flow for subnetcache prefetching. - For NLnetLabs#664: Add testcase. - For NLnetLabs#664: Rename subnet_prefetch tests to subnet_global_prefetch to   differentiate from the new subnet prefetch support.
  - For NLnetLabs#664: easier code flow for subnetcache prefetching. - For NLnetLabs#664: add testcase.
  - Skip the 00-lint test. splint is not maintained; it either does not   work or produces false positives. Static analysis is handled in the   clang test.
  - For NLnetLabs#802: Cleanup comments and add RCODE check for CD bit test case.
  - Fix dereference of NULL variable warning in mesh_do_callback.
  - Code cleanup for sldns_str2wire_svcparam_key_lookup.
  - Fix NLnetLabs#906: warning: ‘Py_SetProgramName’ is deprecated.
  - For NLnetLabs#739: minor cleanup for testcases.
  - More fixes for reference counting for python module and clean up   failure code.
  - Fix python modules with multiple scripts, by incrementing reference   counts.
  - Remove warning about unknown cast-function-type warning pragma.
  Add changelog and contrib/README mention for NLnetLabs#903 - Merge NLnetLabs#903: contrib: add yocto compatible init script.
  contrib: add yocto compatible init script
  Changelog for NLnetLabs#887 and NLnetLabs#516
  - Properly handle all return values of worker_check_request during   early EDE code. - Do not check the incoming request more than once.
  - Fix for uncertain unit test for doh buffer size events.
  Changelog note for NLnetLabs#895 - Fix NLnetLabs#895: python + sysconfig gives ANOTHER path comparing to   distutils.
  - Merge NLnetLabs#896: Fix: NLnetLabs#895: pythonmodule: add all site-packages   directories to sys.path.
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants