Menu

#449 spock does not work with ipython 4.x (jupyter)

Jan16
resolved
None
spock
bug
2016-04-06
2016-03-23
No

As expected, spock needs to be adapted to work with ipython 4.x (which was a large change, aka "The big Split", moving many components to the jupyter framework)

Here is what I get on my debian testing:

:~$ spock      
/home/cpascual/.local/lib/python2.7/site-packages/IPython/config.py:13: ShimWarning: The `IPython.config` package has been deprecated. You should import from traitlets.config instead.
  "You should import from traitlets.config instead.", ShimWarning)
MainThread     INFO     2016-03-23 08:40:30,769 TaurusRootLogger: Using "PyQt4" for Qt
/home/cpascual/.local/lib/python2.7/site-packages/IPython/utils/traitlets.py:5: UserWarning: IPython.utils.traitlets has moved to a top-level traitlets package.
  warn("IPython.utils.traitlets has moved to a top-level traitlets package.")
/home/cpascual/.local/lib/python2.7/site-packages/IPython/qt.py:13: ShimWarning: The `IPython.qt` package has been deprecated. You should import from qtconsole instead.
  "You should import from qtconsole instead.", ShimWarning)
Traceback (most recent call last):
  File "/home/cpascual/src/sardana/scripts/spock", line 51, in <module>
    main()
  File "/home/cpascual/src/sardana/scripts/spock", line 48, in main
    genutils.run()
  File "/home/cpascual/src/sardana/src/sardana/spock/ipython_01_00/genutils.py", line 1143, in run
    IPythonQtConsoleApp.version.default_value = release.version
AttributeError: 'str' object has no attribute 'default_value'

Discussion

  • Carlos Pascual

    Carlos Pascual - 2016-03-23

    Note, the support can be restored by simply protecting the offending line with a try-except(pass):

      File "/home/cpascual/src/sardana/src/sardana/spock/ipython_01_00/genutils.py", line 1143, in run
        IPythonQtConsoleApp.version.default_value = release.version
    

    ... but we should also try to avoid the 4.x deprecation warnings

     
  • Frédéric PICCA

    Just for info

    test@diffabs6:~/.propellor$ rmadison ipython
    debian:
    ipython | 0.10-2 | squeeze | source, all
    ipython | 0.13.1-2+deb7u1 | wheezy | source, all
    ipython | 1.2.1-2~bpo70+1 | wheezy-backports | source, all
    ipython | 2.3.0-2 | jessie-kfreebsd | source, all
    ipython | 2.3.0-2 | jessie | source, all
    ipython | 2.4.1-1 | stretch | source, all
    ipython | 2.4.1-1 | sid | source, all

    so the problem is for now with ipython 2.4.1

    We are trying to see with the ipython Debian/Ubuntu maintainer which version will be available in the next Debian stable release.

    Cheeers

     
  • Carlos Pascual

    Carlos Pascual - 2016-03-23

    I sent a patch for this to the devel list.
    Note that PyTango and taurus also need fixing (https://github.com/tango-cs/PyTango/pull/14 , https://sourceforge.net/p/tauruslib/tickets/274/)

     
  • Zbigniew Reszela

    • status: waiting --> resolved
    • assigned_to: Carlos Pascual
    • Milestone: unassigned --> Jan16
     
  • Zbigniew Reszela

    Carlos, thanks for your contribution it is already part of the develop branch.

    I've added an aditional commit, correcting some wrong configuration that was raising other warning messages.

    It may be that working with an old version of PyTango one still sees the following deprecation working. But its origin is the PyTango code. This would look like this:

    (bug-449)zreszela@pc255:~/tmp> spock
    MainThread     INFO     2016-04-06 12:33:14,289 TaurusRootLogger: Using "PyQt4" for Qt
    /home/zreszela/tmp/bug-449/lib/python2.7/site-packages/IPython/config.py:13: ShimWarning: The `IPython.config` package has been deprecated. You should import from traitlets.config instead.
      "You should import from traitlets.config instead.", ShimWarning)
    Spock 1.6.2 -- An interactive laboratory application.
    
    help      -> Spock's help system.
    object?   -> Details about 'object'. ?object also works, ?? prints more.
    
    IPython profile: spockdoor
    
    Connected to Door_zreszela_1
    
    Door_zreszela_1 [1]: