Skip to content

Fix eager import of cftime in _maybe_cast_to_cftimeindex - #11558

Open
peterhron wants to merge 4 commits into
pydata:mainfrom
peterhron:cftime-import
Open

Fix eager import of cftime in _maybe_cast_to_cftimeindex#11558
peterhron wants to merge 4 commits into
pydata:mainfrom
peterhron:cftime-import

Conversation

@peterhron

@peterhron peterhron commented Sep 3, 2026

Copy link
Copy Markdown

Description

Checklist

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR. Tools: {e.g., Claude, Codex, GitHub Copilot, ChatGPT, etc.}

Fixes a regression with eagerly-importing cftime, leading to performance degradation.

@welcome

welcome Bot commented Sep 3, 2026

Copy link
Copy Markdown

Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient.
If you have questions, some answers may be found in our contributing guidelines.

@peterhron peterhron changed the title Cftime import Fix eager import of cftime in _maybe_cast_to_cftimeindex Sep 3, 2026
@Illviljan Illviljan added the run-benchmark Run the ASV benchmark workflow label Sep 3, 2026
@Illviljan

Copy link
Copy Markdown
Contributor

Could you add a test to make sure we dont regress again?

@dcherian dcherian added the plan to merge Final call for comments label Sep 4, 2026
@peterhron

Copy link
Copy Markdown
Author

Could you add a test to make sure we dont regress again?

I have added a simple test in test_indexes. Please have a glance, if you will. Thanks.

@peterhron

Copy link
Copy Markdown
Author

@dcherian thanks for the quick approve, i just added a test and rebased today. Should be good to go, otherwise :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plan to merge Final call for comments run-benchmark Run the ASV benchmark workflow topic-indexing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[PERFORMANCE] object indexes repeatedly attempt to import missing cftime (regression)

4 participants