Skip to content

Commit 8ca58ea

Browse files
committed
use ImportError
1 parent 03dd397 commit 8ca58ea

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

pandas/core/arrays/_mask.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def get_mask_array_type():
3131
class MaskArray(_MaskArray, ArrowBoolArray):
3232
pass
3333

34-
except (ModuleNotFoundError, ImportError):
34+
except ImportError:
3535
from pandas.core.arrays._numpy_bool import NumpyBoolArray
3636

3737
class MaskArray(_MaskArray, NumpyBoolArray):

pandas/core/arrays/_pyarrow_bool.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@
1616
from pandas.api.extensions import (
1717
ExtensionArray, ExtensionDtype, register_extension_dtype, take)
1818

19+
20+
# we require pyarrow >= 0.10.0
21+
1922
try:
2023
import pyarrow as pa
2124
if pa.__version__ < LooseVersion('0.10.0'):
2225
raise ImportError("pyarrow minimum for bool suppport is 0.10.0")
23-
except ModuleNotFoundError:
26+
except ImportError:
2427
raise
2528

2629

0 commit comments

Comments
 (0)