Skip to content
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

fix(python): handle old-style module loaders such that we can still lazy load them #5331

Merged
merged 1 commit into from
Oct 25, 2022
Merged

fix(python): handle old-style module loaders such that we can still lazy load them #5331

merged 1 commit into from
Oct 25, 2022

Conversation

alexander-beedie
Copy link
Collaborator

@alexander-beedie alexander-beedie commented Oct 25, 2022

Closes #5326.


The error comes about because Databricks customises their pandas loader but uses the old-style load_module method (deprecated all the way back in py3.4) instead of the current exec_module. This patch upgrades any loaders like this such that they can be passed into importlib.util.LazyLoader without issue.

Had to sign-up for a "community edition" Databricks environment to prove that this works (see this published notebook) :)


@github-actions github-actions bot added fix Bug fix python Related to Python Polars labels Oct 25, 2022
@ritchie46 ritchie46 merged commit bf77257 into pola-rs:master Oct 25, 2022
@alexander-beedie alexander-beedie deleted the databricks-lazyloader-fix branch October 25, 2022 20:02
zundertj pushed a commit to zundertj/polars that referenced this pull request Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] 0.14.23 cannot be imported on databricks
2 participants