From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2178) id 30E503858C2C; Tue, 26 Apr 2022 13:59:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 30E503858C2C Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Florian Weimer To: glibc-cvs@sourceware.org Subject: [glibc/release/2.34/master] scripts/glibcelf.py: Mark as UNSUPPORTED on Python 3.5 and earlier X-Act-Checkin: glibc X-Git-Author: Florian Weimer X-Git-Refname: refs/heads/release/2.34/master X-Git-Oldrev: bc56ab1f4aa937665034373d3e320d0779a839aa X-Git-Newrev: 83cc145830bdbefdabe03787ed884d548bea9c99 Message-Id: <20220426135920.30E503858C2C@sourceware.org> Date: Tue, 26 Apr 2022 13:59:20 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2022 13:59:20 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=83cc145830bdbefdabe03787ed884d548bea9c99 commit 83cc145830bdbefdabe03787ed884d548bea9c99 Author: Florian Weimer Date: Fri Apr 22 19:34:52 2022 +0200 scripts/glibcelf.py: Mark as UNSUPPORTED on Python 3.5 and earlier enum.IntFlag and enum.EnumMeta._missing_ support are not part of earlier Python versions. (cherry picked from commit b571f3adffdcbed23f35ea39b0ca43809dbb4f5b) Diff: --- 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