[issue39931] Global variables are not accessible from child processes (multiprocessing.Pool)

agmt report at bugs.python.org
Wed Mar 11 05:20:52 EDT 2020


New submission from agmt <Quaker542 at gmail.com>:

Attached test works correctly on linux (3.7, 3.8) and mac (only 3.7).
Mac python3.8 falls with exception:

multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "test.py", line 8, in work
    print(F"Work={arg} args={args}")
NameError: name 'args' is not defined
"""

----------
components: Library (Lib), macOS
files: test.py
messages: 363892
nosy: agmt, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Global variables are not accessible from child processes (multiprocessing.Pool)
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file48968/test.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39931>
_______________________________________


More information about the Python-bugs-list mailing list