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: Simon Horman <horms@xxxxxxxxxxxx>
Date: Tue, 21 Jul 2009 13:41:59 +1000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 20 Jul 2009 20:42:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20090717.162638.15617069.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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
On Fri, Jul 17, 2009 at 04:26:38PM +0900, KUWAMURA Shin'ya wrote:
> Hi,
> 
> 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?

# grep -r [^a-z_]set\( tools/python/xen/
tools/python/xen/util/acmpolicy.py:            bad_renamings = 
set(vmlabel_map.keys()) - set(oldvmnames)
tools/python/xen/util/acmpolicy.py:            bad_renamings = 
set(reslabel_map.keys()) - set(oldresnames)
tools/python/xen/util/acmpolicy.py:               len( 
set(res_stes).intersection( set(vm_stes) ) ) == 0:
tools/python/xen/util/acmpolicy.py:        unknown_ste = set()
tools/python/xen/util/acmpolicy.py:        unknown_chw = set()
tools/python/xen/util/acmpolicy.py:        if len(vmlabels) != 
len(set(vmlabels)) or \
tools/python/xen/util/acmpolicy.py:           len(resnames) != 
len(set(resnames)) or \
tools/python/xen/util/acmpolicy.py:           len(stes)     != len(set(stes))   
  or \
tools/python/xen/util/acmpolicy.py:           len(chws)     != len(set(chws)):
tools/python/xen/util/acmpolicy.py:                unknown_chw |= 
(set(chws_by_vm[v]) - set(chws))
tools/python/xen/util/acmpolicy.py:                unknown_ste |= 
(set(stes_by_vm[v]) - set(stes))
tools/python/xen/util/acmpolicy.py:                unknown_ste |= 
(set(stes_by_res[r]) - set(stes))
tools/python/xen/util/pci.py:    if len(l) != len(set(l)):
tools/python/xen/xend/XendAPI.py:            'classes' : set(),
tools/python/xen/xend/XendDomainInfo.py:        # just itterating through 
set(map(..., pci_devs))
tools/python/xen/xend/XendDomainInfo.py:        done = set()
tools/python/xen/xend/XendDomainInfo.py:            done |= set([key])
tools/python/xen/xend/server/DevController.py:    ev.set()
tools/python/xen/xend/server/DevController.py:    ev.set()
tools/python/xen/xend/server/DevController.py:    ev.set()
tools/python/xen/xend/server/pciif.py:        if len(pci_str_list) != 
len(set(pci_str_list)):
tools/python/xen/xm/labels.py:        names = list(set(names1).union(names2))
tools/python/xen/xm/main.py:        def set(keys, val):
tools/python/xen/xm/main.py:                lambda x: set(['MAC'], x),
tools/python/xen/xm/main.py:                lambda x: set(['network'], 
get_net_from_bridge(x)),
tools/python/xen/xm/main.py:                lambda x: set(['other_config', 
'ip'], x),
tools/python/xen/xm/main.py:                lambda x: set(['other_config', 
'script'], x),
tools/python/xen/xm/main.py:                lambda x: set(['other_config', 
'backend'], x),
tools/python/xen/xm/main.py:                lambda x: set(['device'], x),
tools/python/xen/xm/main.py:                lambda x: 
set(['qos_algorithm_params', 'rate'], x),
tools/python/xen/xm/main.py:                lambda x: set(['other_config', 
'accel'], x)
tools/python/xen/xm/main.py:    if len(set(vdevfns)) > 1:
tools/python/xen/xm/opts.py:        self.set(default)
tools/python/xen/xm/opts.py:        self.set(self.default)
tools/python/xen/xm/opts.py:    def set(self, value):
tools/python/xen/xm/opts.py:        self.set(v)
tools/python/xen/xm/opts.py:        return opt.set(val)
tools/python/xen/xm/opts.py:    opt.set(1)
tools/python/xen/xm/opts.py:    opt.set(0)
tools/python/xen/xm/opts.py:        opt.set(1)
tools/python/xen/xm/opts.py:        opt.set(0)
tools/python/xen/xm/opts.py:    opt.set(v)
tools/python/xen/xm/opts.py:    opt.set(v)
tools/python/xen/xm/opts.py:    opt.set(v)
tools/python/xen/xm/opts.py:    opt.set(v)

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