This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author moi90
Recipients moi90
Date 2020-08-13.09:42:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I experience a problem with multiprocessing and print.

I tried to make a minimal working example, please see the attached file.

WITHOUT the offending print statement in the queue filler thread, everything works:
- pytest experiments/
- pytest experiments/ -s
- python experiments/

WITH the offending print statement, not so much:
- pytest experiments/ WORKS (Probably because pytest captures fd 1)
- pytest experiments/ -s FAILS eventually (after a couple of workers have been started)
- python experiments/ FAILS eventually (same).

WITH the offending print statement AND PYTHONUNBUFFERED=1, everything works again:
- pytest experiments/
- pytest experiments/ -s
- python experiments/

Ubuntu 18.04.5 LTS
python 3.8.5 (hcff3b4d_1) on conda 4.8.3
Date User Action Args
2020-08-13 09:42:10moi90setrecipients: + moi90
2020-08-13 09:42:10moi90setmessageid: <>
2020-08-13 09:42:10moi90linkissue41539 messages
2020-08-13 09:42:10moi90create