Path: csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod From: Robert Collins Newsgroups: linux.debian.maint.python Subject: Re: Removing some python3-* packages Date: Tue, 25 Aug 2015 01:40:01 +0200 Message-ID: References: X-Original-To: Barry Warsaw X-Mailbox-Line: From debian-python-request@lists.debian.org Mon Aug 24 23:30:38 2015 Old-Return-Path: X-Amavis-Spam-Status: No, score=-7.7 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, LDO_WHITELIST=-5, MURPHY_DRUGS_REL8=0.02, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=ham autolearn_force=no X-Policyd-Weight: DYN_NJABL=ERR(0) NOT_IN_SBL_XBL_SPAMHAUS=-1.5 BL_NJABL=ERR(-1.5) CL_IP_EQ_HELO_IP=-2 (check from: .robertcollins. - helo: .mail-oi0-f45.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7 X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=5a47ScjwomeYbC1DKlFm/VPBWJh0W/kod//26taHDT8=; b=mhJ/LODwplmmpnsQSHId9VQgJKiezd44TF4dDI7rA3jG+VW55TI/irVKSb8GfkJJti NHVlF+zRrnrXteGQXMPgiphbVQeDDc8OwiqhITdsMAtfFV5m9Ukb5+j4TzfPt+Bd1yt4 ksjfomh3nIxdzLcjoIz22dWV+k2eM9bH8X3LdJ9Yi/BY3DWw5qQpjtszg2wWazdAszWh qJGr4XUKjrKHmkZYrA+5I0gR25IRuY/2P1yxyaxJCcQspuYDuzNki3oWqSiaoGwt/6x5 4FW7la1ilrg4+8W2rB1HNikfgtdvq/ZutAiYZj74ejsFq9vue5hFu7oB8EjSuO4zMB0Q zZKw== X-Gm-Message-State: ALoCoQm8Yn+qfjdimZFv2a+DallxEDEHUp4x4l8USWV/9vJphTKVzj4Z5MWkmMnNjwh1tEbT6/+u MIME-Version: 1.0 X-Received: by 10.202.105.133 with SMTP id e127mr23001413oic.60.1440459009069; Mon, 24 Aug 2015 16:30:09 -0700 (PDT) X-Originating-IP: [122.57.103.106] Content-Type: text/plain; charset=UTF-8 X-Mailing-List: archive/latest/12521 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/CAJ3HoZ0MejDzhoaUe4wL5hVxviGP=R_Y8XazyLuC3KcH_MT-Ug@mail.gmail.com Approved: robomod@news.nic.it Lines: 48 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: Debian Python X-Original-Date: Tue, 25 Aug 2015 11:30:08 +1200 X-Original-Message-ID: X-Original-References: <20150702155530.4e93b05d@limelight.wooz.org> <25C573EC-8BD4-4BB6-84EE-344C65343061@kitterman.com> <55D4B1BF.30505@debian.org> <20150824175757.236d2f23@anarchist.wooz.org> <20150824183701.37eb1b89@anarchist.wooz.org> <20150824192357.4b1ff913@limelight.wooz.org> Xref: csiph.com linux.debian.maint.python:7214 On 25 August 2015 at 11:23, Barry Warsaw wrote: > On Aug 25, 2015, at 10:45 AM, Robert Collins wrote: > >>Lets take Ironic. While it supports Python 2.7+ and 3.4+ it will >>depend on 'mock' for unit testing. > > That's not unreasonable, and different upstreams will have different policies, > but if it was *my* upstream package, I'd probably do a conditional import so > that unittest.mock were used if available, falling back to mock if not. Except that that will break: mock in 3.4 vs 3.5 are different. Lots of bugs fixed in 3.5. Upstreams have to choose: a) use 'mock' everywhere which has all the fixes. b) use 'mock' everywhere except *3.5 and only 3.5*. c) write convoluted tricky code to workaround the bugs and differing behaviour on 3.4 vs 3.5. > If it's easy to patch upstream to do this, then it seems an acceptable > approach to take. I wouldn't say it's *required* (which is why I'm not sure a > blanket policy is appropriate for us). > >> - patch Ironic to use unittest.mock on Python 3.5 > > That would be my first preference, and I'd also submit the patch to upstream. > >> - patch the stdlib to make 'mock' be an alias to unittest.mock > > Nope. > >> - include 'python3-mock' as a binary package > > That's not unreasonable for Debian either. > > I'll note another thing that perhaps makes the enum34 case different. It > exports the package under the same name in both the standalone version and in > the stdlib, so there *really* is no difference between the two. That's not > the case with unittest.mock/mock. It certainly makes it a lot harder to tell them apart :). And yeah, very hard to consume it. -Rob -- Robert Collins Distinguished Technologist HP Converged Cloud