igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] igraph0.6 & python2.5


From: Manu
Subject: Re: [igraph] igraph0.6 & python2.5
Date: Wed, 15 Dec 2010 17:07:05 +0100

Indeed there is a question about python 2.5 support :
$ python2.6 -c "import igraph"
$ python2.5 -c "import igraph"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/igraph/__init__.py", line 36,
in <module>
    from igraph.clustering import *
  File "/usr/lib/python2.5/site-packages/igraph/clustering.py", line
33, in <module>
    from igraph.drawing.colors import ClusterColoringPalette
  File "/usr/lib/python2.5/site-packages/igraph/drawing/__init__.py",
line 25, in <module>
    from igraph.drawing.graph import DefaultGraphDrawer
  File "/usr/lib/python2.5/site-packages/igraph/drawing/graph.py",
line 22, in <module>
    from igraph.drawing.baseclasses import AbstractDrawer,
AbstractCairoDrawer, \
  File "/usr/lib/python2.5/site-packages/igraph/drawing/baseclasses.py",
line 23, in <module>
    class AbstractCairoDrawer(AbstractDrawer):
  File "/usr/lib/python2.5/site-packages/igraph/drawing/baseclasses.py",
line 53, in AbstractCairoDrawer
    @bbox.setter
AttributeError: 'property' object has no attribute 'setter'

"@foo.setter" only appears in Python 2.6 :
http://docs.python.org/whatsnew/2.6.html#other-language-changes

Ok, so I should forget Python2.5... My only problem is that I run some
jobs on a cluster which (until now) only know Python 2.5 (or 2.4 !)
but I may manage soon to have Python2.6 on these machines.

The question in fact is more about Python3 adoption... what is it plan
for igraph ?
It will be annoying to have igraph 0.6 working only on Python 3, as -I
think- it will take some time to see Python3 widely adopted...
(it's impossible for me to move on Python3 since Numpy/Scipy are not ported !)

I guest that Python2.6's "future import" doesn't permit to enjoy all
Python 3 new features (?), however if it permit to have a code
(fully?) compatible with Python3 it seems to be a nice solution !

Anyway it looks natural to have igraph 0.5 supporting Python >= 2.5,
and igraph 0.6 supporting Python >=2.6 ;-)

Best,

Emmanuel
On Wed, Dec 15, 2010 at 12:05 AM, Tamás Nepusz <address@hidden> wrote:
>
> Hello,
>
> > I tried to compile the last version on igraph0.6 (from lp)  and I had a 
> > problem compiling igraph-python with python 2.5 :
> > the 2 macros : Py_TYPE and PyVarObject_HEAD_INIT are not defined in 
> > python2.5.
> Thanks for reporting that; I've started using these macros when I was 
> tweaking the code to run on Python 3.x and Python 2.x as well, not knowing 
> that these are not available in Python 2.5. I've added your patch to 
> py2compat.h instead of common.h.
>
> > Do you plan to make igraph0.6 compatible with python2.5 or just >=2.6 ?
> I haven't tested igraph 0.6 on Python 2.5 for a while, so I don't know 
> whether it still works on 2.5 or not. As for supporting Python 2.6 for the 
> next release: I haven't decided yet, but I was slightly leaning towards 
> dropping Python 2.5 support as there are quite a few nice features in Python 
> 2.6 that would make igraph's Python code easier to maintain; for instance, 
> "print" became a function in Python 3, and this behaviour can be turned on in 
> Python 2.6 using "from __future__ import print_function" (meaning that I 
> don't have to maintain two separate codebases, one for Python 2.x and one for 
> Python 3.x). So, why would you like to stick to Python 2.5 instead of moving 
> on to Python 2.6 at least? Of course I will keep on maintaining a version for 
> Python 2.5 if the users stand up for it :)
>
> Best,
> Tamas
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help



reply via email to

[Prev in Thread] Current Thread [Next in Thread]