#16064: Python 3 preparation: Handle basestring (Py2) vs. str (Py3)
-------------------------------------+-------------------------------------
Reporter: wluebbe | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.8
Component: distribution | Resolution:
Keywords: python3 | Merged in:
Authors: André Apitzsch | Reviewers: Ralf Stephan
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/aapitzsch/16064_2 | b16df45af9855bad1a2687db25d57e8fa881a8cf
Dependencies: #18492 | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by wluebbe):
Right at the beginning of test {{{--all --long}}} (after a fresh
{{{make}}}!) I get LOTS of errors like
{{{
File
"src/sage/combinat/root_system/non_symmetric_macdonald_polynomials.py",
line 62, in
sage.combinat.root_system.non_symmetric_macdonald_polynomials.NonSymmetricMacdonaldPolynomials
Failed example:
E = NonSymmetricMacdonaldPolynomials(["A",2,1])
Exception raised:
Traceback (most recent call last):
File "/home/wluebbe/sage-6.8.beta3/local/lib/python2.7/site-
packages/sage/doctest/forker.py", line 496, in _run
self.compile_and_execute(example, compiler, test.globs)
File "/home/wluebbe/sage-6.8.beta3/local/lib/python2.7/site-
packages/sage/doctest/forker.py", line 858, in compile_and_execute
exec(compiled, globs)
File "<doctest
sage.combinat.root_system.non_symmetric_macdonald_polynomials.NonSymmetricMacdonaldPolynomials[0]>",
line 1, in <module>
E = NonSymmetricMacdonaldPolynomials(["A",Integer(2),Integer(1)])
File "sage/misc/lazy_import.pyx", line 383, in
sage.misc.lazy_import.LazyImport.__call__
(build/cythonized/sage/misc/lazy_import.c:3453)
return self._get_object()(*args, **kwds)
File "sage/misc/classcall_metaclass.pyx", line 326, in
sage.misc.classcall_metaclass.ClasscallMetaclass.__call__
(build/cythonized/sage/misc/classcall_metaclass.c:1204)
return cls.classcall(cls, *args, **kwds)
File "/home/wluebbe/sage-6.8.beta3/local/lib/python2.7/site-
packages/sage/combinat/root_system/non_symmetric_macdonald_polynomials.py",
line 1208, in __classcall__
q = K(q)
File "sage/structure/parent.pyx", line 1095, in
sage.structure.parent.Parent.__call__
(build/cythonized/sage/structure/parent.c:9523)
return mor._call_(x)
File "sage/structure/coerce_maps.pyx", line 109, in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_
(build/cythonized/sage/structure/coerce_maps.c:4402)
raise
File "sage/structure/coerce_maps.pyx", line 104, in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_
(build/cythonized/sage/structure/coerce_maps.c:4309)
return C._element_constructor(x)
File "/home/wluebbe/sage-6.8.beta3/local/lib/python2.7/site-
packages/sage/rings/fraction_field.py", line 563, in _element_constructor_
x = sage_eval(x, self.gens_dict_recursive())
File "/home/wluebbe/sage-6.8.beta3/local/lib/python2.7/site-
packages/sage/misc/sage_eval.py", line 181, in sage_eval
if not isinstance(source, six.string_types):
AttributeError: 'module' object has no attribute 'string_types'
}}}
Apparently the module {{{six}}} has not yet the attribute
{{{string_types}}}. This seems to be the symptom of a circular import. But
why after this last, small change?
--
Ticket URL: <http://trac.sagemath.org/ticket/16064#comment:24>
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/d/optout.