Eryk Sun <eryk...@gmail.com> added the comment:
> You mean the CI agent is doing it? Because there's nowhere in > Python that should be doing it. The ProcessParameters->DllPath value is inherited until a process in the tree reverts to the original search path via SetDllDirectoryW(NULL), so it can be any ancestor process, not just the immediate parent process. > I'd rather not blanket change this option in the test suite (except to > turn it on :) ), so that code snippet probably needs to shrink down > into a one-liner that can go with the "-c" just for these tests. The test could call GetDllDirectoryW [1] to save and restore the previous value. Unfortunately, GetDllDirectoryW returns 0 for both the default case (NULL) and when the working directory is disabled by setting an empty string (""). It would have to assume one or the other. Otherwise if you just want a one-liner: "import ctypes; ctypes.windll.kernel32.SetDllDirectoryW(None)". [1]: https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getdlldirectoryw ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40214> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com