public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: Tom Tromey via Gdb-patches <gdb-patches@sourceware.org>,
	gdb-patches@sourceware.org
Cc: legouguec@adacore.com, Tom Tromey <tromey@adacore.com>
Subject: Re: [RFC] Bump minimum Python version to 3.4
Date: Wed, 07 Jun 2023 10:41:16 +0100	[thread overview]
Message-ID: <874jnj38zn.fsf@redhat.com> (raw)
In-Reply-To: <20230602163303.3945535-1-tromey@adacore.com>

Tom Tromey via Gdb-patches <gdb-patches@sourceware.org> 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


      parent reply	other threads:[~2023-06-07  9:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-02 16:33 Tom Tromey
2023-06-02 18:01 ` Simon Marchi
2023-06-02 18:14 ` Eli Zaretskii
2023-06-02 18:20   ` Paul Koning
2023-06-02 18:42     ` Eli Zaretskii
2023-06-03  0:01 ` Kevin Buettner
2023-06-07  9:41 ` Andrew Burgess [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=874jnj38zn.fsf@redhat.com \
    --to=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=legouguec@adacore.com \
    --cc=tromey@adacore.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).