* Python 3 support
@ 2014-07-06 23:11 Alex Xu
2014-07-07 8:05 ` Jacek Konieczny
2014-07-07 9:34 ` Andrew Cooper
0 siblings, 2 replies; 4+ messages in thread
From: Alex Xu @ 2014-07-06 23:11 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 390 bytes --]
Please CC me on replies.
Is there any Python 3 support planned? I would like to write my libxl
scripts in Python 3 instead of 2.
I tried searching the mailing list archives and Google but got no useful
answers.
I tried porting Xen manually using such blunt instruments as 2to3 -w,
but encountered obvious difficulties due to the complexity of the code.
Thanks in advance.
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Python 3 support
2014-07-06 23:11 Python 3 support Alex Xu
@ 2014-07-07 8:05 ` Jacek Konieczny
2014-07-07 10:56 ` Ian Campbell
2014-07-07 9:34 ` Andrew Cooper
1 sibling, 1 reply; 4+ messages in thread
From: Jacek Konieczny @ 2014-07-07 8:05 UTC (permalink / raw)
To: Alex Xu, xen-devel
On 07/07/14 01:11, Alex Xu wrote:
> Is there any Python 3 support planned?
That would be great, but I have heard nothing of such plans.
> I would like to write my libxl scripts in Python 3 instead of 2.
[...]
> I tried porting Xen manually using such blunt instruments as 2to3 -w,
> but encountered obvious difficulties due to the complexity of the code.
I have chosen to use Xen libxenlight, libxenstore and libxenctrl
directly through the 'ctypes' module from my Python 3 applications (I
made some custom wrappers). It is not the most elegant solution and
requires careful updates for any new major Xen version, but works and
can sometimes provide more or better functionality than the Python
modules included with the Xen distribution (they are not very actively
maintained).
Unfortunately, any upstream Xen Python utilities still depend on Python
2, so it may be hard to have a Xen system free of the old Python
interpreter.
Greets,
Jacek
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Python 3 support
2014-07-06 23:11 Python 3 support Alex Xu
2014-07-07 8:05 ` Jacek Konieczny
@ 2014-07-07 9:34 ` Andrew Cooper
1 sibling, 0 replies; 4+ messages in thread
From: Andrew Cooper @ 2014-07-07 9:34 UTC (permalink / raw)
To: Alex Xu, xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 1279 bytes --]
On 07/07/14 00:11, Alex Xu wrote:
> Please CC me on replies.
>
> Is there any Python 3 support planned?
Not specifically, although it certainly would be nice to get done.
> I would like to write my libxl
> scripts in Python 3 instead of 2.
Which bits are you looking for py3 support with?
>
>
> I tried searching the mailing list archives and Google but got no useful
> answers.
>
> I tried porting Xen manually using such blunt instruments as 2to3 -w,
> but encountered obvious difficulties due to the complexity of the code.
The compiled python extensions shouldn't be too hard to adjust to being
Py3 compatible. There are a standard set of macros used for making Py2
and Py3 .so's from a single source.
The python scripts however are rather more difficult. For better or for
worse, our current support statement is for Python 2.3 and later, which
vastly limits the ability to make join Py2/Py3 single .py files
Changing the supported version to 2.4 would help a little, but wouldn't
make it much easier. We certainly can't move the minimum supported
version to anything newer than 2.4 for the forseeable future, as
RHEL/CentOS 5.x era OSes are still in supported and active use.
There is probably some work which can be done to make 2to3 more effective.
~Andrew
[-- Attachment #1.2: Type: text/html, Size: 1937 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Python 3 support
2014-07-07 8:05 ` Jacek Konieczny
@ 2014-07-07 10:56 ` Ian Campbell
0 siblings, 0 replies; 4+ messages in thread
From: Ian Campbell @ 2014-07-07 10:56 UTC (permalink / raw)
To: Jacek Konieczny; +Cc: Alex Xu, xen-devel
On Mon, 2014-07-07 at 10:05 +0200, Jacek Konieczny wrote:
> On 07/07/14 01:11, Alex Xu wrote:
> > Is there any Python 3 support planned?
>
> That would be great, but I have heard nothing of such plans.
>
> > I would like to write my libxl scripts in Python 3 instead of 2.
> [...]
> > I tried porting Xen manually using such blunt instruments as 2to3 -w,
> > but encountered obvious difficulties due to the complexity of the code.
>
> I have chosen to use Xen libxenlight, libxenstore and libxenctrl
> directly through the 'ctypes' module from my Python 3 applications (I
> made some custom wrappers). It is not the most elegant solution and
> requires careful updates for any new major Xen version, but works and
> can sometimes provide more or better functionality than the Python
> modules included with the Xen distribution (they are not very actively
> maintained).
For all intents and purposes you should consider the libxenlight Python
bindings to simply not exist. They are not maintained nor built by
default and don't really work. If someone wanted to resurrect them I
would strongly encourage them to start from scratch...
The xenstore and xenctrl modules should be in a better state, although
they are no longer widely used by the default toolstack now that xend is
removed, but we would accept patches etc and they are build tested as
part of our normal process.
> Unfortunately, any upstream Xen Python utilities still depend on Python
> 2, so it may be hard to have a Xen system free of the old Python
> interpreter.
>
> Greets,
> Jacek
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-07 10:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-06 23:11 Python 3 support Alex Xu
2014-07-07 8:05 ` Jacek Konieczny
2014-07-07 10:56 ` Ian Campbell
2014-07-07 9:34 ` Andrew Cooper
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.