New submission from Pox TheGreat :
Using the LazyLoader class one can modify the sys.meta_path finders so that
every import mechanism becomes lazy. This method has been used in Mercurial and
by Facebook.
My problem is that if I have a package (pa) which imports a submodule (a) in
the
Pox TheGreat added the comment:
I have already uploaded a patch file but it is not in the required format. Also
I realize that most of the confusion was because I forgot to provide the OS
version. Perhaps it would be good to have a separate field for that.
I will upload a patch as it is
Pox TheGreat added the comment:
Retested it with a freshly installed 3.6.4 version. Used the following code to
test:
import sys
import multiprocessing
def foo():
return 'bar'
if __name__ == '__main__':
proc = multiprocessing.Process(target=foo)
proc.s
Pox TheGreat added the comment:
Unfortunately this is NOT a duplicate of https://bugs.python.org/issue28326.
That issue is about a closed output stream. In that case sys.stdout and
sys.stderr are file like objects which have been closed.
This issue is about sys.stdout and sys.stderr being
New submission from Pox TheGreat :
If you start Python by pythonw then sys.stdout and sys.stderr are set to None.
If you also use multiprocessing then when the child process finishes
BaseProcess._bootstrap calls sys.stdout.flush() and sys.stderr.flush() finally.
This causes the process return