This is a circular import error.  If you look at the chain of imports,
you'll see that earlier you're in the file "sage/rings/all.py," and the
error occurs when you later try to import sage.rings.all.

A brief glance at your code doesn't reveal the cause of the problem for me,
though it could be related to creating a new top level folder
sage/monoids.  I would say that, ideally, the kind of functionality that
you're moving from Group to Monoid should go in the categories.  Then we
don't need an intermediate class in the Python inheritance tree.
David

On Mon, Jan 12, 2015 at 12:43 PM, Daniel Krenn <kr...@aon.at> wrote:

> In
>
>   http://trac.sagemath.org/ticket/17626
>
> the group class should have a newly created monoid class as a base. At
> the moment the group and the monoid parent do not have much in common
> (but their elements have).
>
> I've started implementing this, but have a rather strange problem. See
> below the output of "sage -t" of the commit c51a914.
>
> Any ideas what goes wrong?
>
> Daniel
>
>
> krenn@brown:somewhere$ ./sage -t src/sage/monoids/ src/sage/groups/
> Traceback (most recent call last):
>   File "/sage/6.5.beta4/src/bin/sage-runtests", line 79, in <module>
>     from sage.doctest.control import DocTestController
>   File
>
> "/sage/6.5.beta4/local/lib/python2.7/site-packages/sage/doctest/control.py",
> line 28, in <module>
>     from sources import FileDocTestSource, DictAsObject
>   File
>
> "/sage/6.5.beta4/local/lib/python2.7/site-packages/sage/doctest/sources.py",
> line 27, in <module>
>     from parsing import SageDocTestParser
>   File
>
> "/sage/6.5.beta4/local/lib/python2.7/site-packages/sage/doctest/parsing.py",
> line 49, in <module>
>     from sage.all import RealIntervalField
>   File "/sage/6.5.beta4/local/lib/python2.7/site-packages/sage/all.py",
> line 101, in <module>
>     from sage.rings.all      import *
>   File
> "/sage/6.5.beta4/local/lib/python2.7/site-packages/sage/rings/all.py",
> line 69, in <module>
>     from number_field.all import *
>   File
>
> "/sage/6.5.beta4/local/lib/python2.7/site-packages/sage/rings/number_field/all.py",
> line 1, in <module>
>     from number_field import (NumberField, NumberFieldTower,
> CyclotomicField, QuadraticField,
>   File
>
> "/sage/6.5.beta4/local/lib/python2.7/site-packages/sage/rings/number_field/number_field.py",
> line 113, in <module>
>     from unit_group import UnitGroup
>   File
>
> "/sage/6.5.beta4/local/lib/python2.7/site-packages/sage/rings/number_field/unit_group.py",
> line 140, in <module>
>     from sage.groups.abelian_gps.values import AbelianGroupWithValues_class
>   File
>
> "/sage/6.5.beta4/local/lib/python2.7/site-packages/sage/groups/abelian_gps/values.py",
> line 77, in <module>
>     from sage.groups.abelian_gps.abelian_group import
> AbelianGroup_class, _normalize
>   File
>
> "/sage/6.5.beta4/local/lib/python2.7/site-packages/sage/groups/abelian_gps/abelian_group.py",
> line 215, in <module>
>     from sage.groups.group import AbelianGroup as AbelianGroupBase
>   File "sage/groups/group.pyx", line 1, in init sage.groups.group
> (build/cythonized/sage/groups/group.c:5180)
>   File
>
> "/sage/6.5.beta4/local/lib/python2.7/site-packages/sage/monoids/__init__.py",
> line 1, in <module>
>     import all
>   File
> "/sage/6.5.beta4/local/lib/python2.7/site-packages/sage/monoids/all.py",
> line 1, in <module>
>     from free_monoid import FreeMonoid
>   File
>
> "/sage/6.5.beta4/local/lib/python2.7/site-packages/sage/monoids/free_monoid.py",
> line 39, in <module>
>     from sage.combinat.words.finite_word import FiniteWord_class
>   File
>
> "/sage/6.5.beta4/local/lib/python2.7/site-packages/sage/combinat/words/__init__.py",
> line 20, in <module>
>     import all
>   File
>
> "/sage/6.5.beta4/local/lib/python2.7/site-packages/sage/combinat/words/all.py",
> line 5, in <module>
>     from morphism import WordMorphism
>   File
>
> "/sage/6.5.beta4/local/lib/python2.7/site-packages/sage/combinat/words/morphism.py",
> line 96, in <module>
>     from sage.matrix.constructor import Matrix
>   File
>
> "/sage/6.5.beta4/local/lib/python2.7/site-packages/sage/matrix/constructor.py",
> line 20, in <module>
>     import sage.rings.all as rings
> AttributeError: 'module' object has no attribute 'all'
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to