Skip to content

Remove use of SAGE_LIB in sage.misc #33821

@mkoeppe

Description

@mkoeppe

We delay importing lazy_import_cache until a lazy star import is done (which the Sage library never does).

We change two copies of essentially the same code that tries to use SAGE_SRC and SAGE_LIB to turn a source filename to a qualified package name so that

  • it does not fail when sage.env.SAGE_SRC cannot be imported or is empty
  • it replaces the use of SAGE_LIB by using sage.__path__ (to handle namespace packages correctly)

part of Meta-ticket #33037 (Remove use of SAGE_LIB and SAGE_EXTCODE variables)

Depends on #33793

CC: @kiwifb @antonio-rojas @tornaria

Component: refactoring

Author: Matthias Koeppe

Branch/Commit: 748d9fb

Reviewer: François Bissey

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions