WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] blktap2: Remove set() for Python 2.3

To: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] blktap2: Remove set() for Python 2.3
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Thu, 23 Jul 2009 21:23:23 +0900
Cc: horms@xxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 23 Jul 2009 05:23:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20090721.131139.33560945.kuwa@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20090717.162638.15617069.kuwa@xxxxxxxxxxxxxx> <20090721034155.GB13928@xxxxxxxxxxxx> <20090721.131139.33560945.kuwa@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
How about creating a file which includes the followings
and import it?
 
+# for 2.3 compatibility
+try:
+    set()
+except NameError:
+    from sets import Set as set

On Tue, Jul 21, 2009 at 01:11:39PM +0900, KUWAMURA Shin'ya wrote:
> Hi,
> 
> >>>>> On Tue, 21 Jul 2009 13:41:59 +1000
> >>>>> horms@xxxxxxxxxxxx(Simon Horman)  said:
> > 
> > On Fri, Jul 17, 2009 at 04:26:38PM +0900, KUWAMURA Shin'ya wrote:
> >
> > > This removes set() for Python 2.3, since set() is added from Python 2.4.
> > set() seems to be used in a number of other places in the code.
> > Is that a problem?
> 
> They cause a problem only when the corresponding feature is used.
> # XenAPI, ACM, etc.
> 
> But starting xend failed by the following code:
> > tools/python/xen/util/pci.py:    if len(l) != len(set(l)):
> 
> I removed it on weekly testing ad hoc.
> 
> Best regards,

-- 
yamahata

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel