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
Some magics (e. g %%mathematica) have vanished #35246
Comments
Not able to add/modify labels (I may not yet be in "triage"). Should be Furthermore @ |
I also found that %%lisp has disappeared. |
My guess is that it has to do with moving their import to lazy_import in 5f08ad8 After that change, the creation of the magic commands ignores it: sage/src/sage/repl/interface_magic.py Lines 99 to 101 in 7404764
|
A workaround i found is to register the magic command manually:
|
See also #34547 (comment). |
Thanks. I guess we have the answer to your question about whether we care. Would it be possible to register the magic commands but still lazy_import them? |
I don't know, partly because I don't know why lazily importing broke the commands. |
The code that registers the magic commands specifically checks if they are instances of sage/src/sage/repl/interface_magic.py Lines 99 to 101 in 7404764
|
Should be fixed by #35680. Emmanuel, can you verify? |
Seen a bit late... Sorry for the delay !
Le jeudi 25 mai 2023 à 09:58 -0700, John H. Palmieri a écrit :
Should be fixed by #35680. Emmanuel, can you verify?
Nice diagnosis ! Seems good...
…--
Emmanuel Charpentier
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
### 📚 Description Addresses #35246 The lazy imported interfaces are not registered as magic modes. This patch registers them too. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x ]`. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [] I have created tests covering the changes. - [] I have updated the documentation accordingly. URL: #35680 Reported by: miguelmarco Reviewer(s): John H. Palmieri
Merging #35680 fixed some of these problems. But some other magics are still missing :
The lack of The related #30661 is still open :
|
Do you have any idea where/how |
Could it have been in a previous version of IPython? I see https://pypi.org/project/ipython-bg/, but it hasn't been modified for 3 years. See also https://stackoverflow.com/questions/10819479/missing-background-magic-command-bg-in-ipython and ipython/ipython#844. |
O dunno ; I just discovered its existence by reading thé tutorial, of all things (and for other reasons... :-)).One Nevers ceases to learn... 8=O) !Le 25 juin 2023 22:20, "John H. Palmieri" ***@***.***> a écrit :
Do you have any idea where/how %bg was defined before? I don't think it should have been affected by #34547 — that should only have affected magic commands related to interfaces. When did %bg last work?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
We should probably remove that from the tutorial. See #22934 (comment), or we can open a new issue. |
I created #35836. |
Can this be closed as completed? |
Okay with me. Emmanuel? |
@EmmanuelCharpentier please confirm that this issue can be closed |
Is there an existing issue for this?
Did you read the documentation and troubleshoot guide?
Environment
Steps To Reproduce
Expected Behavior
Actual Behavior
Additional Information
FWIW, in a console :
The
%sage0
and%%sage0
entries look suspicious...The text was updated successfully, but these errors were encountered: