[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ceph-users
Subject:    [ceph-users] python3 librados
From:       jdurgin () redhat ! com (Josh Durgin)
Date:       2015-11-30 22:49:04
Message-ID: 565CD260.6040904 () redhat ! com
[Download RAW message or body]

On 11/30/2015 10:26 AM, misa-ceph at hudrydum.cz wrote:
> Hi John,
>
> thanks for the info. It seems that patch adds a python3 compatibility support
> but leaves the ugly thread spawning intact. No idea if it makes sense to try
> to merge some of my changes back to the ceph source.

Yeah, like Wido mentioned these changes were designed to keep rados+rbd
working in python2 and python3.

It looks like you've fleshed out the object operation api - adding some
of the missing constants and methods, e.g. cmpxattr(), assert_exists(),
etc. Those changes would be quite useful upstream.

The asyncio interface seems useful as well. To keep the base rados.py
methods agnostic to the async framework used, asyncio versions could be
implemented as wrappers around them, or maybe just an optional new
module, e.g. rados.asyncio.

The thread spawning in rados.py is a separate issue - that was
introduced so that /usr/bin/ceph (or other librados python users) could
be interrupted by SIGINT (i.e. ^C). If there's a better way around that
(and maybe putting that logic into the ceph cli would be better at this
point) I for one would be happy to get rid of it.

Josh

> On Monday 30 of November 2015 09:46:18 John Spray wrote:
>> On Sun, Nov 29, 2015 at 7:20 PM,  <misa-ceph at hudrydum.cz> wrote:
>>> Hi everyone,
>>>
>>> for my pet project I've needed python3 rados library. So I've took the
>>> existing python2 rados code and clean it up a little bit to fit my needs.
>>> The lib contains basic interface, asynchronous operations and also
>>> asyncio wrapper for convenience in asyncio programs.
>>>
>>> If you are interested the code can be found at
>>>
>>> https://github.com/mihu/python3-rados
>>
>> I haven't played with this, but I do remember that some level of
>> python 3 support was merged to master recently:
>>
>> commit b7de34bc7e4237fd407dc6c0d714deec026d0594
>> Merge: 773713b 615f8f4
>> Author: Josh Durgin <jdurgin at redhat.com>
>> Date:   Thu Nov 12 19:32:42 2015 -0800
>>
>>      Merge branch 'pybind3' of https://github.com/dcoles/ceph into
>> wip-pybind3
>>
>>      pybind: Add Python 3 support for rados and rbd modules
>>
>>      Reviewed-by: Josh Durgin <jdurgin at redhat.com>
>>
>>      Conflicts:
>>          src/pybind/rbd.py (new create args, minor fix to work with py3)
>>
>> It would be good to reconcile this with that.
>>
>> Cheers,
>> John
>>
>>> Cheers
>>> _______________________________________________
>>> ceph-users mailing list
>>> ceph-users at lists.ceph.com
>>> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>
> _______________________________________________
> ceph-users mailing list
> ceph-users at lists.ceph.com
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic