Opened 7 years ago
Closed 2 years ago
#15522 closed defect (fixed)
Conversion gp > string is broken
Reported by:  jdemeyer  Owned by:  

Priority:  major  Milestone:  sage8.4 
Component:  interfaces  Keywords:  
Cc:  Merged in:  
Authors:  Frédéric Chapoton  Reviewers:  Travis Scrimshaw 
Report Upstream:  N/A  Work issues:  
Branch:  4400367 (Commits)  Commit:  4400367d983fa74e82d23915efb31b01b14d3f4a 
Dependencies:  Stopgaps: 
Description
sage: gp('"foo"').sage()  NameError Traceback (most recent call last) <ipythoninput15f1854206d09> in <module>() > 1 gp('"foo"').sage() /usr/local/src/sagegit/local/lib/python2.7/sitepackages/sage/interfaces/interface.pyc in sage(self) 867 Rational Field 868 """ > 869 return self._sage_() 870 871 def __repr__(self): /usr/local/src/sagegit/local/lib/python2.7/sitepackages/sage/interfaces/gp.pyc in _sage_(self) 831 True 832 """ > 833 return pari(str(self)).python() 834 835 def __long__(self): /usr/local/src/sagegit/local/lib/python2.7/sitepackages/sage/libs/pari/gen.so in sage.libs.pari.gen.gen.python (sage/libs/pari/gen.c:10167)() /usr/local/src/sagegit/local/lib/python2.7/sitepackages/sage/libs/pari/gen_py.pyc in python(z, locals) 273 else: 274 from sage.misc.sage_eval import sage_eval > 275 return sage_eval(str(z), locals=locals) /usr/local/src/sagegit/local/lib/python2.7/sitepackages/sage/misc/sage_eval.pyc in sage_eval(source, locals, cmds, preparse) 197 return locals['_sage_eval_returnval_'] 198 else: > 199 return eval(source, sage.all.__dict__, locals) 200 201 /usr/local/src/sagegit/local/lib/python2.7/sitepackages/sage/all.pyc in <module>() NameError: name 'foo' is not defined
Attachments (1)
Change History (15)
Changed 7 years ago by
comment:1 Changed 7 years ago by
 Milestone changed from sage6.1 to sage6.2
comment:2 Changed 7 years ago by
 Milestone changed from sage6.2 to sage6.3
comment:3 Changed 6 years ago by
 Milestone changed from sage6.3 to sage6.4
comment:4 Changed 3 years ago by
 Branch set to public/15522
 Commit set to dd32c9c3a1883fc6999f0e86534fdc14a06682fa
 Milestone changed from sage6.4 to sage8.3
 Reviewers set to Frédéric Chapoton
 Status changed from new to needs_review
comment:5 Changed 3 years ago by
 Status changed from needs_review to positive_review
Jeroen, I allow myself to set this to positive.
comment:6 Changed 3 years ago by
 Status changed from positive_review to needs_work
comment:7 Changed 3 years ago by
 Branch public/15522 deleted
 Commit dd32c9c3a1883fc6999f0e86534fdc14a06682fa deleted
 Reviewers Frédéric Chapoton deleted
comment:8 Changed 3 years ago by
so, is this one a duplicate, or what ?
comment:9 Changed 3 years ago by
No, because gp
is not pari
(the first uses pexpect
, the second uses cypari2
)
comment:10 Changed 3 years ago by
Indeed. Using the branch from #25289, one gets
sage: gp('"toto"') toto sage: pari('"toto"') "toto"
comment:11 Changed 2 years ago by
 Milestone changed from sage8.3 to sage8.4
update milestone 8.3 > 8.4
comment:12 Changed 2 years ago by
 Branch set to public/15522
 Commit set to 4400367d983fa74e82d23915efb31b01b14d3f4a
 Status changed from needs_work to needs_review
New commits:
4400367  fix conversion from gp strings to sage strings

comment:13 Changed 2 years ago by
 Reviewers set to Travis Scrimshaw
 Status changed from needs_review to positive_review
LGTM.
comment:14 Changed 2 years ago by
 Branch changed from public/15522 to 4400367d983fa74e82d23915efb31b01b14d3f4a
 Resolution set to fixed
 Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
New commits:
trac 15522 conversion from pari strings