Opened 6 years ago

Closed 4 years ago

#23085 closed defect (invalid)

sagetex 3.0 is not python 3 compatible

Reported by: aapitzsch Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: packages: standard Keywords: python3
Cc: Dan Drake, Dima Pasechnik Merged in:
Authors: Reviewers: Dima Pasechnik
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #22499, #27024 Stopgaps:

Status badges

Description

Building Sage for python3 failed with

copying build/lib/sagetex.py -> $SAGE_SRC/local/lib/python3.6/site-packages
[sagetex-3.0]     byte-compiling $SAGE_SRC/local/lib/python3.6/site-packages/sagetex.py to sagetex.cpython-36.pyc
[sagetex-3.0]       File "$SAGE_SRC/local/lib/python3.6/site-packages/sagetex.py", line 76
[sagetex-3.0]         raise VersionError, errstr
[sagetex-3.0]                           ^
[sagetex-3.0]     SyntaxError: invalid syntax

Change History (18)

comment:1 Changed 6 years ago by Frédéric Chapoton

Cc: Dan Drake added
Status: newneeds_info

where is the source of sagetex.py ?

comment:2 Changed 6 years ago by Frédéric Chapoton

humm... it seems that sagetex.py is generated somehow from sagetex.dtx

The sources are in https://github.com/dandrake/sagetex

comment:3 Changed 6 years ago by aapitzsch

To fix this issue we probably have to wait for #22499.

The line causing the error is https://github.com/dandrake/sagetex/blob/master/py-and-sty.dtx#L964

comment:5 Changed 6 years ago by Frédéric Chapoton

I have tried to write an email to Dan Drake, but I only managed to guess his email.

comment:6 Changed 6 years ago by Frédéric Chapoton

I got an answer from Dan Drake, saying that he is willing to transfer the ownership of sagetex github repository to the sagemath group.

comment:7 Changed 5 years ago by Frédéric Chapoton

sagetex is now part of the sagemath group in github:

https://github.com/sagemath/sagetexhttps://github.com/sagemath/sagetex

People from this group, please merge there the pull requests #5 and #11

Version 0, edited 5 years ago by Frédéric Chapoton (next)

comment:8 in reply to:  7 Changed 5 years ago by Karl-Dieter Crisman

Dependencies: #22499

sagetex is now part of the sagemath group in github:

https://github.com/sagemath/sagetexhttps://github.com/sagemath/sagetex

People from this group, please merge there the pull requests #5 and #11

These have been merged, so should depend on #22499 (new package).

comment:9 Changed 4 years ago by John Palmieri

Sagetex does not run correctly when using Sage built with Python 3. I mean, sagetex now builds, but it does not work:

$ ./sage example.sagetex.sage 
  File "example.sagetex.sage.py", line 248
    print 'SageTeX paused on example.tex line 365'
                                                 ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('SageTeX paused on example.tex line 365')?

All of the print statements need to be updated.

comment:10 Changed 4 years ago by John Palmieri

There is also an error when building sagetex with Python 3 which doesn't seem to stop the installation, but it breaks using it:

      File "/Users/palmieri/Desktop/Sage_stuff/sage_builds/PYTHON3/sage-8.4.beta6/local/lib/python3.6/site-packages/sagetex.py", line 181
        exec preparse(splitup[i][2]) in globals, locals
                    ^
    SyntaxError: invalid syntax

comment:11 Changed 4 years ago by Frédéric Chapoton

I made a pull request on github, for the print problem only

comment:12 Changed 4 years ago by Karl-Dieter Crisman

Cc: Dima Pasechnik added

There is now a new release of SageTeX at #27024 which hopefully fixes most of this.

comment:13 Changed 4 years ago by Karl-Dieter Crisman

Was this ever on #15530 or a related ticket, by the way?

comment:14 Changed 4 years ago by Dima Pasechnik

Dependencies: #22499#22499, #27024
Milestone: sage-8.0sage-duplicate/invalid/wontfix
Status: needs_infopositive_review

I think this is fixed by #27024

comment:15 Changed 4 years ago by Dima Pasechnik

Reviewers: Dima Pasechnik

comment:16 in reply to:  13 Changed 4 years ago by Dima Pasechnik

Replying to kcrisman:

Was this ever on #15530 or a related ticket, by the way?

just added it there

comment:17 Changed 4 years ago by Karl-Dieter Crisman

Nice.

comment:18 Changed 4 years ago by Erik Bray

Resolution: invalid
Status: positive_reviewclosed

Presuming these are all correctly reviewed as either duplicate, invalid, or wontfix.

Note: See TracTickets for help on using tickets.