Skip to content

ENH: raise ImportError if pyarrow is not defined when using ArrowDtyp… #58046

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

dataxerik
Copy link
Contributor

@@ -2271,6 +2271,9 @@ def construct_from_string(cls, string: str) -> ArrowDtype:
"instance with specific parameters."
) from err
raise TypeError(f"'{base_type}' is not a valid pyarrow data type.") from err
except NameError as err:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a fairly fragile fix if a refactor happens. Somewhere import_optional_dependency should be used instead

@mroeschke mroeschke added the Arrow pyarrow functionality label Apr 1, 2024
Copy link
Contributor

github-actions bot commented May 2, 2024

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label May 2, 2024
@mroeschke
Copy link
Member

Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.

@mroeschke mroeschke closed this May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arrow pyarrow functionality Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: Improve error message when specifying dtype="float32[pyarrow]" while PyArrow is not installed
2 participants