Skip to content

REF: Avoid importing xlrd #57708

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
merged 1 commit into from
Mar 5, 2024

Conversation

rhshadrach
Copy link
Member

Not sure how I'd add a test here.

@rhshadrach rhshadrach added Refactor Internal refactoring of code IO Excel read_excel, to_excel Dependencies Required and optional dependencies labels Mar 2, 2024
@rhshadrach rhshadrach added this to the 3.0 milestone Mar 2, 2024
@jbrockmendel
Copy link
Member

Could check sys.modules for presence of xlrd?

@rhshadrach
Copy link
Member Author

Could check sys.modules for presence of xlrd?

True; since that's global I think it'd have to check it in a subprocess. It seems to me a bit of an odd thing to test - unless we think we should have more testing that we don't import an optional dependency if it's not used more generally. Are we okay foregoing a test here?

@jbrockmendel
Copy link
Member

jbrockmendel commented Mar 4, 2024 via email

@mroeschke mroeschke merged commit af354c3 into pandas-dev:main Mar 5, 2024
@mroeschke
Copy link
Member

Thanks @rhshadrach

@rhshadrach rhshadrach deleted the ref_avoid_importing_xlrd branch March 5, 2024 00:32
pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependencies Required and optional dependencies IO Excel read_excel, to_excel Refactor Internal refactoring of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pandas.read_excel 'Can't determine version for xlrd' - old bug on pandas-2.1
3 participants