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

refactor(python): Reduce number of polars.internals imports #7628

Merged
merged 2 commits into from
Mar 21, 2023

Conversation

zundertj
Copy link
Collaborator

In most cases, we just need the type annotation, in TYPE_CHECKING blocks you can just import. And in other cases, the import actually works. Only did this for modules that are outside the DataFrame/Series/Expr objects, such as testing and utils.

@zundertj zundertj changed the title Reduce number of polars.internals usages Reduce number of polars.internals imports Mar 18, 2023
py-polars/polars/io/csv.py Outdated Show resolved Hide resolved
@stinodego
Copy link
Contributor

Some nice changes 👍 CI fails due some issue with arrow; I updated the lockfile, if you rebase CI should pass.

Please see #7638 - the changes to the io module won't work now that some of the internals IO functionality has moved there.

@zundertj zundertj changed the title Reduce number of polars.internals imports refactor(python): Reduce number of polars.internals imports Mar 19, 2023
@github-actions github-actions bot added python Related to Python Polars refactor Code improvements that do not change functionality labels Mar 19, 2023
@stinodego
Copy link
Contributor

@zundertj Could you rebase this? I'd like to get the changes in _html, sql, testing, and utils in there :)

In most cases, we just need the type annotation, in TYPE_CHECKING blocks you can just import. And in other cases, the import actually works. Only did this for modules that are outside the DataFrame/Series/Expr objects, such as testing and utils.
@zundertj zundertj force-pushed the reduce_internals_imports branch from a7868d9 to a0f0b3d Compare March 21, 2023 19:18
@zundertj
Copy link
Collaborator Author

zundertj commented Mar 21, 2023

Done. @stinodego you have probably done quite a few of these changes in other MR's, feel free to power on and ignore this. I dont have that much time on my hands at the moment..

@stinodego stinodego merged commit 2ced395 into pola-rs:master Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Related to Python Polars refactor Code improvements that do not change functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants