Skip to content

Lazy imports based on __import__ #22752

@jdemeyer

Description

@jdemeyer

Implement lazy imports by overriding import.

To be used as

from sage.misc.lazy_import import _lazyimport_

with _lazyimport_:
    from sage.all import ZZ

Unlike the existing lazy import implementation, this supports both Python and Cython.

Depends on #22755

Component: misc

Author: Jeroen Demeyer

Branch/Commit: u/jdemeyer/ticket/22752 @ 9e1208b

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

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