public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Fangrui Song <maskray@google.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: Florian Weimer <fweimer@redhat.com>,
	Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [PATCH] scripts/glibcelf.py: Mark as UNSUPPORTED on Python 3.5 and earlier
Date: Wed, 27 Apr 2022 13:45:16 -0700	[thread overview]
Message-ID: <20220427204516.p22eh73k4kaubyi5@google.com> (raw)
In-Reply-To: <0d2567ed-b4e0-9063-2cd9-bd38924fb8ad@linaro.org>

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...

      reply	other threads:[~2022-04-27 20:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22 17:36 Florian Weimer
2022-04-25  7:17 ` Florian Weimer
2022-04-25 17:21   ` Adhemerval Zanella
2022-04-25 21:06     ` Florian Weimer
2022-04-26 13:19       ` Adhemerval Zanella
2022-04-27 20:45         ` Fangrui Song [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220427204516.p22eh73k4kaubyi5@google.com \
    --to=maskray@google.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).