From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 50A0B3858C54 for ; Wed, 7 Jun 2023 09:41:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 50A0B3858C54 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686130880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Vye6xZM7jw9nDyMYnsLvAprJdLtbpwdMONk2gZNufbQ=; b=RUKp1dzJea7QkwMhgtTYG8vDGP32oo2WV7H5zlYXeewUFRUhVnyu2+gMPa2UtbLvhey2qr bwktugyaXpo3uSTyCQ1OefM7n+7ijKDsQkoP61hXhDA3L79y2uVFT4tw0Qt2glWnJ+gLZT vBE/Ns3FUlpZnNX5qffjttP8bo1iRBo= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-100-HjCu7V29OC6PvkMFzEgLkA-1; Wed, 07 Jun 2023 05:41:20 -0400 X-MC-Unique: HjCu7V29OC6PvkMFzEgLkA-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-30ade645c59so3235318f8f.2 for ; Wed, 07 Jun 2023 02:41:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686130878; x=1688722878; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Vye6xZM7jw9nDyMYnsLvAprJdLtbpwdMONk2gZNufbQ=; b=SA0TQA30hRGYynYzem4WLZjvuhAJmtDAndsQMtKxOU8oTVkOgrURut1hmmdMJOpbmz L8d2GohBrcZjHplLRjThjV246vsey/3QUK8IuYi9pJN4/TFcVt4O7UiDElf7pfUcd2lX Q6gB4bXPBFG5ioW9F66mGdvH+T+pKv2E4tV8Jh0b5BpDFDgPHmgpE0csvJavj9/nIE8j bwH1HoylOedftBSeOK/HDTJY0dgF/PpGl6KjJ1gj9xyhA+j0rsMtlpLeCHDWdvOEiduj IBs8XzxyasdxS7Az55fjgdqklpv63b5WmnHzVofE3Uy0LLH/sSZ4hogiuI/hcsuob3js 9IwA== X-Gm-Message-State: AC+VfDyFKF2WCwbqiZDnlekslMftWIxRwsqfqv0ai1Qc63XNmn0p7aaL L1d6hfrNKAvi4FL4l6ggJtqOqo8tpivbCME5PvNfO8NL8Z4S/Fo5/WSP+iMhjth98egRzirljQ+ uUfaZ7TfXs2B3s8JQDjCmXrwOpTvTR3XwNCAfKhY6BiaiJuRzGF6VTjEZLEqkvuaGuvNK5HOOAN KpA92Gcw== X-Received: by 2002:a5d:55c6:0:b0:30e:38d3:cc4f with SMTP id i6-20020a5d55c6000000b0030e38d3cc4fmr3809879wrw.36.1686130878707; Wed, 07 Jun 2023 02:41:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7umfNlZ5ui39BOZZt5iQVfTZzN/frKXwK/AjG+68W00Xfc2IsK7bvvzco4pBsc1nCatxBMrw== X-Received: by 2002:a5d:55c6:0:b0:30e:38d3:cc4f with SMTP id i6-20020a5d55c6000000b0030e38d3cc4fmr3809855wrw.36.1686130878295; Wed, 07 Jun 2023 02:41:18 -0700 (PDT) Received: from localhost (11.72.115.87.dyn.plus.net. [87.115.72.11]) by smtp.gmail.com with ESMTPSA id u25-20020a7bcb19000000b003f73a101f88sm1539180wmj.16.2023.06.07.02.41.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 02:41:17 -0700 (PDT) From: Andrew Burgess To: Tom Tromey via Gdb-patches , gdb-patches@sourceware.org Cc: legouguec@adacore.com, Tom Tromey Subject: Re: [RFC] Bump minimum Python version to 3.4 In-Reply-To: <20230602163303.3945535-1-tromey@adacore.com> References: <20230602163303.3945535-1-tromey@adacore.com> Date: Wed, 07 Jun 2023 10:41:16 +0100 Message-ID: <874jnj38zn.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Tom Tromey via Gdb-patches writes: > While looking into the f-string issue, I noticed that the README > documents 3.2 as the minimum Python version, while gdb.texinfo says > 3.0.2. Asking on irc, I found out that SuSE's "LTS" ships 3.4, and > RHEL 7 ships 3.6. Based on this I think it's reasonable to bump the > minimum required version to 3.4. No objections from me. Thanks, Andrew > --- > gdb/NEWS | 2 ++ > gdb/README | 2 +- > gdb/doc/gdb.texinfo | 2 +- > gdb/python/py-gdb-readline.c | 4 ---- > gdb/python/python-internal.h | 11 ----------- > 5 files changed, 4 insertions(+), 17 deletions(-) > > diff --git a/gdb/NEWS b/gdb/NEWS > index 649a3a9824a..4a8f51c06c3 100644 > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -3,6 +3,8 @@ > > *** Changes since GDB 13 > > +* The minimum supported version of Python is now 3.4. > + > * The AArch64 'org.gnu.gdb.aarch64.pauth' Pointer Authentication feature string > has been deprecated in favor of the 'org.gnu.gdb.aarch64.pauth_v2' feature > string. > diff --git a/gdb/README b/gdb/README > index 9699f4890c6..527aa5ff27c 100644 > --- a/gdb/README > +++ b/gdb/README > @@ -516,7 +516,7 @@ more obscure GDB `configure' options are not listed here. > GDB scripting much more powerful than the restricted CLI > scripting language. If your host does not have Python installed, > you can find it on `http://www.python.org/download/'. The oldest > - version of Python supported by GDB is 3.2. The optional argument > + version of Python supported by GDB is 3.4. The optional argument > PYTHON is used to find the Python headers and libraries. It can > be either the name of a Python executable, or the name of the > directory in which Python is installed. > diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo > index fc55c4e7b43..09adce80e85 100644 > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -40421,7 +40421,7 @@ libpython is present and found at configure time.) Python makes > @value{GDBN} scripting much more powerful than the restricted CLI > scripting language. If your host does not have Python installed, you > can find it on @url{http://www.python.org/download/}. The oldest version > -of Python supported by GDB is 3.0.1. The optional argument @var{python} > +of Python supported by GDB is 3.4. The optional argument @var{python} > is used to find the Python headers and libraries. It can be either > the name of a Python executable, or the name of the directory in which > Python is installed. > diff --git a/gdb/python/py-gdb-readline.c b/gdb/python/py-gdb-readline.c > index 124cec8055d..698f6cad038 100644 > --- a/gdb/python/py-gdb-readline.c > +++ b/gdb/python/py-gdb-readline.c > @@ -30,11 +30,7 @@ > > static char * > gdbpy_readline_wrapper (FILE *sys_stdin, FILE *sys_stdout, > -#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 4 > const char *prompt) > -#else > - char *prompt) > -#endif > { > int n; > const char *p = NULL; > diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h > index 93217375cc5..83fb9b79453 100644 > --- a/gdb/python/python-internal.h > +++ b/gdb/python/python-internal.h > @@ -123,17 +123,6 @@ typedef unsigned long gdb_py_ulongest; > > #endif /* HAVE_LONG_LONG */ > > -#if PY_VERSION_HEX < 0x03020000 > -typedef long Py_hash_t; > -#endif > - > -/* PyMem_RawMalloc appeared in Python 3.4. For earlier versions, we can just > - fall back to PyMem_Malloc. */ > - > -#if PY_VERSION_HEX < 0x03040000 > -#define PyMem_RawMalloc PyMem_Malloc > -#endif > - > /* PyObject_CallMethod's 'method' and 'format' parameters were missing > the 'const' qualifier before Python 3.4. Hence, we wrap the > function in our own version to avoid errors with string literals. > -- > 2.40.0