Skip to content

fix: updated imports for polars extension 1.0­.0#1031

Merged
elijahbenizzy merged 1 commit intomainfrom
fix/polars-plugin-1.0.0
Jul 17, 2024
Merged

fix: updated imports for polars extension 1.0­.0#1031
elijahbenizzy merged 1 commit intomainfrom
fix/polars-plugin-1.0.0

Conversation

@zilto
Copy link
Contributor

@zilto zilto commented Jul 17, 2024

Polars upgrading to >= 1.0.0 introduced breaking changes, in particular going from polars.typing_aliases to polars._typing.

venv/lib/python3.11/site-packages/hamilton/plugins/polars_post_1_0_0_extension.py:597: DeprecationWarning: The polars.type_aliases module is deprecated. The type aliases have moved to the polars._typing module to explicitly mark them as private. Please define your own type aliases, or temporarily import from the polars._typing module. A public polars.typing module will be added in the future.
from polars.type_aliases import ColumnTotalsDefinition, RowTotalsDefinition

We made changes accordingly, but missed two imports that were within a materializer definition. The warning is triggered when the materializer is registered during extension loading. This explains why we missed it and it wasn't covered by our tests.

Also, I renamed polars_post_1_0_0_extension.py to the plural polars_post_1_0_0_extensions.py to match convention.

@zilto zilto added bug Something isn't working plugin Relates to a Hamilton plugin (adapters, materializers, etc.) labels Jul 17, 2024
@zilto zilto requested a review from elijahbenizzy July 17, 2024 14:33
@zilto zilto changed the title updated deprecated type_aliases import; renamed to match convention fix: updated imports for polars extension 1.0­.0 Jul 17, 2024
Copy link
Contributor

@elijahbenizzy elijahbenizzy left a comment

Choose a reason for hiding this comment

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

Thanks for the fix

@elijahbenizzy elijahbenizzy merged commit a2a8a8c into main Jul 17, 2024
@elijahbenizzy elijahbenizzy deleted the fix/polars-plugin-1.0.0 branch July 17, 2024 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working plugin Relates to a Hamilton plugin (adapters, materializers, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants