Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python,': 0.02; 'url:pypi': 0.03; 'compiler': 0.05; 'feature.': 0.07; 'cc:addr :python-list': 0.09; 'patch.': 0.09; 'subject:2.7': 0.09; 'subject:Does': 0.09; 'advance': 0.10; 'python': 0.10; '2.7': 0.13; 'subject:python': 0.14; '10:15': 0.16; 'argparse': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'ported': 0.16; 'subject:issue': 0.16; 'wrote:': 0.16; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'tracker': 0.20; 'lawrence': 0.22; 'bit': 0.23; 'patch': 0.24; 'written': 0.24; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; 'url:bugs': 0.24; 'testing': 0.25; 'subject: ?': 0.27; 'message- id:@mail.gmail.com': 0.27; 'this.': 0.28; 'looks': 0.29; 'cases.': 0.29; 'feature,': 0.29; 'code': 0.30; 'certainly': 0.30; 'version,': 0.30; 'post': 0.31; 'subject:) ': 0.32; 'class': 0.33; 'url:python': 0.33; 'received:google.com': 0.35; 'could': 0.35; 'exist': 0.35; 'but': 0.36; 'there': 0.36; 'url:org': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'thanks': 0.37; 'version': 0.38; 'why': 0.39; 'test': 0.39; 'sure': 0.39; 'subject:the': 0.39; 'mark': 0.40; 'still': 0.40; 'easy': 0.60; 'your': 0.60; 'back': 0.62; '20,': 0.66; 'interested,': 0.69; 'internet': 0.70; 'jul': 0.72; 'lack': 0.76; 'as:': 0.79; '2.7.': 0.84; 'chrisa': 0.84; 'inclusive': 0.84; 'to:none': 0.91; 'subject:Class': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=YRBLEIrOKrYtwWerZGE6KsBowUKgBsjv7TqRVQfnKI8=; b=naZ9udzh5b0rQA3t6R+sRSWPWFqytplPeqh9bLh8aPf/L76QwbuKUJTrZDHidx1Ud9 vzvqnUyrpG6y/el5pyfOkNKQVJE7UTu82TVgCCUkZ3HXrV2WqvBEQZ3H0KkO5Di3G20r 7yheEZBJrD+iPycvpNG1I8ho1E5p4hnAyTibNK5kPNMWje59NCvr5QW1zKFu/2CGY8r8 yC22LN4SD1RZiOxZkddui7Vze+GKTf3gxJLDVAYfUp8bGj9WZ1LJPiYfhBPYVQ21eNv7 KAJW+KDqKnokciCzxuN+GEccMgWDVeFF4e/Ytp69cEdcvgasG5zhCjSYzJ7APsFJJjUU MENQ== MIME-Version: 1.0 X-Received: by 10.107.4.1 with SMTP id 1mr35676390ioe.10.1437412508719; Mon, 20 Jul 2015 10:15:08 -0700 (PDT) In-Reply-To: References: Date: Tue, 21 Jul 2015 03:15:08 +1000 Subject: Re: Does the Class UserGroup (issue 11588) exist for python 2.7 ? From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 38 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1437412511 news.xs4all.nl 2907 [2001:888:2000:d::a6]:51186 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:94239 On Mon, Jul 20, 2015 at 10:15 PM, Mark Lawrence wrote: > On 20/07/2015 12:27, CARANNANTE, MARTINE wrote: >> >> Hi >> Could you tell me if the Class UserGroup (method add_usage_group to >> support inclusive groups) exist for python 2.7 ? >> The patch that I found on internet is only for python 3. >> Thanks in advance for your answer >> Best regards >> *Martine Carannante >> * > > > Almost certainly no as the patch has never been commited, which is why > http://bugs.python.org/issue11588 is till open. Even if the patch were > committed there is no guarantee that the patch will be back ported to 2.7. There's almost a guarantee that it will NOT be backported to 2.7, actually; it looks like a completely new feature. But if you're interested, you might be able to apply the patch to a backported argparse, such as: https://pypi.python.org/pypi/argparse Or just patch your own local version, but that's a bit dodgier. If you're willing to migrate your code to Python 3, and you want this feature, post in the tracker issue; even better, help with testing the patch. The patch was updated for Python 3.5 roughly a year ago, and I suspect that that version will still work; the lack of response after that suggests that nobody has the time to test it and make sure it works in all cases. Since argparse is written in Python, you don't even need to play around with a C compiler to test this. It's a nice easy thing to play with - have a shot! ChrisA