Re: rados.py broken with Python2.4

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

 



On Tue, Mar 20, 2012 at 14:47, Nick Couchman <Nick.Couchman@xxxxxxxxx> wrote:
>> Just noticed this with ceph-0.43 - ceph-0.39 does not have this issue.  I'm
>> trying to use Ceph on multiple platforms, one of which is CentOS 5.  CentOS 5
>> still uses Python 2.4, and byte-compilation of the rados.py file fails during
>> the build of ceph 0.43 with the following error:
>>
>> Byte-compiling python modules...
>> rados.py  File "/usr/lib/python2.4/site-packages/rados.py", line 422
>>     with self.lock:
>>             ^
>> SyntaxError: invalid syntax
>>
>> A quick Google search doesn't turn up anything obviously wrong with this
>> statement - just that Python 2.4 may not support this?  Is there anything that
>> can be done to make this block of code (Ioctx, some of the aio stuff)
>> compatible with Python 2.4?

Python 2.4 does not support the with statement.

You should be able to replace that with

        self.lock.acquire()
        try:
            cb = self.safe_cbs[completion]
            del self.safe_cbs[completion]
        finally:
            self.lock.release()

I'm afraid we don't have resources to maintain Python support for
versions before 2.6; after all, 2.5 was released 5.5 years ago.
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux