From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by sourceware.org (Postfix) with ESMTPS id 3EE223858D28 for ; Wed, 27 Apr 2022 20:45:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3EE223858D28 Received: by mail-pj1-x102d.google.com with SMTP id z5-20020a17090a468500b001d2bc2743c4so2682575pjf.0 for ; Wed, 27 Apr 2022 13:45:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=KB8ZMrY8QwxR1+yrFi3bLjGt6upU5CduLbh252kDokA=; b=RIuSLjqTyE2fimXlTjXvvq6MYvXvVO1DgBV0AzpteeVckYhdaN7Uww2IwyZwrlbl3N 2dXn7DeXAqos8P1tGunGkAm4q8ff10Enw6kEg1GiVETfX8aX6/9GMYH2Ze3Kbr2DtYdl X4QRhHamNV1v4ORqxvACC7KNRDXnQHjrGBnk1YOQWZm3bgWzQiAp56MhjXG2ikDyIwDJ ffg/2BrGQcrdiFUAEE1O2DHopf0VJjZSjPViOIQfKImA37r1ppxypBFekHvUf6M7JV9a R9gRtjh+xeIlmn3SUuH+wmswhcDhSYhCztGRdjt6qVFOEDHNsSZhUVO3WOsNBKVus3co crCg== X-Gm-Message-State: AOAM532Cy8pij7zlqi9ZSgDdHVZZ6nMNbNrkDNJZtZZ0BMsVWaXOSMKv tS8CJB7yZwTxJHQHy94twOP9Jg== X-Google-Smtp-Source: ABdhPJz6+ZI510SJ8ihHnv26m9obxq8CqTgqMUE/+s86d1NKowvrkZV/XYz2RR9Yimqm1iMyGtpu7A== X-Received: by 2002:a17:902:850b:b0:158:27a2:66eb with SMTP id bj11-20020a170902850b00b0015827a266ebmr31438989plb.5.1651092321147; Wed, 27 Apr 2022 13:45:21 -0700 (PDT) Received: from google.com ([2620:15c:2ce:200:97d8:6a3e:53c0:230d]) by smtp.gmail.com with ESMTPSA id d20-20020a056a00199400b005060849909esm23628421pfl.176.2022.04.27.13.45.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 13:45:20 -0700 (PDT) Date: Wed, 27 Apr 2022 13:45:16 -0700 From: Fangrui Song To: Adhemerval Zanella Cc: Florian Weimer , Adhemerval Zanella via Libc-alpha Subject: Re: [PATCH] scripts/glibcelf.py: Mark as UNSUPPORTED on Python 3.5 and earlier Message-ID: <20220427204516.p22eh73k4kaubyi5@google.com> References: <875yn1rpdy.fsf@oldenburg.str.redhat.com> <87fsm1r5ry.fsf@oldenburg.str.redhat.com> <874k2gna9c.fsf@oldenburg.str.redhat.com> <0d2567ed-b4e0-9063-2cd9-bd38924fb8ad@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <0d2567ed-b4e0-9063-2cd9-bd38924fb8ad@linaro.org> X-Spam-Status: No, score=-27.3 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Apr 2022 20:45:23 -0000 On 2022-04-26, Adhemerval Zanella via Libc-alpha wrote: > > >On 25/04/2022 18:06, Florian Weimer wrote: >> * Adhemerval Zanella via Libc-alpha: >> >>> On 25/04/2022 04:17, Florian Weimer via Libc-alpha wrote: >>>> * Florian Weimer: >>>> >>>>> enum.IntFlag and enum.EnumMeta._missing_ support is not present in those >>>>> Python versions. >>>>> >>>>> --- >>>>> scripts/glibcelf.py | 6 ++++++ >>>>> 1 file changed, 6 insertions(+) >>>>> >>>>> diff --git a/scripts/glibcelf.py b/scripts/glibcelf.py >>>>> index 8f7d0ca184..da0d5380f3 100644 >>>>> --- a/scripts/glibcelf.py >>>>> +++ b/scripts/glibcelf.py >>>>> @@ -28,6 +28,12 @@ import collections >>>>> import enum >>>>> import struct >>>>> >>>>> +if not hasattr(enum, 'IntFlag'): >>>>> + import sys >>>>> + sys.stdout.write( >>>>> + 'warning: glibcelf.py needs Python 3.6 for enum support\n') >>>>> + sys.exit(77) >>>>> + >>>>> class _OpenIntEnum(enum.IntEnum): >>>>> """Integer enumeration that supports arbitrary int values.""" >>>>> @classmethod >>>> >>>> I've pushed this, to avoid masking other failures in Joseph's tester. >>> >>> We still indicate that Python 3.4 is supported on INSTALL. I think we >>> should either update it or add a fallback code on glibcelf.py. >> >> Tests using scripts/glibcelf.py are marked as UNSUPPORTED. Isn't this >> sufficient for now? >> >> We can say that Python 3.6 or later is recommended for full test >> coverage. > >It would be good to have it proper documented yes, but would be possible >to adapt the glibcelf.py to work with Python 3.4? So there will be no >need to have to document that we support two different minor Python >versions where if you use the older one you will have less test >coverage (which I think it is not ideal). Even Python 3.6 has reached end of life, so I think it is perhaps reasonable to assume that at least 3.5 is needed for additional test coverage but not the build...