Menu

#650 [pytango] 8.1.1 not compatible with ipyton 1.2.0-rc1

closed-fixed
None
PyTango
5
2014-02-06
2014-02-06
No

Hello, with the latest 1.2.0~rc1 version of ipython (which just entered into debian unstable). I get this error message.

picca@mordor:~$ itango
Traceback (most recent call last):
File "/usr/bin/itango", line 27, in <module>
main()
File "/usr/bin/itango", line 23, in main
import PyTango.ipython
File "/usr/lib/python2.7/dist-packages/PyTango/ipython/init.py", line 36, in <module>
ipv = get_ipython_version()
File "/usr/lib/python2.7/dist-packages/PyTango/ipython/common.py", line 48, in get_ipython_version
return StrictVersion(v)
File "/usr/lib/python2.7/distutils/version.py", line 40, in init
self.parse(vstring)
File "/usr/lib/python2.7/distutils/version.py", line 107, in parse
raise ValueError, "invalid version number '%s'" % vstring
ValueError: invalid version number '1.2.0-rc1'

cheers

Fred

Discussion

  • Frédéric PICCA

    so it seems that the ipython rc version number is not a valid version number expected by the StricVersion class of distutils.

    So this problem will vanish with the upload of the official 1.2.0 version.

    Now should we deal with the official ipython version numbering or should we ask IPython guyes to follow the official distutils version numbering schema ?

     
  • Frédéric PICCA

    here the official version numbering of IPython

    _version_major = 1
    _version_minor = 1
    _version_patch = 0

    _version_extra = 'dev'

    _version_extra = 'rc1'

    _version_extra = '' # Uncomment this for full releases

    codename = 'An Afternoon Hack'

    Construct full version string from these.

    _ver = [_version_major, _version_minor, _version_patch]

    version = '.'.join(map(str, _ver))
    if _version_extra:
    version = version + '-' + _version_extra

    version = version # backwards compatibility name
    version_info = (_version_major, _version_minor, _version_patch, _version_extra)

    So this is a tuple

    in our case we have the _version_extra = "rc1"

     
  • Tiago Coutinho

    Tiago Coutinho - 2014-02-06

    I think we can change PyTango so it deals with this kind of numbering.
    Something like this in PyTango.ipython.common:

    def get_ipython_version():
        """Returns the current IPython version"""
        import IPython
        v = None
        if hasattr(IPython, "version_info"):
            v = '.'.join(map(str, IPython.version_info[:3]))
        else:
            try:
                try:
                    v = IPython.Release.version
                except:
                    try:
                        v = IPython.release.version
                    except:
                        pass
            except:
                pass
        return StrictVersion(v)
    
     
  • Frédéric PICCA

    yes this way we care only about the real release version even if we are using pre version during developpement.

     
  • Tiago Coutinho

    Tiago Coutinho - 2014-02-06
    • status: open --> closed-fixed
    • assigned_to: Coutinho
    • Category: Archiving --> PyTango
     
  • Tiago Coutinho

    Tiago Coutinho - 2014-02-06

    Fixed in PyTango SVN trunk since revision #24800
    Will become visible in next PyTango 8.1.2

     

Log in to post a comment.