STINNER Victor <vstin...@redhat.com> added the comment:

> When Py_SetPath is used to set up module path at initialization, the 
> Py_SetPath causes getpathp.c::calculate_path not to be called. However, 
> calculate path is the only function calling getpathp.c::get_progpath which 
> initializes the local dllpath static variable.

I fixed this issue in Python 3.8 with this commit:

commit 410759fba80aded5247b693c60745aa16906f3bb
Author: Victor Stinner <vstin...@redhat.com>
Date:   Sat May 18 04:17:01 2019 +0200

    bpo-36763: Remove _PyCoreConfig.dll_path (GH-13402)

I modified Py_SetPath() like that:

-    new_config.dll_path = _PyMem_RawWcsdup(L"");
+    new_config.dll_path = _Py_GetDLLPath();

Py_SetPath() no longer sets dll_path to an empty string.

Since we only got one bug report and I believe that Tibor Csonka found a way to 
workaround the issue since he reported it, I close the issue.

Please reopen/comment the issue if you would like to get this issue fixed in 
Python 3.7 as well.

--

Moreover, the PEP 587 now has a better API to configure embedded Python. I just 
implemented this PEP in bpo-36763.

----------
nosy: +vstinner

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue29778>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to