-
-
Notifications
You must be signed in to change notification settings - Fork 528
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
Deprecate sage.misc.viewer #33931
Comments
Branch: u/jhpalmieri/deprecate-viewer |
Commit: |
comment:2
I tested this by running these commands in Sage from the command line and in the notebook:
I did this with the develop branch, with this branch, and with a more radical branch in which I completely deleted New commits:
|
comment:3
This is not working on an Ubuntu virtual machine. It tries to open every png and pdf in a web browser and produces a message like |
comment:5
With these changes (trying PIL first, then a browser as a backup), some images work for me on Ubuntu, but PDF files still fail with the same error message. Suggestions? |
comment:7
Replying to @jhpalmieri:
On Ubuntu 20.04, all of the above work. The behavior of Positive review from my side. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:9
Rebased to 9.7.beta8, ready for review. |
comment:10
Replying to @jhpalmieri:
Default webbrowser do not open pdf files. Maybe this is why? |
comment:11
Replying to @seblabbe:
What, are we still living in the 90s? |
comment:12
Maybe we need to keep some of the old functionality for opening pdfs, or reimplement it using |
comment:13
Replying to @seblabbe:
Looking at this ticket again, I don't think I am confident anymore to give a positive review. Deprecating
Also, the current state which exists for years allows the user to specify its preferated viewer:
So, the current branch might be a step backward for many long time users which have old written code. Personnaly, I am afraid the current change will break something on a platform I am not familiar with like Windows or OS X, which I can't test. Finally, is the motivation for the current branch only to get rid of |
comment:15
(The motivation came from the brief discussion at #32957 comment:14.) |
comment:16
Replying to @jhpalmieri:
Ok, I remember now. Maybe we can start by replacing occurences of Also, in the documentation of webbrowser.open, I see: "Note that on some platforms, trying to open a filename using this function, may work and start the operating system’s associated program. However, this is neither supported nor portable." However, I don't know if this comment refers to |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:18
Here is a new version. This deprecates |
This comment has been minimized.
This comment has been minimized.
comment:19
Questions and comments:
diff --git a/src/sage/misc/latex.py b/src/sage/misc/latex.py
index 3ec3a3e..5d9ebdb 100644
--- a/src/sage/misc/latex.py
+++ b/src/sage/misc/latex.py
@@ -1859,7 +1859,7 @@ def view(objects, title='Sage', debug=False, sep='', tiny=False,
sage: with NamedTemporaryFile(mode="w+t", suffix=".tex") as f: # optional - latex latex_package_tkz_graph
....: _ = f.write(_latex_file_(g))
....: f.flush()
- ....: _run_latex_(file, engine="pdflatex")
+ ....: _run_latex_(f.name, engine="pdflatex")
'pdf' is just fixing a bug: |
comment:20
I don't see a way to edit my comments. The first item in the previous comment perhaps should have ended with a question: suggestions for what to do? |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
Reviewer: Sébastien Labbé |
comment:24
The current branch has a conflict with 9.8.beta1. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:26
Merge conflict fixed. |
As part of #32957, let's deprecate
sage.misc.viewer
in favor of (a) for images, a version that uses Sage'sFeatures
and (b) for web browsing, the Python librarywebbrowser
.CC: @seblabbe
Component: misc
Author: John Palmieri
Branch/Commit: u/jhpalmieri/deprecate-viewer @
cb099ed
Reviewer: Sébastien Labbé
Issue created by migration from https://trac.sagemath.org/ticket/33931
The text was updated successfully, but these errors were encountered: