On Mar 6, 9:52 am, "Nicolas M. Thiery" <nicolas.thi...@u-psud.fr>
wrote:
> On Fri, Mar 06, 2009 at 05:42:17PM +0100, Florent Hivert wrote:
> > I've been stuck an entire day on a problem which may hits you. So I'm
> > putting
> > it there if someone get against it. The problem is the following:
>
> > Some test get broken even after a "hg qpop -a". The error message was:
> > ImportError: cannot import name Set
>
> Sets?
>
> > The solution is: remove the file
> > sage-combinat/build/sage/categories/sets.pyc
>
> > Nicolas: according to cwitty, this problem is likely to appears because the
> > file sage/categories/sets.py has the same name as a top-level standard
> > Python
> > module. Can you check this and rename the corresponding offending file ?
>
> Ouch. That is a pain.
>
> cwitty: would you have some pointers on what the problem exactly is?
> Is it that we should refrain from using the shortcut from sets import Sets?
Yes. *Never* name a file the same as a default Python file, this just
leads to pain over and over again.
The general problem with having to delete "matching" pyc files in the
build directory is known, but so far we haven't done more than open a
trac ticket for it.
> I'd rather fix the infrastructure if at all possible ...
>
> Cheers,
> Nicolas
>
It should be fairly simple to add a wipe option that kills all left
over pyc and so build remnants, but I personally tend to wipe out
"build" and just rebuild the Sage library if I can't manually fix it
in 2 minutes.
Cheers,
Michael
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---