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

eager_import #33820

Open
mkoeppe opened this issue May 7, 2022 · 0 comments
Open

eager_import #33820

mkoeppe opened this issue May 7, 2022 · 0 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented May 7, 2022

This would be just like lazy_import but actually eager (= equivalent to an ordinary import statement). Hence it would be suitable everywhere, including for importing classes that will be subclassed (see #33384).

On import failures, it would however not raise an error but provide a binding to a LazyImport instance that reports the failure on first use (and can give package installation advice -> discoverability).

We would use this mechanism in sage.all.

CC: @tobiasdiez @kwankyu

Component: refactoring

Issue created by migration from https://trac.sagemath.org/ticket/33820

@mkoeppe mkoeppe added this to the sage-9.7 milestone May 7, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.7, sage-9.8 Aug 1, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.8, sage-9.9 Jan 7, 2023
@mkoeppe mkoeppe removed this from the sage-10.0 milestone Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant