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

Re: [Xen-devel] [PATCH RFC-for-4.12] tools/xen-foreign: Update python scripts to be Py3 compatible



On Mon, Mar 04, 2019 at 06:31:48PM +0000, Andrew Cooper wrote:
> The issues are:
>  * dict.has_key() was completely removed in Py3
>  * dict.keys() is an iterable rather than list in Py3, so .sort() doesn't 
> work.
>  * list.sort(cmp=) was deprecated in Py2.4 and removed in Py3.  Replace it
>    with a key= sort instead.
> 
> This is all compatible with Py2.4 and later, which is when the sorted()
> builtin was introduced.  Tested with Py2.7 and Py3.4
> 
> Reported-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.