Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lu-wang-dl committed May 31, 2024
1 parent a98340c commit 4a8c5b0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
include:
- PYSPARK_VERSION: "3.4.0"
PYTHON_VERSION: "3.11"
JOBLIB_VERSION: "1.3.0"
JOBLIB_VERSION: ["1.3.0", "1.4.2"]
- PYSPARK_VERSION: "3.4.0"
PYTHON_VERSION: "3.12"
JOBLIB_VERSION: "1.3.0"
JOBLIB_VERSION: ["1.3.0", "1.4.2"]
exclude:
- PYSPARK_VERSION: "3.0.3"
PIN_MODE: true
Expand Down
16 changes: 9 additions & 7 deletions joblibspark/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,19 @@
import uuid
from packaging.version import Version, parse

import joblib
from joblib.parallel \
import AutoBatchingMixin, ParallelBackendBase, register_parallel_backend, SequentialBackend

if parse(joblib.__version__) >= Version('1.4.0'):
try:
# joblib >=1.4.0
from joblib._utils import _TracebackCapturingWrapper as SafeFunction
elif parse(joblib.__version__) < Version('1.3.0'):
from joblib._parallel_backends import SafeFunction
else:
from joblib._parallel_backends import PoolManagerMixin
SafeFunction = None
except ImportError:
try:
from joblib._parallel_backends import SafeFunction
except ImportError:
# joblib >= 1.3.0
from joblib._parallel_backends import PoolManagerMixin
SafeFunction = None

from py4j.clientserver import ClientServer

Expand Down

0 comments on commit 4a8c5b0

Please sign in to comment.