Re: python3 librados

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

 



On 11/30/2015 10:26 AM, misa-ceph@xxxxxxxxxxx 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@xxxxxxxxxxx> 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@xxxxxxxxxx>
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@xxxxxxxxxx>

     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@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com


_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com



[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux