mirror of https://github.com/python/cpython
gh-114807: multiprocessing: don't raise ImportError if _multiprocessing is missing (#114808)
`_multiprocessing` is only used under the `if _winapi:` block, this moves the import to be within the `_winapi` ImportError handling try/except for equivalent treatment.
This commit is contained in:
parent
1b89591474
commit
4b75032c88
|
@ -19,7 +19,6 @@ import time
|
|||
import tempfile
|
||||
import itertools
|
||||
|
||||
import _multiprocessing
|
||||
|
||||
from . import util
|
||||
|
||||
|
@ -28,6 +27,7 @@ from .context import reduction
|
|||
_ForkingPickler = reduction.ForkingPickler
|
||||
|
||||
try:
|
||||
import _multiprocessing
|
||||
import _winapi
|
||||
from _winapi import WAIT_OBJECT_0, WAIT_ABANDONED_0, WAIT_TIMEOUT, INFINITE
|
||||
except ImportError:
|
||||
|
|
Loading…
Reference in New Issue