public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Joseph Myers <joseph@codesourcery.com>
Cc: libc-alpha@sourceware.org,  Siddhesh Poyarekar <siddhesh@redhat.com>
Subject: Re: [PATCH v4] scripts: Add glibcelf.py module
Date: Fri, 22 Apr 2022 19:25:37 +0200	[thread overview]
Message-ID: <87a6cdrpwu.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <87h76lrs4g.fsf@oldenburg.str.redhat.com> (Florian Weimer's message of "Fri, 22 Apr 2022 18:37:51 +0200")

* Florian Weimer:

> * Joseph Myers:
>
>> On Thu, 21 Apr 2022, Florian Weimer via Libc-alpha wrote:
>>
>>> +class _OpenIntEnum(enum.IntEnum):
>>> +    """Integer enumeration that supports arbitrary int values."""
>>> +    @classmethod
>>> +    def _missing_(cls, value):
>>> +        # See enum.IntFlag._create_pseudo_member_.  This allows
>>> +        # creating of enum constants with arbitrary integer values.
>>> +        pseudo_member = int.__new__(cls, value)
>>> +        pseudo_member._name_ = None
>>> +        pseudo_member._value_ = value
>>> +        return pseudo_member
>>
>> This appears to depend on Python 3.6 or later, 3.5 produces:
>>
>> ValueError: _names_ are reserved for future Enum use
>
> Thanks for tracking down the regression.  I hope to have a workaround
> soon.

Ugh.  enum.IntFlag is missing as well in Python 3.5

Can we require at least Python 3.6 for testing?  Otherwise I will mark
these new tests as UNSUPPORTED.

Thanks,
Florian


      reply	other threads:[~2022-04-22 17:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21 21:42 Florian Weimer
2022-04-22  8:45 ` Siddhesh Poyarekar
2022-04-22 16:26 ` Joseph Myers
2022-04-22 16:37   ` Florian Weimer
2022-04-22 17:25     ` Florian Weimer [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=87a6cdrpwu.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=siddhesh@redhat.com \
    /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).