Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sage -wthread not passed correctly to ipython #4381

Closed
jaapspies opened this issue Oct 29, 2008 · 7 comments
Closed

sage -wthread not passed correctly to ipython #4381

jaapspies opened this issue Oct 29, 2008 · 7 comments
Assignees
Milestone

Comments

@jaapspies
Copy link
Member

Off sage-3.1.3 passing the argument -wthread is not correct. The argument -wthread must be the first argument passed to ipython in order to take effect.

See the changes from sage-3.1.2 to sage-3.1.3 in the file $SAGE_ROOT/local/bin/sage-sage:

[jaap@paix bin]$ diff sage-sage ../../../sage-3.1.2/local/bin/sage-sage
51d50
<     echo "  -combinat <...> -- run sage-combinat patch management script"
188a188,203
> SAGE_STARTUP="
> import sage.misc.misc; print \
> sage.misc.misc.branch_current_hg_notice(sage.misc.misc.branch_current_hg()); \
> from sage.misc.interpreter import preparser; preparser(True);\
> import sage.all_cmdline; sage.all_cmdline._init_cmdline(globals());\
> from sage.all import Integer, RealNumber;\
> import os; os.chdir(\"$CUR\");\
> import sage.misc.interpreter;\
> from sage.misc.interpreter import attached_files\
> "
> 
> if [ "$SAGE_IMPORTALL" != "no" ]; then
>    SAGE_STARTUP_COMMAND="$SAGE_STARTUP"";from sage.all_cmdline import *"
> else
>    SAGE_STARTUP_COMMAND="$SAGE_STARTUP"
> fi
189a205,206
> SAGE_STARTUP_COMMAND="$SAGE_STARTUP_COMMAND"";_=sage.misc.interpreter.load_startup_file(\"$SAGE_STARTUP_FILE\")"
> export SAGE_STARTUP_COMMAND
200c217
<     sage-ipython "$@" -i
---
>     sage-ipython "$@" -c "$SAGE_STARTUP_COMMAND;"
251,257d267
< if [ $1 = '-combinat' -o $1 = '--combinat' ]; then
<     cd "$CUR"
<     shift
<     sage-combinat "$@"
<     exit $?
< fi
< 
514c524
<    sage-ipython  $LOGOPT -rcfile="$IPYTHONRC" -i -c "$SAGE_STARTUP_COMMAND" "$@" 
---
>    sage-ipython  $LOGOPT -rcfile="$IPYTHONRC" -c "$SAGE_STARTUP_COMMAND" "$@"
[jaap@paix bin]$ 


cwitty to the rescue?

Jaap

CC: @mwhansen @burcin

Component: misc

Issue created by migration from https://trac.sagemath.org/ticket/4381

@jaapspies
Copy link
Member Author

comment:1

Don't know for sure but #3945 could be the culprit.

#3945

Jaap

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Oct 30, 2008

comment:2

#3945 is more than likely the culprit here since nothing else touched ipython related scripts in 3.1.2->3.1.3.

Cheers,

Michael

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Nov 9, 2008

comment:3

After talking to Fernando Perez at SD 11 it is more than a five minute fix in IPython, so we should patch around it for now. In the long term the issue will be fixed in IPython :)

Cheers,

Michael

@jaapspies
Copy link
Member Author

comment:5

After applying the patch to sage-3.2.1.alpha0:

 mhansen: after installing wxPython in sage-3.2.1.alph0 I get:
<jaap> [jaap@paix sage-3.2.1.alpha0]$ ./sage -wthread
<jaap> ----------------------------------------------------------------------
<jaap> | Sage Version 3.2.1.alpha0, Release Date: 2008-11-23                |
<jaap> | Type notebook() for the GUI, and license() for information.        |
<jaap> ----------------------------------------------------------------------
<jaap> ------------------------------------------------------------
<jaap>    File "<ipython console>", line 1
<jaap>      /home/jaap/downloads/sage-3.2.1.alpha0/local/bin/sage-startup
<jaap>      ^
<jaap> SyntaxError: invalid syntax
<mhansen> Hmm...

@mwhansen
Copy link
Contributor

Attachment: trac_4381.patch.gz

@jaapspies
Copy link
Member Author

comment:6

New patch worked for me!

Positive review,

Jaap

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Nov 26, 2008

comment:7

Merged in Sage 3.2.1.alpha1

@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed Nov 26, 2008
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants