Opened 5 years ago

Closed 3 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: ddrake, dimpase 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 5 years ago by chapoton

  • Cc ddrake added
  • Status changed from new to needs_info

where is the source of sagetex.py ?

comment:2 Changed 5 years ago by 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 5 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 5 years ago by chapoton

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

comment:6 Changed 5 years ago by 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 follow-up: Changed 5 years ago by 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 chapoton (next)

comment:8 in reply to: ↑ 7 Changed 5 years ago by kcrisman

  • Dependencies set to #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 3 years ago by jhpalmieri

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 3 years ago by jhpalmieri

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 3 years ago by chapoton

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

comment:12 Changed 3 years ago by kcrisman

  • Cc dimpase added

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

comment:13 follow-up: Changed 3 years ago by kcrisman

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

comment:14 Changed 3 years ago by dimpase

  • Dependencies changed from #22499 to #22499, #27024
  • Milestone changed from sage-8.0 to sage-duplicate/invalid/wontfix
  • Status changed from needs_info to positive_review

I think this is fixed by #27024

comment:15 Changed 3 years ago by dimpase

  • Reviewers set to Dima Pasechnik

comment:16 in reply to: ↑ 13 Changed 3 years ago by dimpase

Replying to kcrisman:

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

just added it there

comment:17 Changed 3 years ago by kcrisman

Nice.

comment:18 Changed 3 years ago by embray

  • Resolution set to invalid
  • Status changed from positive_review to closed

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

Note: See TracTickets for help on using tickets.