Ticket #11763: trac_11763_lazy_import.patch

File trac_11763_lazy_import.patch, 1.4 KB (added by vbraun, 7 years ago)

Improved patch

  • sage/categories/all.py

    # HG changeset patch
    # User Volker Braun <vbraun@stp.dias.ie>
    # Date 1352174417 18000
    # Node ID 882e193d6cfe73fb758832a2255ecf8365d9a33d
    # Parent  4d74b3c885558318f735d0f2f90c73ddc85414c7
    Lazily import Polyhedron
    
    diff --git a/sage/categories/all.py b/sage/categories/all.py
    a b  
    129129from classical_crystals import ClassicalCrystals
    130130
    131131# polyhedra
    132 from polyhedra import PolyhedralSets
     132from sage.misc.lazy_import import lazy_import
     133lazy_import('sage.categories.polyhedra', 'PolyhedralSets')
  • sage/combinat/root_system/all.py

    diff --git a/sage/combinat/root_system/all.py b/sage/combinat/root_system/all.py
    a b  
    1 from associahedron import Associahedron
     1from sage.misc.lazy_import import lazy_import
     2lazy_import('sage.combinat.root_system.associahedron', 'Associahedron')
     3
    24from cartan_type import CartanType
    35from dynkin_diagram import DynkinDiagram, dynkin_diagram
    46from cartan_matrix import cartan_matrix
  • sage/geometry/polyhedron/all.py

    diff --git a/sage/geometry/polyhedron/all.py b/sage/geometry/polyhedron/all.py
    a b  
    11
     2from sage.misc.lazy_import import lazy_import
     3lazy_import('sage.geometry.polyhedron.constructor', 'Polyhedron')
     4lazy_import('sage.geometry.polyhedron.library', 'polytopes')
    25
    3 from constructor import Polyhedron
    4 from library import polytopes
    5