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

CLN: Lazy import pyarrow #420

Merged
merged 1 commit into from
Jan 16, 2024
Merged

CLN: Lazy import pyarrow #420

merged 1 commit into from
Jan 16, 2024

Conversation

janbjorge
Copy link
Contributor

@janbjorge janbjorge commented Jan 15, 2024

Im not 100% sure if this is better, i just hate it when you have to track two variables.

This might also be an option, but its a bit much for this case i thing.

https://docs.python.org/3/library/importlib.html#implementing-lazy-imports

@janbjorge janbjorge marked this pull request as ready for review January 15, 2024 14:52
@janbjorge janbjorge self-assigned this Jan 15, 2024
Copy link
Collaborator

@mferrera mferrera left a comment

Choose a reason for hiding this comment

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

Nice

Copy link
Collaborator

@jcrivenaes jcrivenaes left a comment

Choose a reason for hiding this comment

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

Or just having pyarrow as a primary requirement? Do you remember the reason fot this HAS_PYARROW construct, @perolavsvendsen ?

@perolavsvendsen
Copy link
Member

Or just having pyarrow as a primary requirement? Do you remember the reason fot this HAS_PYARROW construct, @perolavsvendsen ?

Legacy from when we had to support older Python versions?

@perolavsvendsen
Copy link
Member

Or just having pyarrow as a primary requirement? Do you remember the reason fot this HAS_PYARROW construct, @perolavsvendsen ?

Legacy from when we had to support older Python versions?

Looked at the history but could not find any information on this. Part of larger refactoring, and details are lost I guess 🤷‍♂️ I will stick to the hypothesis that this is old Python version support and that we can move on from this now 👍

@mferrera
Copy link
Collaborator

mferrera commented Jan 16, 2024

When I looked at the commit history it seemed it was added when support for Python 3.6 was added. I also checked the RMS Python environment and pyarrow is present there, as well as being a dependency in this package, so I think this change is fine.

@janbjorge
Copy link
Contributor Author

When I looked at the commit history it seemed it was added when support for Python 3.6 was added. I also checked the RMS Python environment and pyarrow is present there, as well as being a dependency in this package, so I think this change is fine.

NIce, thanks for checking.

@janbjorge janbjorge merged commit 5bcc749 into equinor:main Jan 16, 2024
12 checks passed
@janbjorge janbjorge deleted the local-lazy-import-pyarrow branch January 20, 2024 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants