Uploaded Test files
This commit is contained in:
parent
f584ad9d97
commit
2e81cb7d99
16627 changed files with 2065359 additions and 102444 deletions
41
venv/Lib/site-packages/joblib/externals/loky/backend/compat.py
vendored
Normal file
41
venv/Lib/site-packages/joblib/externals/loky/backend/compat.py
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
###############################################################################
|
||||
# Compat file to import the correct modules for each platform and python
|
||||
# version.
|
||||
#
|
||||
# author: Thomas Moreau and Olivier grisel
|
||||
#
|
||||
import sys
|
||||
|
||||
PY3 = sys.version_info[:2] >= (3, 3)
|
||||
|
||||
if PY3:
|
||||
import queue
|
||||
else:
|
||||
import Queue as queue
|
||||
|
||||
if sys.version_info >= (3, 4):
|
||||
from multiprocessing.process import BaseProcess
|
||||
else:
|
||||
from multiprocessing.process import Process as BaseProcess
|
||||
|
||||
# Platform specific compat
|
||||
if sys.platform == "win32":
|
||||
from .compat_win32 import wait
|
||||
else:
|
||||
from .compat_posix import wait
|
||||
|
||||
|
||||
def set_cause(exc, cause):
|
||||
exc.__cause__ = cause
|
||||
|
||||
if not PY3:
|
||||
# Preformat message here.
|
||||
if exc.__cause__ is not None:
|
||||
exc.args = ("{}\n\nThis was caused directly by {}".format(
|
||||
exc.args if len(exc.args) != 1 else exc.args[0],
|
||||
str(exc.__cause__)),)
|
||||
|
||||
return exc
|
||||
|
||||
|
||||
__all__ = ["queue", "BaseProcess", "set_cause", "wait"]
|
Loading…
Add table
Add a link
Reference in a new issue