Ticket #3370 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

[with patch, positive review] converting strings to ZZ[x,y] fails

Reported by: burcin Owned by: malb
Priority: major Milestone: sage-3.0.3
Component: commutative algebra Keywords:
Cc: Work issues:
Report Upstream: Reviewers:
Authors: Merged in:
Dependencies: Stopgaps:

Description

With 3.0.2:

sage: P.<x,y> = ZZ[]
sage: P('x+y')
TypeError                                 Traceback (most recent call last)

/home/burcin/work/sage/sage-3.0.2/<ipython console> in <module>()

/home/burcin/work/sage/sage-3.0.2/local/lib/python2.5/site-packages/sage/rings/polynomial/multi_polynomial_ring.py in __call__(self, x, check)
    386 
    387         elif isinstance(x , str) and self._has_singular:
--> 388             self._singular_().set_ring()
    389             try:
    390                 return self._singular_().parent(x).sage_poly(self)

/home/burcin/work/sage/sage-3.0.2/local/lib/python2.5/site-packages/sage/rings/polynomial/polynomial_singular_interface.py in _singular_(self, singular, force)
    172             return R
    173         except (AttributeError, ValueError):
--> 174             return self._singular_init_(singular, force)
    175 
    176     def _singular_init_(self, singular=singular_default, force=False):

/home/burcin/work/sage/sage-3.0.2/local/lib/python2.5/site-packages/sage/rings/polynomial/polynomial_singular_interface.py in _singular_init_(self, singular, force)
    243 
    244         else:
--> 245             raise TypeError, "no conversion to a Singular ring defined"
    246 
    247         return self.__singular

TypeError: no conversion to a Singular ring defined

Attached patch fixes this problem.

Attachments

string_to_ZZxy_conversion.patch Download (1.9 KB) - added by burcin 5 years ago.
convert strings to mpolynomials using sage_eval

Change History

Changed 5 years ago by burcin

convert strings to mpolynomials using sage_eval

comment:1 Changed 5 years ago by malb

  • Summary changed from [with patch, needs review] converting strings to ZZ[x,y] fails to [with patch, positive review] converting strings to ZZ[x,y] fails

patch looks good.

comment:2 Changed 5 years ago by mabshoff

  • Status changed from new to closed
  • Resolution set to fixed

Merged in Sage 3.0.3.rc0

comment:3 Changed 5 years ago by mabshoff

  • Milestone changed from sage-3.0.4 to sage-3.0.3
Note: See TracTickets for help on using tickets.