Opened 10 years ago

Closed 10 years ago

#909 closed defect (fixed)

pyld is python2.7+ only

Reported by: Christopher Allan Webber Owned by:
Priority: critical Milestone: 0.7.0
Component: programming Keywords:
Cc: Parent Tickets:

Description

We recently included pyld as a dependency.

This breaks python2.6 compatibility. So, this leaves us with two options:

  • Drop python2.6 support
  • Make the features that require pyld optional.

We should decide on this before 0.7.0 comes out.

Attachments (1)

python2.6_errors.txt (5.3 KB ) - added by loic_le.ninan 10 years ago.
After trying a fresh install, the Pyld issue seems to be resolved. However setup.py ends with errors and one test is failing on my system. See attached file for trace and more.

Download all attachments as: .zip

Change History (8)

comment:1 by loic_le.ninan, 10 years ago

I ran into this when installing for the first time last week (I am using Debian 6 / Python 2.6.6). My solution was to "debootstrap" a minimal Debian 7 filesystem, with the default Python being 2.7.3, and chroot into that. It works fine, without having to compile a new python or upgrade the existing system.

So dropping python 2.6 should not be a problem :

  • Python 2.6 is quite old now (even Debian stable dropped it last year...)
  • There are ways to get Python 2.7 working

comment:2 by Boris Bobrov, 10 years ago

I wonder what parts of pyld don't work on 2.6. Has anybody asked pyld's author about that?

comment:3 by loic_le.ninan, 10 years ago

Replying to breton:

I wonder what parts of pyld don't work on 2.6.

Python 2.6 was complaining about the lack of the cmp_to_key function (it was introduced in 2.7).

Has anybody asked pyld's author about that?

Well... maybe ? Because according to recent history on github, this was fixed a few days ago in versions >= 0.5.2 by defining a custom cmp_to_key function in case it is not already there.

I just tried a quick install from 2.6 and the Pyld installation went fine.

(1 test failed though, so I will try to reproduce that in a clean environment and with the latest code when I find time)

by loic_le.ninan, 10 years ago

Attachment: python2.6_errors.txt added

After trying a fresh install, the Pyld issue seems to be resolved. However setup.py ends with errors and one test is failing on my system. See attached file for trace and more.

comment:4 by Christopher Allan Webber, 10 years ago

Milestone: 0.7.0

comment:5 by Jessica Tallon, 10 years ago

So the reason that in python 2.6 fails the excinfo.errisinstance(TypeError) fails is because the excinfo.errisinstance call is doing an isinstance call on the excinfo.value. In python 2.6 excinfo.value is a string value where as in python 2.7 excinfo is a instance of TypeError. This seems to be a bug with either the "pytest" or "py" library, not sure which at this point.

A way round this would be to do something like:

assert excinfo.type == TypeError

This would work across both. This is however not a pyld issue but actually just becoming a python 2.6 tests are broken.

comment:6 by Christopher Allan Webber, 10 years ago

So in that case, can we close out this ticket? "python2.6 working except kinda for tests" is okay-ish.

I wonder if that's a bug upstream and if it should be filed though. The pytest site claims python2.5+ compatibility...

comment:7 by Jessica Tallon, 10 years ago

Resolution: fixed
Status: newclosed

Yes this looks like it runs fine besides the tests.

Note: See TracTickets for help on using tickets.