Fwd: [yt_analysis/yt] show() failure due to IPython API changes (issue #428)
Can somebody address this? I'd like to ensure we can continue keeping up with IPython (especially since a bunch of us are investing in it quite heavily for our own workflows) but I can't add this to my queue this at the moment. I think the best way to do this is probably to add an IPython compat layer to yt/utilities/ that handles higher-level functionality, since we use relatively little of the IPython API. -Matt ---------- Forwarded message ---------- From: Anthony Scopatz <issues-reply@bitbucket.org> Date: Tue, Sep 25, 2012 at 3:49 PM Subject: [yt_analysis/yt] show() failure due to IPython API changes (issue #428) To: matthewturk@gmail.com --- you can reply above this line --- New issue 428: show() failure due to IPython API changes https://bitbucket.org/yt_analysis/yt/issue/428/show-failure-due-to-ipython-a... Anthony Scopatz: Reporting that the Plot.show() method seems to fail on IPython 0.14-dev because of an API change. The send_figure function is no longer where yt thinks it is. {{{python ImportError Traceback (most recent call last) <ipython-input-2-4804b2a8abc5> in <module>() 4 p.annotate_flash_ray_data(pf, 'jet', 10) 5 p.annotate_timestamp(0.2/z, 0.2/z, pf, units="days", size=24) ----> 6 p.show() /home/scopatz/.local/lib/python2.7/site-packages/yt-3.0dev-py2.7-linux-x86_64.egg/yt/visualization/plot_window.pyc in show(self) 788 """ 789 if "__IPYTHON__" in dir(__builtin__): --> 790 self._send_zmq() 791 else: 792 raise YTNotInsideNotebook /home/scopatz/.local/lib/python2.7/site-packages/yt-3.0dev-py2.7-linux-x86_64.egg/yt/visualization/plot_window.pyc in _send_zmq(self) 763 764 def _send_zmq(self): --> 765 from IPython.zmq.pylab.backend_inline import \ 766 send_figure 767 for k, v in sorted(self.plots.iteritems()): ImportError: cannot import name send_figure }}} -- This is an issue notification from bitbucket.org. You are receiving this either because you are the owner of the issue, or you are following the issue.
Hello All, I have added a fix for this in both 2.x & 3.0. However, I don't have push rights on 2.x so I simply sent a pull request. If someone can try it out an report that it works for them we can go ahead and close issue #428. The underlying issue is that IPython has gone to an abstract display model, very similar to repr strings but for an interactive environment. See [1]. Be Well Anthony 1. https://github.com/ipython/ipython/commit/1ea9ce2528e5fe5de0b4f9f865cb95322d... On Tue, Sep 25, 2012 at 2:53 PM, Matthew Turk <matthewturk@gmail.com> wrote:
Can somebody address this? I'd like to ensure we can continue keeping up with IPython (especially since a bunch of us are investing in it quite heavily for our own workflows) but I can't add this to my queue this at the moment. I think the best way to do this is probably to add an IPython compat layer to yt/utilities/ that handles higher-level functionality, since we use relatively little of the IPython API.
-Matt
---------- Forwarded message ---------- From: Anthony Scopatz <issues-reply@bitbucket.org> Date: Tue, Sep 25, 2012 at 3:49 PM Subject: [yt_analysis/yt] show() failure due to IPython API changes (issue #428) To: matthewturk@gmail.com
--- you can reply above this line ---
New issue 428: show() failure due to IPython API changes
https://bitbucket.org/yt_analysis/yt/issue/428/show-failure-due-to-ipython-a...
Anthony Scopatz:
Reporting that the Plot.show() method seems to fail on IPython 0.14-dev because of an API change. The send_figure function is no longer where yt thinks it is.
{{{python ImportError Traceback (most recent call last) <ipython-input-2-4804b2a8abc5> in <module>() 4 p.annotate_flash_ray_data(pf, 'jet', 10) 5 p.annotate_timestamp(0.2/z, 0.2/z, pf, units="days", size=24) ----> 6 p.show()
/home/scopatz/.local/lib/python2.7/site-packages/yt-3.0dev-py2.7-linux-x86_64.egg/yt/visualization/plot_window.pyc in show(self) 788 """ 789 if "__IPYTHON__" in dir(__builtin__): --> 790 self._send_zmq() 791 else: 792 raise YTNotInsideNotebook
/home/scopatz/.local/lib/python2.7/site-packages/yt-3.0dev-py2.7-linux-x86_64.egg/yt/visualization/plot_window.pyc in _send_zmq(self) 763 764 def _send_zmq(self): --> 765 from IPython.zmq.pylab.backend_inline import \ 766 send_figure 767 for k, v in sorted(self.plots.iteritems()):
ImportError: cannot import name send_figure }}}
--
This is an issue notification from bitbucket.org. You are receiving this either because you are the owner of the issue, or you are following the issue. _______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
Xfd fc On Sep 25, 2012 1:33 PM, "Anthony Scopatz" <scopatz@gmail.com> wrote:
Hello All,
I have added a fix for this in both 2.x & 3.0. However, I don't have push rights on 2.x so I simply sent a pull request. If someone can try it out an report that it works for them we can go ahead and close issue #428.
The underlying issue is that IPython has gone to an abstract display model, very similar to repr strings but for an interactive environment. See [1].
Be Well Anthony
1. https://github.com/ipython/ipython/commit/1ea9ce2528e5fe5de0b4f9f865cb95322d...
On Tue, Sep 25, 2012 at 2:53 PM, Matthew Turk <matthewturk@gmail.com>wrote:
Can somebody address this? I'd like to ensure we can continue keeping up with IPython (especially since a bunch of us are investing in it quite heavily for our own workflows) but I can't add this to my queue this at the moment. I think the best way to do this is probably to add an IPython compat layer to yt/utilities/ that handles higher-level functionality, since we use relatively little of the IPython API.
-Matt
---------- Forwarded message ---------- From: Anthony Scopatz <issues-reply@bitbucket.org> Date: Tue, Sep 25, 2012 at 3:49 PM Subject: [yt_analysis/yt] show() failure due to IPython API changes (issue #428) To: matthewturk@gmail.com
--- you can reply above this line ---
New issue 428: show() failure due to IPython API changes
https://bitbucket.org/yt_analysis/yt/issue/428/show-failure-due-to-ipython-a...
Anthony Scopatz:
Reporting that the Plot.show() method seems to fail on IPython 0.14-dev because of an API change. The send_figure function is no longer where yt thinks it is.
{{{python ImportError Traceback (most recent call last) <ipython-input-2-4804b2a8abc5> in <module>() 4 p.annotate_flash_ray_data(pf, 'jet', 10) 5 p.annotate_timestamp(0.2/z, 0.2/z, pf, units="days", size=24) ----> 6 p.show()
/home/scopatz/.local/lib/python2.7/site-packages/yt-3.0dev-py2.7-linux-x86_64.egg/yt/visualization/plot_window.pyc in show(self) 788 """ 789 if "__IPYTHON__" in dir(__builtin__): --> 790 self._send_zmq() 791 else: 792 raise YTNotInsideNotebook
/home/scopatz/.local/lib/python2.7/site-packages/yt-3.0dev-py2.7-linux-x86_64.egg/yt/visualization/plot_window.pyc in _send_zmq(self) 763 764 def _send_zmq(self): --> 765 from IPython.zmq.pylab.backend_inline import \ 766 send_figure 767 for k, v in sorted(self.plots.iteritems()):
ImportError: cannot import name send_figure }}}
--
This is an issue notification from bitbucket.org. You are receiving this either because you are the owner of the issue, or you are following the issue. _______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
On Tue, Sep 25, 2012 at 4:32 PM, Anthony Scopatz <scopatz@gmail.com> wrote:
Hello All,
I have added a fix for this in both 2.x & 3.0. However, I don't have push rights on 2.x so I simply sent a pull request. If someone can try it out an report that it works for them we can go ahead and close issue #428.
Thanks, Anthony! And I've also added you to the core team. We still try to do most big changes through PRs, but for bug fixes like this (where the impact is relatively small and the fix obvious) direct pushes are just fine.
The underlying issue is that IPython has gone to an abstract display model, very similar to repr strings but for an interactive environment. See [1].
This is interesting! Do you think we could leverage this new development further? -Matt
Be Well Anthony
1. https://github.com/ipython/ipython/commit/1ea9ce2528e5fe5de0b4f9f865cb95322d...
On Tue, Sep 25, 2012 at 2:53 PM, Matthew Turk <matthewturk@gmail.com> wrote:
Can somebody address this? I'd like to ensure we can continue keeping up with IPython (especially since a bunch of us are investing in it quite heavily for our own workflows) but I can't add this to my queue this at the moment. I think the best way to do this is probably to add an IPython compat layer to yt/utilities/ that handles higher-level functionality, since we use relatively little of the IPython API.
-Matt
---------- Forwarded message ---------- From: Anthony Scopatz <issues-reply@bitbucket.org> Date: Tue, Sep 25, 2012 at 3:49 PM Subject: [yt_analysis/yt] show() failure due to IPython API changes (issue #428) To: matthewturk@gmail.com
--- you can reply above this line ---
New issue 428: show() failure due to IPython API changes
https://bitbucket.org/yt_analysis/yt/issue/428/show-failure-due-to-ipython-a...
Anthony Scopatz:
Reporting that the Plot.show() method seems to fail on IPython 0.14-dev because of an API change. The send_figure function is no longer where yt thinks it is.
{{{python ImportError Traceback (most recent call last) <ipython-input-2-4804b2a8abc5> in <module>() 4 p.annotate_flash_ray_data(pf, 'jet', 10) 5 p.annotate_timestamp(0.2/z, 0.2/z, pf, units="days", size=24) ----> 6 p.show()
/home/scopatz/.local/lib/python2.7/site-packages/yt-3.0dev-py2.7-linux-x86_64.egg/yt/visualization/plot_window.pyc in show(self) 788 """ 789 if "__IPYTHON__" in dir(__builtin__): --> 790 self._send_zmq() 791 else: 792 raise YTNotInsideNotebook
/home/scopatz/.local/lib/python2.7/site-packages/yt-3.0dev-py2.7-linux-x86_64.egg/yt/visualization/plot_window.pyc in _send_zmq(self) 763 764 def _send_zmq(self): --> 765 from IPython.zmq.pylab.backend_inline import \ 766 send_figure 767 for k, v in sorted(self.plots.iteritems()):
ImportError: cannot import name send_figure }}}
--
This is an issue notification from bitbucket.org. You are receiving this either because you are the owner of the issue, or you are following the issue. _______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
On Tue, Sep 25, 2012 at 3:36 PM, Matthew Turk <matthewturk@gmail.com> wrote:
Hello All,
I have added a fix for this in both 2.x & 3.0. However, I don't have
On Tue, Sep 25, 2012 at 4:32 PM, Anthony Scopatz <scopatz@gmail.com> wrote: push
rights on 2.x so I simply sent a pull request. If someone can try it out an report that it works for them we can go ahead and close issue #428.
Thanks, Anthony! And I've also added you to the core team. We still try to do most big changes through PRs, but for bug fixes like this (where the impact is relatively small and the fix obvious) direct pushes are just fine.
Great, thanks! That seems like a sane development model to me. As you know, I'll probably be doing most of my work in 3.0 anyway....
The underlying issue is that IPython has gone to an abstract display
model,
very similar to repr strings but for an interactive environment. See [1].
This is interesting! Do you think we could leverage this new development further?
Probably. I don't know how far along they are but I think that the idea is for objects to be able to autodisplay themselves in a variety of contexts (notebook, command line, static html, etc), with the option of having distinct displays for each context. This would allow, for instance, Plots to show themselves. This is worth following more, though... Be Well Anthony
-Matt
Be Well Anthony
1.
https://github.com/ipython/ipython/commit/1ea9ce2528e5fe5de0b4f9f865cb95322d...
On Tue, Sep 25, 2012 at 2:53 PM, Matthew Turk <matthewturk@gmail.com>
wrote:
Can somebody address this? I'd like to ensure we can continue keeping up with IPython (especially since a bunch of us are investing in it quite heavily for our own workflows) but I can't add this to my queue this at the moment. I think the best way to do this is probably to add an IPython compat layer to yt/utilities/ that handles higher-level functionality, since we use relatively little of the IPython API.
-Matt
---------- Forwarded message ---------- From: Anthony Scopatz <issues-reply@bitbucket.org> Date: Tue, Sep 25, 2012 at 3:49 PM Subject: [yt_analysis/yt] show() failure due to IPython API changes
(issue
#428) To: matthewturk@gmail.com
--- you can reply above this line ---
New issue 428: show() failure due to IPython API changes
https://bitbucket.org/yt_analysis/yt/issue/428/show-failure-due-to-ipython-a...
Anthony Scopatz:
Reporting that the Plot.show() method seems to fail on IPython 0.14-dev because of an API change. The send_figure function is no longer where yt thinks it is.
{{{python ImportError Traceback (most recent call last) <ipython-input-2-4804b2a8abc5> in <module>() 4 p.annotate_flash_ray_data(pf, 'jet', 10) 5 p.annotate_timestamp(0.2/z, 0.2/z, pf, units="days", size=24) ----> 6 p.show()
/home/scopatz/.local/lib/python2.7/site-packages/yt-3.0dev-py2.7-linux-x86_64.egg/yt/visualization/plot_window.pyc
in show(self) 788 """ 789 if "__IPYTHON__" in dir(__builtin__): --> 790 self._send_zmq() 791 else: 792 raise YTNotInsideNotebook
/home/scopatz/.local/lib/python2.7/site-packages/yt-3.0dev-py2.7-linux-x86_64.egg/yt/visualization/plot_window.pyc
in _send_zmq(self) 763 764 def _send_zmq(self): --> 765 from IPython.zmq.pylab.backend_inline import \ 766 send_figure 767 for k, v in sorted(self.plots.iteritems()):
ImportError: cannot import name send_figure }}}
--
This is an issue notification from bitbucket.org. You are receiving this either because you are the owner of the issue, or you are following the issue. _______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
On Tue, Sep 25, 2012 at 1:45 PM, Anthony Scopatz <scopatz@gmail.com> wrote:
Probably. I don't know how far along they are but I think that the idea is for objects to be able to autodisplay themselves in a variety of contexts (notebook, command line, static html, etc), with the option of having distinct displays for each context. This would allow, for instance, Plots to show themselves. This is worth following more, though...
This is already very well established, and we haven't changed that protocol since 0.12, so you guys can consider that to be pretty solid. Here are the two most relevant examples (these ship in our docs/examples/notebooks directory): 1. The notebook that explains the display protocol in detail: http://nbviewer.ipython.org/3784613/ I posted it from a gist b/c the version we ship has been stripped of output (to keep it small). But that's just our default example after running it. 2. An illustration of how our sympy extension takes advantage of it to provide natural latex printing of all sympy outputs: http://nbviewer.ipython.org/urls/raw.github.com/ipython/ipython/master/docs/... HTH, f
participants (4)
-
Andrew Myers
-
Anthony Scopatz
-
Fernando Perez
-
Matthew Turk