Skip to content

BUG: fix inspect usage when pyarrow or jinja2 is not installed #60196

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

Merged

Conversation

jorisvandenbossche
Copy link
Member

@jorisvandenbossche jorisvandenbossche commented Nov 5, 2024

This started with trying to fix the xfail when using the string dtype without pyarrow installed, but in practice this was not related to the string dtype, but just to pyarrow not being available (and apparently we only test that case in the build with the future string dtype enabled?).

We need to ensure to return an AttributeError instead of ImportError when accessing attributes on Series/DataFrame, and then inspect.getmembers will ignore that error.

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

@jorisvandenbossche jorisvandenbossche added this to the 2.3 milestone Nov 5, 2024
@mroeschke mroeschke merged commit 169b00e into pandas-dev:main Nov 5, 2024
50 of 51 checks passed
@mroeschke
Copy link
Member

Thanks @jorisvandenbossche

meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Nov 5, 2024
@jorisvandenbossche jorisvandenbossche deleted the fix-inspect-without-pyarrow branch November 5, 2024 20:00
jorisvandenbossche added a commit that referenced this pull request Nov 5, 2024
…ow or jinja2 is not installed) (#60201)

Backport PR #60196: BUG: fix inspect usage when pyarrow or jinja2 is not installed

Co-authored-by: Joris Van den Bossche <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants