#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):
I've tripped over this multiple times, too. This is due to circular
imports in the matroid code. For example:
{{{
┌────────────────────────────────────────────────────────────────────┐
│ Sage Version 5.12.rc1, Release Date: 2013-10-04 │
│ Type "notebook()" for the browser-based notebook interface. │
│ Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable. ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage: from sage.matroids.basis_exchange_matroid import
BasisExchangeMatroid
---------------------------------------------------------------------------
AttributeError Traceback (most recent call
last)
<ipython-input-1-2e7708db611e> in <module>()
----> 1 from sage.matroids.basis_exchange_matroid import
BasisExchangeMatroid
/home/vbraun/Code/sage.git/basis_exchange_matroid.pyx in init
sage.matroids.basis_exchange_matroid
(sage/matroids/basis_exchange_matroid.c:20420)()
/home/vbraun/Code/sage.git/basis_exchange_matroid.pxd in init
sage.matroids.matroid (sage/matroids/matroid.c:33184)()
AttributeError: 'module' object has no attribute 'BasisExchangeMatroid'
}}}
Depending on initialization order, importing matroids can fail. So if you
delete `doc/output` and then run `make doc`, it works. But if some docs
have been cached then the import order changes and *BOOM*. This is really
bad. Python lets you get away with circular imports to some extend, but
not forever.
The matroid guys should linearize their imports, thats the only long-term
solution.
--
Ticket URL: <http://trac.sagemath.org/ticket/15130#comment:2>
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.