[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2018-03-11 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This is all fixed in the Python 3 branches now.  I won't bother with Python 2 
as it has quite a different code structure and backporting would take too much 
of my time.

Pox TheGreat, thanks for reporting and the initial patch!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2018-03-11 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset 069b8d20be8018fbd49ed5aaf64c4caba311e48f by Antoine Pitrou in 
branch '3.6':
[3.6] bpo-31804: Fix multiprocessing.Process with broken standard streams 
(GH-6079) (GH-6081)
https://github.com/python/cpython/commit/069b8d20be8018fbd49ed5aaf64c4caba311e48f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2018-03-11 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset ff5d21331ec6cefec6ba5b78d256d8dbcd67a069 by Antoine Pitrou (Miss 
Islington (bot)) in branch '3.7':
bpo-31804: Fix multiprocessing.Process with broken standard streams (GH-6079) 
(GH-6080)
https://github.com/python/cpython/commit/ff5d21331ec6cefec6ba5b78d256d8dbcd67a069


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2018-03-11 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
versions: +Python 3.8 -Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2018-03-11 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
pull_requests: +5842

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2018-03-11 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5841

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2018-03-11 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset e756f66c83786ee82f5f7d45931ae50a6931dd7f by Antoine Pitrou in 
branch 'master':
bpo-31804: Fix multiprocessing.Process with broken standard streams (#6079)
https://github.com/python/cpython/commit/e756f66c83786ee82f5f7d45931ae50a6931dd7f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2018-03-11 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
superseder: multiprocessing.Process depends on sys.stdout being open -> 

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2018-03-11 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
pull_requests: +5840

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2018-02-02 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +5325
stage: resolved -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2018-01-12 Thread Pox TheGreat

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 described in the developer guide.

--
type: crash -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2018-01-10 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I'm not using Windows, so I'm unable to test using pythonw.  You'll have to 
provide a fix, or someone else will have to.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2018-01-10 Thread Pox TheGreat

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.start()
proc.join()
with open('process_exit_code.txt', 'w') as f:
f.write(sys.version)
f.write('\nprocess exit code: ')
f.write(str(proc.exitcode))

It is very important to run the script with pythonw, not just with python. This 
is the content of the resulting process_exit_code.txt file on my machine:
3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)]
process exit code: 1

As it can be seen the problem was not fixed. The process exit code should be 0. 
By default the new multiprocessing process created uses the same interpreter as 
the creator process, so it uses pythonw too.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2018-01-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Pox, please retest with either 3.6.4 or 3.7.0a3 (or .0a4 when released, soon).  
Both were released after the merge that should fix this.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2018-01-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

@Pox, nevertheless, the fix committed in 
https://github.com/python/cpython/pull/4073 should also fix this issue. Do you 
disagree?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2018-01-09 Thread Pox TheGreat

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 None! This is because 
pythonw was used not python.

--
resolution: duplicate -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2017-10-20 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This looks to be a duplicate of https://bugs.python.org/issue28326

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> multiprocessing.Process depends on sys.stdout being open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2017-10-20 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
versions: +Python 2.7, Python 3.6, Python 3.7 -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2017-10-20 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
nosy: +davin, pitrou, terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2017-10-17 Thread Pox TheGreat

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 code to be not zero (it is 1).

--
components: Library (Lib)
files: process.py.patch
keywords: patch
messages: 304512
nosy: Pox TheGreat
priority: normal
severity: normal
status: open
title: multiprocessing calls flush on sys.stdout at exit even if it is None 
(pythonw)
type: crash
versions: Python 3.5
Added file: https://bugs.python.org/file47224/process.py.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com