first commit

This commit is contained in:
Carla Floricel
2022-08-02 09:52:52 -04:00
parent 417ea8660b
commit 05e52aa52b
10444 changed files with 2300232 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
from sys import version_info
from warnings import warn
from . import _deprecated_my_exceptions
"""
Exceptions
"""
# Author: Gael Varoquaux < gael dot varoquaux at normalesup dot org >
# Copyright: 2010, Gael Varoquaux
# License: BSD 3 clause
_deprecated_names = [
name for name in dir(_deprecated_my_exceptions) if
not name.startswith("__")
]
if version_info[:2] >= (3, 7):
def __getattr__(name):
if not name.startswith("__") and name in _deprecated_names:
warn("{} is deprecated and will be removed from joblib "
"in 0.16".format(name), DeprecationWarning)
return getattr(_deprecated_my_exceptions, name)
raise AttributeError
else:
for name in _deprecated_names:
globals()[name] = getattr(_deprecated_my_exceptions, name)
class WorkerInterrupt(Exception):
""" An exception that is not KeyboardInterrupt to allow subprocesses
to be interrupted.
"""
pass