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

sage.geometry.polyhedron: More lazy imports #31705

Closed
mkoeppe opened this issue Apr 20, 2021 · 10 comments
Closed

sage.geometry.polyhedron: More lazy imports #31705

mkoeppe opened this issue Apr 20, 2021 · 10 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Apr 20, 2021

(from gh-kliem at #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.

CC: @kliem @tscrim @videlec @nbruin

Component: geometry

Keywords: lazy import, startup

Author: Jonathan Kliem

Branch/Commit: 2b886a3

Reviewer: Travis Scrimshaw

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

@mkoeppe mkoeppe added this to the sage-9.4 milestone Apr 20, 2021
@kliem
Copy link
Contributor

kliem commented Apr 21, 2021

Author: Jonathan Kliem

@kliem
Copy link
Contributor

kliem commented Apr 21, 2021

Changed keywords from none to lazy import, startup

@kliem
Copy link
Contributor

kliem commented Apr 21, 2021

Branch: public/31705

@kliem

This comment has been minimized.

@kliem
Copy link
Contributor

kliem commented Apr 21, 2021

Commit: 2b886a3

@kliem
Copy link
Contributor

kliem commented Apr 21, 2021

comment:1

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

@tscrim
Copy link
Collaborator

tscrim commented Apr 21, 2021

comment:3

LGTM.

@tscrim
Copy link
Collaborator

tscrim commented Apr 21, 2021

Reviewer: Travis Scrimshaw

@kliem
Copy link
Contributor

kliem commented Apr 21, 2021

comment:4

Thank you.

@vbraun
Copy link
Member

vbraun commented Jun 19, 2021

Changed branch from public/31705 to 2b886a3

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

4 participants