-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
Change graphics_filename() to return a tmp_filename() except from the notebook #15515
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Branch: u/jdemeyer/ticket/15515 |
comment:4
Attachment: doctest_no_graphics_filename.patch.gz |
Commit: |
New commits:
|
Work Issues: rebase |
comment:9
rws, do you care about this patch, would you review it? I can rebase the patch, but only if I know that somebody is interested in reviewing it. |
comment:10
No, I don't care about the notebook. |
comment:11
Oh it's not the notebook. Yes, I do care. |
Changed branch from u/jdemeyer/ticket/15515 to u/gagern/ticket/15515 |
Changed work issues from rebase to none |
comment:12
Rebased this. Funny, I was coding something along the same lines at the moment, before #16533 comment:34 made me aware of this ticket here. My own modifications (which I have just modified to build on this here) also move some other tasks into that function, namely passing a caller-provided filename back (either unaltered or with added suffix) unless it is But since I might end up reviewing your commit, I probably should file my own as a separate ticket… I haven't looked at all your modifications yet, but I notice that code in plot3d/base.pyx is still pretty broken with regard to If I were to fix this, I would be using my own code for this. Jeroen, could we review one another's code for this? I guess I'd also like to use this function (with my own additions) all over the place for animations. Doing that would fix #16608 as well, would be a useful basis for my next stab at #16533, and would make 005b83f from #16571 superfluous as well. New commits:
|
comment:13
Replying to @gagern:
Yes, but not before the end of July. Please remind me then in case I forget. |
comment:14
I had a closer look at the code. Decided to restore explicit arguments in two cases because they might have been used as positional arguments, not keyword arguments, so we'd break backward compatibility. This is in response to the discussion staring at #16533 comment:25. If we want to deprecate them properly, I'd suggest doing so along the lines of #16607. Apart from that, the changes all look good. I'm doing the build, doc build, long test suite and so on tests now, and will push this change and set positive review once I'm done, unless any problems pop up. |
comment:15
I just filed #16640 for the Graphics3d problem, since that may be harder to fix, but is already a problem without this change here applied to it, so it should be dealt with independently. Once it has been dealt with, that code can also be changed to use |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:17
OK, now even the old API with positional parameters is restored. Everything looks good: look at the code, interactive experiments, doctests, documentation build. I hope it's OK if I give this a positive review even though the last commit is mine. After all, its a minor change, mostly restoring previous code. |
Reviewer: Martin von Gagern |
Changed branch from u/gagern/ticket/15515 to |
comment:19
Replying to @jdemeyer:
Jeroen, can you please have a look at #16640? Of course I'll welcome reviews for all my other modifications as well, but that ticket is closely related to what you did here. |
Changed commit from |
The function
graphics_filename()
insage/misc/temporary_file.py
was created for the notebook. When used in other places, it is unsafe (race condition + creates predicatable filenames) and can clutter the current working directory with files. Therefore, we should usetmp_filename()
ingraphics_filename()
except whenEMBEDDED_MODE
isTrue
. This also simplifies the logic in variousshow()
methods.Component: misc
Author: Jeroen Demeyer
Branch:
69b285d
Reviewer: Martin von Gagern
Issue created by migration from https://trac.sagemath.org/ticket/15515
The text was updated successfully, but these errors were encountered: