]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Fix #426: Replace _Py_fopen() with fopen() in pythonmod.c 427/head
authorVictor Stinner <vstinner@python.org>
Tue, 16 Feb 2021 10:11:06 +0000 (11:11 +0100)
committerVictor Stinner <vstinner@python.org>
Tue, 16 Feb 2021 10:27:52 +0000 (11:27 +0100)
The private _Py_fopen() function has been removed in Python 3.10.

Fix build on Python 3.10.

doc/Changelog
pythonmod/pythonmod.c

index 9ad100145ce327a3918c25a64fd2473e8fff9b90..f855e5a9a21a2f784ffda644b770663e1c2d6d87 100644 (file)
@@ -2,6 +2,7 @@
        - Fix #422: IPv6 fallback issues when IPv6 is not properly
          enabled/configured.
        - Fix to make tests work with support indicators set for iterator.
+       - Fix build on Python 3.10.
 
 10 February 2021: Wouter
        - Merge PR #420 from dyunwei: DOH not responsing with
index 040ff7051e5dabfb11c2e46f5c876ede47bb7271..6e60d02fe4ac6700b35b77d10c7178201d2fa6fe 100644 (file)
@@ -338,7 +338,7 @@ int pythonmod_init(struct module_env* env, int id)
    PyFileObject = PyFile_FromString((char*)pe->fname, "r");
    script_py = PyFile_AsFile(PyFileObject);
 #else
-   script_py = _Py_fopen(pe->fname, "r");
+   script_py = fopen(pe->fname, "r");
 #endif
    if (script_py == NULL)
    {