Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: python@g.o
Subject: Re: [gentoo-dev] [PATCH] python-utils-r1.eclass: _python_impl_supported, forward compat
Date: Tue, 02 May 2017 20:08:45
Message-Id: 1493755704.1420.4.camel@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH] python-utils-r1.eclass: _python_impl_supported, forward compat by Zac Medico
1 On wto, 2017-05-02 at 12:11 -0700, Zac Medico wrote:
2 > On Tue, May 2, 2017 at 12:01 PM, Michał Górny <mgorny@g.o> wrote:
3 >
4 > > On wto, 2017-05-02 at 11:49 -0700, Zac Medico wrote:
5 > > > Add forward compatibility up to python3.9. It's helpful to allow some
6 > > > flexibility in ebuild PYTHON_COMPAT settings, for third-party
7 > > > repositories that may be used with multiple snapshots of the gentoo
8 > > > repository.
9 > > > ---
10 > > > eclass/python-utils-r1.eclass | 2 +-
11 > > > 1 file changed, 1 insertion(+), 1 deletion(-)
12 > > >
13 > > > diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.
14 > >
15 > > eclass
16 > > > index 66a359e..997a994 100644
17 > > > --- a/eclass/python-utils-r1.eclass
18 > > > +++ b/eclass/python-utils-r1.eclass
19 > > > @@ -70,7 +70,7 @@ _python_impl_supported() {
20 > > > python2_7|python3_[456]|jython2_7)
21 > > > return 0
22 > > > ;;
23 > > > - pypy1_[89]|pypy2_0|python2_[56]|python3_[123])
24 > > > + pypy1_[89]|pypy2_0|python2_[56]|python3_[123789])
25 > > > return 1
26 > > > ;;
27 > > > pypy|pypy3)
28 > >
29 > > Sounds like a very bad idea. How can you even think of adding
30 > > an implementation if you don't know what the eclass API for it would be?
31 > >
32 >
33 > For my use case, we're adding python3_6 to PYTHON_COMPAT, and still using
34 > those ebuilds with older snapshots of the gentoo repository from a few
35 > months back (as well as newer snapshots). So, there's really no danger in
36 > my case.
37 >
38 > With my suggested change, the eclass doesn't make any API guarantees.
39 > Where's the harm?
40
41 Unless I'm missing something, this is going to cause the eclass to
42 accept (and ignore) accidental use of python3_7. It's confusing, to say
43 the least.
44
45 If you really want to do weird stuff, you're on your own.
46
47 --
48 Best regards,
49 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies