After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 726332 - ipython_view broken with python3 and ipython 1.2.1
ipython_view broken with python3 and ipython 1.2.1
Status: RESOLVED FIXED
Product: accerciser
Classification: Applications
Component: plugins
3.11.x
Other All
: Normal normal
: ---
Assigned To: Accerciser Developers
Accerciser Developers
Depends on:
Blocks:
 
 
Reported: 2014-03-14 12:21 UTC by Patrick Welche
Modified: 2014-03-18 21:53 UTC
See Also:
GNOME target: 3.12
GNOME version: ---


Attachments
proposed patch (1.98 KB, patch)
2014-03-17 16:20 UTC, Javier Hernández
none Details | Review
proposed patch #2 (1.97 KB, patch)
2014-03-18 00:33 UTC, Javier Hernández
committed Details | Review

Description Patrick Welche 2014-03-14 12:21:10 UTC
Javier has kindly already fixed ipython_view.py to work with ipython 2. The problem is that it looks as though gnome 3.12 will be released before ipython 2 has a stable release. The most recent ipython release is 1.2.1, so making a working accerciser + python3 package isn't possible at the moment.

The test is to install ipython 1.2.1 and:
$ python3.3 ipython_view.py 

** (ipython_view.py:14643): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-j4KS2idA9i: No such file or directory
Traceback (most recent call last):
  • File "ipython_view.py", line 615 in <module>
    window.add(IPythonView())
  • File "ipython_view.py", line 540 in __init__
    self.execute()
  • File "ipython_view.py", line 172 in execute
    source_raw = self.IP.input_splitter.raw_reset()
AttributeError: 'IPythonInputSplitter' object has no attribute 'raw_reset'

Comment 1 Javier Hernández 2014-03-14 12:51:45 UTC
Hi Patrick,

thanks for filing this bug!

Yes, when I update the ipython view I always try to make it work with the latest code of ipython. They break the API regularly, I don't follow their progresses a lot, and it's difficult to keep backwards compatibility, but I always do my best.

Yesterday, Joanie also told me that she was experiencing problems with the ipython view on Fedora rawhide. And I was surprised that Fedora has sticked its ipython package in 0.13.2 [1] - perhaps, there are many reasons for that, but I dunno  them, so maybe I should ask about that.

Anyhoo, having said that. The best I can do is to dive a bit more on this and try to provide a backwards-compatibility patch. Meanwhile, patches from others are also welcome.

Cheers!

[1]: http://pkgs.fedoraproject.org/cgit/ipython.git/tree/
Comment 2 Javier Hernández 2014-03-17 12:58:25 UTC
Just as an update, 

I emailed Thomas Spura about Fedora's IPython, and he told me that "The reason for not updating is simple: it is not yet possible to unbundle all included software: https://bugzilla.redhat.com/show_bug.cgi?id=603937"
Comment 3 Javier Hernández 2014-03-17 16:20:38 UTC
Created attachment 272181 [details] [review]
proposed patch

Hi again, 

attached you'll find a patch that cares about the available version of IPython on the running system.

Patrick, Joanie,

could you please verify if this patch solves the issue for you? I've tried it with 0.13.2, 1.0.0 and 2.0.0-dev versions of IPyhton and looks like it's working fine.
Comment 4 Javier Hernández 2014-03-18 00:33:53 UTC
Created attachment 272217 [details] [review]
proposed patch #2

Updated patch - tested on 0.13.2, 1.2.1 and 2.0.0-dev
Comment 5 Joanmarie Diggs (IRC: joanie) 2014-03-18 01:39:23 UTC
(In reply to comment #4)
> Created an attachment (id=272217) [details] [review]
> proposed patch #2 [details]
> 
> Updated patch - tested on 0.13.2, 1.2.1 and 2.0.0-dev

Works for me! Thanks!! (And VERY sorry I only just now was able to test. Next time kick me before you do an entering-code-freeze release for which immediate feedback would be extremely helpful.)
Comment 6 Javier Hernández 2014-03-18 01:55:21 UTC
Thanks Joanie,

do not worry for that, I understand that we're all busy releasing right now. :)
I already rolled a 3.11.92 release but will ask for a code freeze break when Patrick also confirms that this patch works to him.
Comment 7 Patrick Welche 2014-03-18 11:30:34 UTC
Got worried, as my first attempt gave:

$ python3.3 ipython_view.py
Traceback (most recent call last):
  • File "ipython_view.py", line 627 in <module>
    window.add(IPythonView())
  • File "ipython_view.py", line 549 in __init__
    input_func=self.raw_input)
  • File "ipython_view.py", line 78 in __init__
    IPython.frontend.terminal.interactiveshell.raw_input_original = input_func
AttributeError: 'module' object has no attribute 'frontend'

but that is with ipython 1.1.0.

With ipython 1.2.1, i.e., latest release, all is well - thank you!
Comment 8 Javier Hernández 2014-03-18 12:26:33 UTC
Patrick,

thanks for testing it! :)

So by now, that means that with this patch we're covering:

  * IPython 2.0.0-dev -- upcoming version of IPython
  * IPython 1.2.1 -- current stable release of IPython 1.*
  * IPython 0.13.2 -- current stable release of IPython 0.*

I'll ask for permission to commit this, but if we cannot get the approval, then we should wait until the code freeze is lifted before getting this in. 

Sorry for the inconvenience.
Comment 9 Javier Hernández 2014-03-18 21:53:08 UTC
Review of attachment 272217 [details] [review]:

Given the approval from the RT [1],

this patch is in :)
see commit [2]


[1]: https://mail.gnome.org/archives/release-team/2014-March/msg00077.html
[2]: https://git.gnome.org/browse/accerciser/commit/?id=64b6e0c8f0b9bcb629fdefa54191e0d9f27b4336