-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
[ArrowStringArray] ENH: raise an ImportError when trying to create an arrow string dtype if pyarrow is not installed #41732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… arrow string dtype if pyarrow is not installed
|
||
|
||
@pytest.mark.skipif( | ||
pa_version_under1p0, | ||
reason="pyarrow>=1.0.0 is required for PyArrow backed StringArray", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should the numpy test still run?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self._dtype = ArrowStringDtype() is defined in __init__ before the input is checked. creating an instance ArrowStringDtype now raises an ImportError, tested in the test added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually we checked pyarrow was availble before with self._chk_pyarrow_available()
but this module was skipped with pytest.importorskip("pyarrow", minversion="1.0.0")
this ok before #39908 ? @simonjayhawkins |
either, conflicts either way. (just wanted to keep this change separate) |
thanks @simonjayhawkins |
… arrow string dtype if pyarrow is not installed (pandas-dev#41732)
… arrow string dtype if pyarrow is not installed (pandas-dev#41732)
xref #39908 (comment)