Opened 9 years ago
Closed 9 years ago
#16050 closed enhancement (fixed)
miscellaneous cleanup/bugfixes for sage.misc.interpreter and sage.misc.sage_extension
Reported by: | ohanar | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-6.2 |
Component: | misc | Keywords: | |
Cc: | jason | Merged in: | |
Authors: | R. Andrew Ohana | Reviewers: | Volker Braun |
Report Upstream: | N/A | Work issues: | |
Branch: | 12efdd3 (Commits, GitHub, GitLab) | Commit: | 12efdd3b2658c881944b48d25a637112bc5ed268 |
Dependencies: | Stopgaps: |
Description (last modified by )
This is just a bit of cleanup+bugfixes that I've done over the past couple weeks. Notable changes:
- remove deprecations from #12719
- fix iload to actually be able to edit the loaded lines (could still be better, but would require more hacking on ipython internals; probably should just be added to upstream ipython instead)
- fix weird random bugs encountered with
InterfaceShellTransformer
(e.g. in gap, creating an error will cause future valid lines to error out) -- as far as I can tell, the code was just overthought (and had interface specific things that should belong as part of the appropriate interface) - use the IPython shutdown hook rather than customizing
ask_exit
- remove some dead and unused code
- start migrating files out of
sage.misc
and intosage.repl
Change History (18)
comment:1 follow-up: 2 Changed 9 years ago by
comment:2 follow-up: 3 Changed 9 years ago by
Replying to ohanar:
I would also like to move most of this code out of
sage.misc
to something likesage.app
, but I'm not really happy with that package name. Maybe something likesage.terminal
? Suggestions would be welcome.
sage.shell
? sage.toplevel
? sage.repl
?
comment:3 Changed 9 years ago by
comment:4 Changed 9 years ago by
Commit: | 4e5822efd20aa702173c2a19fb921de196157de3 → 64479d9e2bee27b5f6ba52a3386e030af43e487f |
---|
Branch pushed to git repo; I updated commit sha1. New commits:
64479d9 | start migrating stuff over to sage.repl
|
comment:5 Changed 9 years ago by
Description: | modified (diff) |
---|
comment:6 Changed 9 years ago by
Commit: | 64479d9e2bee27b5f6ba52a3386e030af43e487f → 9324deb05dbe6fae032d5bbca09e91810696a39d |
---|
comment:7 Changed 9 years ago by
Commit: | 9324deb05dbe6fae032d5bbca09e91810696a39d → 542dcc9483b8c19be96971512374f3437473cdcf |
---|
comment:8 Changed 9 years ago by
Commit: | 542dcc9483b8c19be96971512374f3437473cdcf → 861878435bfeef667669325deca252b5823029f0 |
---|
comment:9 Changed 9 years ago by
(Sorry for the force push, didn't properly copy a symlink.)
I'll make further changes in future tickets (I'll of course fix any regressions here, if they are found), so I'm marking this as needs review.
comment:10 Changed 9 years ago by
Status: | new → needs_review |
---|
comment:11 Changed 9 years ago by
Reviewers: | → Volker Braun |
---|
comment:12 Changed 9 years ago by
comment:13 Changed 9 years ago by
Commit: | 861878435bfeef667669325deca252b5823029f0 → df49c8e619080b506d7ac0c2b6a3e0e1ce85e27b |
---|
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
eb09160 | trac #11726 implement floordiv for laurent polys in one variable
|
e27a420 | trac #11726 one failing doctest corrected
|
ba866ef | Merge branch 'public/ticket/11726' into raise-plus
|
86261b1 | Improve count_points
|
55cdcf3 | Refactor point counting code for hyperelliptic curves.
|
fc7a569 | First bunch of fixes and missing examples.
|
63bf717 | Rebase on top of #15108.
|
8029bc6 | Merge remote-tracking branch 'trac/develop' into ticket/15148
|
136948a | Merge branch 'u/jpflori/ticket/15148' into raise-plus
|
df49c8e | Merge remote-tracking branch 'trac/u/wluebbe/ticket/15990b' into terminal_app_cleanup
|
comment:15 Changed 9 years ago by
Can you also fix the module path in the doctests? ;-)
sage -t --long src/sage/repl/ipython_extension.py ********************************************************************** File "src/sage/repl/ipython_extension.py", line 78, in sage.repl.ipython_extension.SageMagics.crun Failed example: from sage.misc.interpreter import get_test_shell Exception raised: Traceback (most recent call last): File "/home/release/Sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 480, in _run self.execute(example, compiled, test.globs) File "/home/release/Sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 839, in execute exec compiled in globs File "<doctest sage.repl.ipython_extension.SageMagics.crun[0]>", line 1, in <module> from sage.misc.interpreter import get_test_shell ImportError: cannot import name get_test_shell ********************************************************************** File "src/sage/repl/ipython_extension.py", line 79, in sage.repl.ipython_extension.SageMagics.crun Failed example: shell = get_test_shell() Exception raised: Traceback (most recent call last): File "/home/release/Sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 480, in _run self.execute(example, compiled, test.globs) File "/home/release/Sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 839, in execute exec compiled in globs File "<doctest sage.repl.ipython_extension.SageMagics.crun[1]>", line 1, in <module> shell = get_test_shell() NameError: name 'get_test_shell' is not defined ********************************************************************** 1 item had failures:
comment:16 Changed 9 years ago by
Branch: | u/ohanar/terminal_app_cleanup → u/vbraun/terminal_app_cleanup |
---|
comment:17 Changed 9 years ago by
Commit: | df49c8e619080b506d7ac0c2b6a3e0e1ce85e27b → 12efdd3b2658c881944b48d25a637112bc5ed268 |
---|
comment:18 Changed 9 years ago by
Branch: | u/vbraun/terminal_app_cleanup → 12efdd3b2658c881944b48d25a637112bc5ed268 |
---|---|
Resolution: | → fixed |
Status: | needs_review → closed |
I would also like to move most of this code out of
sage.misc
to something likesage.app
, but I'm not really happy with that package name. Maybe something likesage.terminal
? Suggestions would be welcome.Also, this is just a first step towards cleanup. Certainly more could be done (e.g. stuff surrounding the preparser), but I figured may as well do this gradually rather than as a patchbomb.