#31705 closed enhancement (fixed)

sage.geometry.polyhedron: More lazy imports

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-9.4
Component: geometry Keywords: lazy import, startup
Cc: gh-kliem, tscrim, vdelecroix, nbruin Merged in:
Authors: Jonathan Kliem Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 2b886a3 (Commits, GitHub, GitLab) Commit: 2b886a3ad4185761305772694831031b02153b03
Dependencies: Stopgaps:

Status badges

Description (last modified by gh-kliem)

(from gh-kliem at https://trac.sagemath.org/ticket/27366#comment:51)

Apparently sage.geometry.polyhedron.base is a startup module, which is terrible. We add lazy imports at two all.py files to fix this:

  • sage/schemes/toric/all.py
  • sage/geometry/all

Note some modules are not startup modules anymore as desired. In particular sage.geometry.cones is not a startup-modules anymore.

Change History (5)

comment:1 Changed 16 months ago by gh-kliem

  • Authors set to Jonathan Kliem
  • Branch set to public/31705
  • Commit set to 2b886a3ad4185761305772694831031b02153b03
  • Description modified (diff)
  • Keywords lazy import startup added
  • Status changed from new to needs_review

Do I need a deprecation warning that something as sage.geometry.cone won't work anymore without prior loading?

New commits:

2b886a3do not import sage.geometry.polyhedron.base at startup

comment:2 Changed 16 months ago by mkoeppe

  • Cc tscrim vdelecroix nbruin added

comment:3 Changed 16 months ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review


comment:4 Changed 16 months ago by gh-kliem

Thank you.

comment:5 Changed 14 months ago by vbraun

  • Branch changed from public/31705 to 2b886a3ad4185761305772694831031b02153b03
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.