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
When running .sage files, pass the preparsed file through a pipe #11821
Comments
comment:2
I'd opt for either (2) or (3). (3) is nicer from a user perspective, but may have other side effects. (2) should be easy to implement ( P.S.: Looks like the patch is not yet based on #9739. (Haven't tried.) If we change the way |
comment:3
Yet a fourth option, implemented in the "v2" patch: don't save the preparsed file at all. Here are the changes in this patch:
To do: add some tests to sage/tests/cmdline.py. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:4
The new patch adds some doctests (not very sophisticated ones, but we can expand on them later). |
comment:5
This needs rebasing relative to #12069. I'll get to it eventually. |
Work Issues: rebase on #12069 |
comment:6
Okay, now rebased. |
comment:7
Rebased to Sage 5.0.beta8 and #12069. |
Changed work issues from rebase on #12069 to none |
This comment has been minimized.
This comment has been minimized.
comment:9
This needs to be rebased against #12415 ( |
comment:10
Now rebased. |
root repo |
Attachment: trac_11821-root.patch.gz Attachment: trac_11821-doctests.patch.gz Sage library |
Attachment: trac_11821-preparse.v3.patch.gz scripts repo |
comment:15
I don't like this patch because of #71. I regularly use the |
This comment has been minimized.
This comment has been minimized.
comment:18
See also #16955. |
comment:19
Should this be closed as "won't fix" because of #16955? Or is there a reason to preparse to stdout and pipe the results through sage? |
comment:20
Replying to @jhpalmieri:
Not having preparsed |
If you run "sage new.sage" on a script "new.sage", it creates a preparsed file "new.py". Then when a file in the twisted package tries to import the "new" Python module, it ends up importing this preparsed file instead, which leads to problems which can be hard to track down.
I can think of several solutions:
The attached patch implements number 4.
Apply
Depends on #71
Component: scripts
Author: John Palmieri
Issue created by migration from https://trac.sagemath.org/ticket/11821
The text was updated successfully, but these errors were encountered: