From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id kPYqMG3b3GK+gRkAWB0awg (envelope-from ) for ; Sun, 24 Jul 2022 01:41:01 -0400 Received: by simark.ca (Postfix, from userid 112) id C1CBA1E5EA; Sun, 24 Jul 2022 01:41:01 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=GA8IndAG; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 621171E222 for ; Sun, 24 Jul 2022 01:41:01 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BDFD23857BA3 for ; Sun, 24 Jul 2022 05:41:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BDFD23857BA3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1658641260; bh=rBfSzfy8EFRGPa/nUM/oKktrcZP+6lye7yzAwlT2lgg=; h=Date:To:In-Reply-To:Subject:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=GA8IndAGGLNDeEiKC96HYlYVpgGhP5HD1KWvgxluVOzbaRG3sZKLMbueYxtp5+9VL fkZzHJHA7y2cdAICPje1qK4nJUb+fEGc503vz5nTMLSnTbLGfpBAosZc4GhRcKxQXX r6HuqEKuvQ99ku3YpD6R5sGS3PTjFou6ZToJrvXY= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id BA01E385841F for ; Sun, 24 Jul 2022 05:40:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BA01E385841F Received: from fencepost.gnu.org ([2001:470:142:3::e]:52982) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFUM4-0003G0-Ke; Sun, 24 Jul 2022 01:40:40 -0400 Received: from [87.69.77.57] (port=2149 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFUM3-0006X1-EU; Sun, 24 Jul 2022 01:40:40 -0400 Date: Sun, 24 Jul 2022 08:40:39 +0300 Message-Id: <83ilnngjag.fsf@gnu.org> To: Kevin Buettner In-Reply-To: <20220723212324.1028060-1-kevinb@redhat.com> (message from Kevin Buettner on Sat, 23 Jul 2022 14:23:25 -0700) Subject: Re: [PATCH v2] set/show python dont-write-bytecode fixes References: <20220723212324.1028060-1-kevinb@redhat.com> X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Eli Zaretskii via Gdb-patches Reply-To: Eli Zaretskii Cc: simark@simark.ca, pedro@palves.net, gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" > From: Kevin Buettner > Cc: Kevin Buettner , > Simon Marchi , > Eli Zaretskii , > Pedro Alves > 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.