#15130: Docbuilder issue with BasisExchangeMatroid
---------------------------------+-------------------------
       Reporter:  jdemeyer       |        Owner:
           Type:  defect         |       Status:  new
       Priority:  critical       |    Milestone:  sage-5.13
      Component:  documentation  |   Resolution:
       Keywords:                 |    Merged in:
        Authors:                 |    Reviewers:
Report Upstream:  N/A            |  Work issues:
         Branch:                 |       Commit:
   Dependencies:                 |     Stopgaps:
---------------------------------+-------------------------

Comment (by vbraun):

 Btw, here is a quick tutorial to debug this. Use the `-v` switch to
 display imports as they happen:
 {{{
 sage -python -v
 >>> from sage.all import *
 >>> from sage.matroids.basis_exchange_matroid import BasisExchangeMatroid
 dlopen("/home/vbraun/Code/sage.git/local/lib/python2.7/site-
 packages/sage/matroids/basis_exchange_matroid.so", 2);
 dlopen("/home/vbraun/Code/sage.git/local/lib/python2.7/site-
 packages/sage/matroids/matroid.so", 2);
 dlopen("/home/vbraun/Code/sage.git/local/lib/python2.7/site-
 packages/sage/matroids/set_system.so", 2);
 import sage.matroids.set_system # dynamically loaded from
 /home/vbraun/Code/sage.git/local/lib/python2.7/site-
 packages/sage/matroids/set_system.so
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "basis_exchange_matroid.pyx", line 1, in init
 sage.matroids.basis_exchange_matroid
 (sage/matroids/basis_exchange_matroid.c:20420)
   File "basis_exchange_matroid.pxd", line 8, in init sage.matroids.matroid
 (sage/matroids/matroid.c:33184)
 AttributeError: 'module' object has no attribute 'BasisExchangeMatroid'
 }}}
 So matroid imports from basis_exchange_matroid and vice versa. Which is
 bad. Circular imports are no magic, they just require Python to work with
 half-initialized module dicts. So while basis_exchange_matroid is loading,
 the `BasisExchangeMatroid` is not in the module namespace.

--
Ticket URL: <http://trac.sagemath.org/ticket/15130#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to