[issue35862] Change the environment for a new process
Tobias Däullary added the comment: Alright, thanks for pointing me in the right direction. I have to conclude that this issue is not present on a current operating system, as I now tried to reproduce with Windows 10 (I came across it on an ancient Windows XP (sic) system - I can just imagine putenv didn't do its job as requested). I suppose this can be closed then! -- ___ Python tracker <https://bugs.python.org/issue35862> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35862] Change the environment for a new process
Tobias Däullary added the comment: Because sometimes when a process is implicitly started by some 3rd party library (i.e. COM via pythonwin here) the "old", unchanged environment is retained as the process itself doesn't care if os.environ was changed or not, the original environment cannot be modified. This solution would give a lot of flexibility in that regard. I think pythonwin is actually a special case as the problem here lies somewhere in the dispatch(.) call. The process creation should be handled somewhere within the COM interface, pywin does nothing there. But this solution effectively circumvents that issue. -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker <https://bugs.python.org/issue35862> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35862] Change the environment for a new process
Change by Tobias Däullary : -- keywords: +patch, patch, patch pull_requests: +11558, 11559, 11560 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35862> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35862] Change the environment for a new process
Change by Tobias Däullary : -- keywords: +patch, patch, patch, patch pull_requests: +11558, 11559, 11560, 11561 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35862> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35862] Change the environment for a new process
Change by Tobias Däullary : -- keywords: +patch, patch pull_requests: +11558, 11559 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35862> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35862] Change the environment for a new process
Change by Tobias Däullary : -- keywords: +patch pull_requests: +11558 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35862> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35862] Change the environment for a new process
New submission from Tobias Däullary : There should be a possibility to change the environment of a process created with multiprocessing. For subprocess this is possible thanks to the "env" attribute. Elaboration: While it is trivial to change os.environ manually, in some cases this is not possible. For instance: creating a COM process on Windows; this process will always inherit the environment of the host process. A workaround is to spawn a python process with a different environment which then will provide this to the child COM process. -- components: Library (Lib) messages: 334591 nosy: r-or priority: normal severity: normal status: open title: Change the environment for a new process type: enhancement versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue35862> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com