Skip to content

eager_import #33820

@mkoeppe

Description

@mkoeppe

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions