public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Kevin Buettner <kevinb@redhat.com>
Cc: gdb-patches@sourceware.org, simark@simark.ca, pedro@palves.net
Subject: Re: [PATCH v2] set/show python dont-write-bytecode fixes
Date: Sun, 24 Jul 2022 08:40:39 +0300	[thread overview]
Message-ID: <83ilnngjag.fsf@gnu.org> (raw)
In-Reply-To: <20220723212324.1028060-1-kevinb@redhat.com> (message from Kevin Buettner on Sat, 23 Jul 2022 14:23:25 -0700)

> From: Kevin Buettner <kevinb@redhat.com>
> Cc: Kevin Buettner <kevinb@redhat.com>,
> 	Simon Marchi <simark@simark.ca>,
> 	Eli Zaretskii <eliz@gnu.org>,
> 	Pedro Alves <pedro@palves.net>
> Date: Sat, 23 Jul 2022 14:23:25 -0700
> 
> GDB uses the environment variable PYTHONDONTWRITEBYTECODE to
> determine whether or not to write the result of byte-compiling
> python modules when the "python dont-write-bytecode" setting
> is "auto".  Simon noticed that GDB's implementation doesn't
> follow the Python documentation.
> 
> At present, GDB only checks for the existence of this environment
> variable.  That is not sufficient though.  Regarding
> PYTHONDONTWRITEBYTECODE, this document...
> 
>     https://docs.python.org/3/using/cmdline.html
> 
> ...says:
> 
>     If this is set to a non-empty string, Python won't try to write
>     .pyc files on the import of source modules.
> 
> This commit fixes GDB's handling of PYTHONDONTWRITEBYTECODE by adding
> an empty string check.
> 
> This commit also corrects the set/show command documentation for
> "python dont-write-bytecode".  The current doc was just a copy
> of that for set/show python ignore-environment.
> 
> During his review of an earlier version of this patch, Eli Zaretskii
> asked that the help text that I proposed for "set/show python
> dont-write-bytecode" be expanded.  I've done that in addition to
> clarifying the documentation of this option in the GDB manual.
> ---
>  gdb/doc/python.texi | 11 ++++++++---
>  gdb/python/python.c | 32 +++++++++++++++++++++++++-------
>  2 files changed, 33 insertions(+), 10 deletions(-)

Thanks, the documentation parts are fine in this version.

  reply	other threads:[~2022-07-24  5:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-23 21:23 Kevin Buettner
2022-07-24  5:40 ` Eli Zaretskii [this message]
2022-07-25  1:04 ` Simon Marchi
2022-07-25 19:07   ` Kevin Buettner

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=83ilnngjag.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=kevinb@redhat.com \
    --cc=pedro@palves.net \
    --cc=simark@simark.ca \
    /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).