From unknown Fri Aug 15 03:56:23 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#50503 <50503@debbugs.gnu.org> To: bug#50503 <50503@debbugs.gnu.org> Subject: Status: [PATCH] Properly encode all strings sent to the Python shell Reply-To: bug#50503 <50503@debbugs.gnu.org> Date: Fri, 15 Aug 2025 10:56:23 +0000 retitle 50503 [PATCH] Properly encode all strings sent to the Python shell reassign 50503 emacs submitter 50503 Augusto Stoffel severity 50503 normal tag 50503 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 10 06:40:37 2021 Received: (at submit) by debbugs.gnu.org; 10 Sep 2021 10:40:37 +0000 Received: from localhost ([127.0.0.1]:36962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOdxU-0002Bt-TN for submit@debbugs.gnu.org; Fri, 10 Sep 2021 06:40:37 -0400 Received: from lists.gnu.org ([209.51.188.17]:41632) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOdxT-0002Bl-I4 for submit@debbugs.gnu.org; Fri, 10 Sep 2021 06:40:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOdxT-0007kx-9a for bug-gnu-emacs@gnu.org; Fri, 10 Sep 2021 06:40:35 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:38900) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mOdxR-0003Sp-BJ for bug-gnu-emacs@gnu.org; Fri, 10 Sep 2021 06:40:35 -0400 Received: by mail-wr1-x42e.google.com with SMTP id u16so1950479wrn.5 for ; Fri, 10 Sep 2021 03:40:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version; bh=t+bknbkto+IG9flOzIJ3OIfzh263bJ3hlYyCciVOsq0=; b=l2qoBoF0tqFMHeJ0rSw1wBO4aNVsNFz2mhVSjbBlSUiJULyQIAy+ywzprIX/gO2d2F jtBtEb9WWhqNXWtJodc8C3/9LV8neT6YCoVLxQPJDsMaVUEV9dO5T6EdN6SD2l65hhoB ErF/T2NfxPrgf8GOX5Lbv6+Qc7T+0YcRUQ+f+J1fdoNzoeiKv95ImbNCMeETMjG3HeBO 6Xj/NYxiU003e1ZN+4cTCdduL78q3GE8+JpdkkDnW6amFUD4UfjKbaexkxxxI8UkAuP2 z0dQbWntyXPQkAnZSHCi0c6esMQR6bCP+HxOMkZpQhmzYo7XQKRYrC8A6EtU9OoUhc7p UeQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=t+bknbkto+IG9flOzIJ3OIfzh263bJ3hlYyCciVOsq0=; b=qiLqNawmzy/9t/btNZKhMPx4DJflTNkYvGmVplBUaHY5Eql2T8HucROoE5uuS/HaVr cqsQvK8D+kgGJxS7nAV3lbq2w5pH+mx8BgfmzDr31neyy8vMZR6YhCz0sFNdyZO0LqsQ 5bGS2ISyIG/nF78HSAK63DCfPOJqJkdVrQH8jgIYubKPWsaZut3AxSAvup97V3PtUny/ 9m23/tidwaCoMygDGqfT8lkmLX4imsoLIDZyQ+h3Wilhs5vjkJG+wGJ3jVcctPqhrE87 rwLrQPkSjQP8PaxgpBm5QrdpKty+CkNhmO7yD8kF/wa/camUDzkNFryJfQaIs06zqm7K Yz/g== X-Gm-Message-State: AOAM533SXRTmVbheQjWvcjpA3lnf0TDu2ZuqgSr+YWqKv80X23v0Fdmd W7zcNG38Op0grEec6Izj29OQ00LO9E0= X-Google-Smtp-Source: ABdhPJwkDlodcQ9w9nafdXSESQm6OwaQLKFB0PdodtnOR4whzSa+pA7Nm8MGslCX5We+lSy6aTXYuA== X-Received: by 2002:adf:eb89:: with SMTP id t9mr9172319wrn.66.1631270431476; Fri, 10 Sep 2021 03:40:31 -0700 (PDT) Received: from ars3 ([2a02:8109:8ac0:56d0::b1d]) by smtp.gmail.com with ESMTPSA id q10sm3872522wmq.12.2021.09.10.03.40.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Sep 2021 03:40:30 -0700 (PDT) From: Augusto Stoffel To: bug-gnu-emacs@gnu.org Subject: [PATCH] Properly encode all strings sent to the Python shell Date: Fri, 10 Sep 2021 12:40:29 +0200 Message-ID: <87czpgww6a.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=arstoffel@gmail.com; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Tags: patch Some Python shell functions naively assume that '''''' is valid Python code, which is not true, say, if the arbitrary text ends with a quote sign. This patch fixes this. Some more remarks: - python.el now depends on Emacs 28 because it uses 'format-prompt' and 'comint-max-line-length' (luckily, only the latter is my fault). Is this a problem? - I've deleted some defcustoms which are not usable in my opinion. The intended customizability is not impossible, but can only be achieved by advising certain functions. - There are some long-obsolete functions (since say Emacs 24) that I would like to delete. One example is 'python-send-string' which is easy to confuse with the 'python-shell-send-string', which is real deal. What are the rules for this? In GNU Emacs 28.0.50 (build 6, x86_64-pc-linux-gnu, GTK+ Version 3.24.29, cairo version 1.17.4) of 2021-09-09 built on toolbox Repository revision: 8c023e5ea159c6756c92fd02643983aa449e0da9 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101002 System Description: Fedora 34 (Workstation Edition) --=-=-= Content-Type: text/patch; charset=utf-8 Content-Disposition: attachment; filename=0001-Properly-encode-all-strings-sent-to-Python-shell.patch Content-Transfer-Encoding: quoted-printable >From 032b81954685ccd0c2d0a34cfc79bda23393d8e2 Mon Sep 17 00:00:00 2001 From: Augusto Stoffel Date: Fri, 10 Sep 2021 11:06:03 +0200 Subject: [PATCH] Properly encode all strings sent to Python shell * lisp/progmodes/python.el: Now depends on Emacs 28. (python-shell-package-enable, python-shell-completion-get-completions, python-ffap-module-path, python-eldoc--get-doc-at-point): Enconde Python strings using 'python-shell--encode-string' instead of triple quotes. (python-shell-completion-string-code, python-eldoc-string-code, python-ffap-string-code): Remove defcustoms. --- lisp/progmodes/python.el | 66 ++++++++++++++-------------------------- 1 file changed, 22 insertions(+), 44 deletions(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index e342ce7f56..2898897755 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -5,7 +5,7 @@ ;; Author: Fabi=C3=A1n E. Gallina ;; URL: https://github.com/fgallina/python.el ;; Version: 0.27.1 -;; Package-Requires: ((emacs "24.2") (cl-lib "1.0")) +;; Package-Requires: ((emacs "28.1") (cl-lib "1.0")) ;; Maintainer: emacs-devel@gnu.org ;; Created: Jul 2010 ;; Keywords: languages @@ -2571,10 +2571,12 @@ python-shell-package-enable (format (concat "import os.path;import sys;" - "sys.path.append(os.path.dirname(os.path.dirname('''%s''')));" - "__package__ =3D '''%s''';" + "sys.path.append(os.path.dirname(os.path.dirname(%s)));" + "__package__ =3D %s;" "import %s") - directory package package) + (python-shell--encode-string directory) + (python-shell--encode-string package) + package) (python-shell-get-process))) =20 (defun python-shell-accept-process-output (process &optional timeout regex= p) @@ -3532,14 +3534,6 @@ python-shell-completion-setup-code "25.1" "Completion string code must work for (i)pdb.") =20 -(defcustom python-shell-completion-string-code - "';'.join(__PYTHON_EL_get_completions('''%s'''))" - "Python code used to get a string of completions separated by semicolons. -The string passed to the function is the current python name or -the full statement in the case of imports." - :type 'string - :group 'python) - (defcustom python-shell-completion-native-disabled-interpreters ;; PyPy's readline cannot handle some escape sequences yet. Native ;; completion doesn't work on w32 (Bug#28580). @@ -3834,9 +3828,10 @@ python-shell-completion-get-completions (python-util-strip-string (python-shell-send-string-no-output (format - (concat python-shell-completion-setup-code - "\nprint (" python-shell-completion-string-code ")") - input) process)))) + "%s\nprint(';'.join(__PYTHON_EL_get_completions(%s)))" + python-shell-completion-setup-code + (python-shell--encode-string input)) + process)))) (when (> (length completions) 2) (split-string completions "^'\\|^\"\\|;\\|'$\\|\"$" t))))) @@ -4559,28 +4554,16 @@ python-ffap-setup-code :type 'string :group 'python) =20 -(defcustom python-ffap-string-code - "__FFAP_get_module_path('''%s''')" - "Python code used to get a string with the path of a module." - :type 'string - :group 'python) - (defun python-ffap-module-path (module) "Function for `ffap-alist' to return path for MODULE." - (let ((process (or - (and (derived-mode-p 'inferior-python-mode) - (get-buffer-process (current-buffer))) - (python-shell-get-process)))) - (if (not process) - nil - (let ((module-file - (python-shell-send-string-no-output - (concat - python-ffap-setup-code - "\nprint (" (format python-ffap-string-code module) ")") - process))) - (unless (zerop (length module-file)) - (python-util-strip-string module-file)))))) + (when-let ((process (python-shell-get-process)) + (module-file + (python-shell-send-string-no-output + (format "%s\nprint(__FFAP_get_module_path(%s))" + python-ffap-setup-code + (python-shell--encode-string module))))) + (unless (string-empty-p module-file) + (python-util-strip-string module-file)))) =20 (defvar ffap-alist) =20 @@ -4671,12 +4654,6 @@ python-eldoc-setup-code :type 'string :group 'python) =20 -(defcustom python-eldoc-string-code - "__PYDOC_get_help('''%s''')" - "Python code used to get a string with the documentation of an object." - :type 'string - :group 'python) - (defun python-eldoc--get-symbol-at-point () "Get the current symbol for eldoc. Returns the current symbol handling point within arguments." @@ -4706,11 +4683,12 @@ python-eldoc--get-doc-at-point ;; enabled. Bug#18794. (python-util-strip-string (python-shell-send-string-no-output - (concat + (format + "%s\nprint(__PYDOC_get_help(%s))" python-eldoc-setup-code - "\nprint(" (format python-eldoc-string-code input) ")") + (python-shell--encode-string input)) process))))) - (unless (zerop (length docstring)) + (unless (string-empty-p docstring) docstring))))) =20 (defvar-local python-eldoc-get-doc t --=20 2.31.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 10 07:07:50 2021 Received: (at 50503) by debbugs.gnu.org; 10 Sep 2021 11:07:50 +0000 Received: from localhost ([127.0.0.1]:36999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOeNp-0005AV-QL for submit@debbugs.gnu.org; Fri, 10 Sep 2021 07:07:49 -0400 Received: from quimby.gnus.org ([95.216.78.240]:53626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOeNn-0005AC-1U for 50503@debbugs.gnu.org; Fri, 10 Sep 2021 07:07:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=K5JtPrtbXqInTDN7chnymN+E5qRCqm+vjvy5nQ+ZVq8=; b=fckSnsxI+OhKqEm8ImvgUXMB/u IEA8DHFp+3Ai+fo6RR505mFLLyIbJzaUE+GVL6BhY+hudmxqaJoRCqWDe294PmBLvKtqdQapaNZPX 7cHbbUxYmYFuO1qnbauQMVC5QxBzPyP8vbOJmYsH8Ud+yaWeqUO8yQmtRqbA1Gpi2PqM=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mOeNe-00030J-A9; Fri, 10 Sep 2021 13:07:40 +0200 From: Lars Ingebrigtsen To: Augusto Stoffel Subject: Re: bug#50503: [PATCH] Properly encode all strings sent to the Python shell References: <87czpgww6a.fsf@gmail.com> Date: Fri, 10 Sep 2021 13:07:37 +0200 In-Reply-To: <87czpgww6a.fsf@gmail.com> (Augusto Stoffel's message of "Fri, 10 Sep 2021 12:40:29 +0200") Message-ID: <87tuispu2u.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Augusto Stoffel writes: > Some Python shell functions naively assume that '''''' > is valid Python code, which is not true, say, if the arbitrary text > ends with a quote sign. This patch fixes this. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50503 Cc: 50503@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Augusto Stoffel writes: > Some Python shell functions naively assume that '''''' > is valid Python code, which is not true, say, if the arbitrary text > ends with a quote sign. This patch fixes this. Thanks; pushed to Emacs 28. > Some more remarks: > > - python.el now depends on Emacs 28 because it uses 'format-prompt' and > 'comint-max-line-length' (luckily, only the latter is my fault). Is > this a problem? Yes -- that was a mistake, so I've now reverted the usage of format-prompt here. > - There are some long-obsolete functions (since say Emacs 24) that I > would like to delete. One example is 'python-send-string' which is > easy to confuse with the 'python-shell-send-string', which is real > deal. What are the rules for this? We don't have any specific rules here, but I think we can start removing Emacs 24.x obsoletions when we get to Emacs 29. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 10 07:07:53 2021 Received: (at control) by debbugs.gnu.org; 10 Sep 2021 11:07:53 +0000 Received: from localhost ([127.0.0.1]:37002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOeNt-0005Am-0l for submit@debbugs.gnu.org; Fri, 10 Sep 2021 07:07:53 -0400 Received: from quimby.gnus.org ([95.216.78.240]:53640) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOeNr-0005AK-9z for control@debbugs.gnu.org; Fri, 10 Sep 2021 07:07:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=klcyShWB84/H9/Lkim5njF66G2m/m0u3xBo1o6Nv1tg=; b=VDYBzDRQbaeDnlk95O8C0JhthP +LQbAUfl3flHFyEZIQv54R5sHJ53uWn0yRUgpOgTrwOHK/drriNL/1Rr8uDrfoUWxozfpN8FkGYHS DXuGieIgHivBFCiG45iZoRhzQg0he/WnhB2eOYNyL1w9Zcg/XOVmYGw/ipbGCUN3j+60=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mOeNj-00030R-SP for control@debbugs.gnu.org; Fri, 10 Sep 2021 13:07:45 +0200 Date: Fri, 10 Sep 2021 13:07:43 +0200 Message-Id: <87sfycpu2o.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #50503 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 50503 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 50503 28.1 quit From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 10 12:16:24 2021 Received: (at 50503) by debbugs.gnu.org; 10 Sep 2021 16:16:24 +0000 Received: from localhost ([127.0.0.1]:39035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOjCS-0005QY-2b for submit@debbugs.gnu.org; Fri, 10 Sep 2021 12:16:24 -0400 Received: from mail-wr1-f54.google.com ([209.85.221.54]:44566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOjCM-0005QH-Pj for 50503@debbugs.gnu.org; Fri, 10 Sep 2021 12:16:22 -0400 Received: by mail-wr1-f54.google.com with SMTP id d6so3369720wrc.11 for <50503@debbugs.gnu.org>; Fri, 10 Sep 2021 09:16:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=mJf5GF9dJReu73Pwqtg6bt++DzhinHq/xaBz+P/4g9s=; b=ijtuCRRU6/XaGPO80bsr0KMEa0sFEzttTyCrAly1xwBnNakMa4XzVpmbWh9Sa4aPFq xyRnAlOqJ5dICh+MrQxVwrBjhbhYm/Qr6PgMv+pX9R6suBHEgtzIk4uV74Fi1UrmWLGe pDpFxiz031mrKRZwAJTX019eNHW1TT60QwBvcCrNmuAP+c5BwoMsLB7eZJgnXQpP/1Eg ZjVdJ41eSL5i1Qm2hKBXY3RDkAYNuVpTmfSOASEVrhOVpqTX7RlR5uzGvUzI93tmubnz k6kMt4oC03vTyCO7yo7KL59SgqyC0c2mtKxS9O5JRTYm1YZSUb+T1hPJY9mTdo7ENxAV hTWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=mJf5GF9dJReu73Pwqtg6bt++DzhinHq/xaBz+P/4g9s=; b=QioFoQx9dOw+Lz2RQT/86cl+qLrl3bwTE4JjYJVEcoHxlT+PgjMHL+H6KfPxRPOe8x BRdrOTYgeBo3yFnPxm3WFQSxP+Fnnv3eH/3IaaRnQZbgkSwdNSYI+tu76NfJebpgmATq xHvLuctK7cu0BD1wstPqJZMuLkUqU3bB3gqI5fZcRJ7nG26OY2euo3Sk7Gj+b1MTG7at LkXYtbG9VIJZexZedFT37WcZTyk9FInUzWCzyt2nmwtcbOkqimf7wY/cvsoLxW4/gIMM 0QJi9f2A8A/bzGbQN98PbS8MZJi8rhtkhd9qLMtUvTlD6n2oTNhihuGTDKBNT95OTO14 aONA== X-Gm-Message-State: AOAM533OqAWPxe30SbIPbWwwlhYeYfqxqaL0pBgA4BXpYw8o/cQCaGd0 tJEKTnE6LWBW7Ln+BXeIOxOQzEaP6QNM2A== X-Google-Smtp-Source: ABdhPJwI573FCL1eapqkR7eNjgnhF/EPV2efZiZpw1rOze4SBA9kn4tHS4ZnxF5sXHgyGyBypcuqcA== X-Received: by 2002:a05:6000:34a:: with SMTP id e10mr10878422wre.421.1631290572622; Fri, 10 Sep 2021 09:16:12 -0700 (PDT) Received: from ars3 ([2a02:8109:8ac0:56d0::b1d]) by smtp.gmail.com with ESMTPSA id a3sm2166552wrt.28.2021.09.10.09.16.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Sep 2021 09:16:12 -0700 (PDT) From: Augusto Stoffel To: Lars Ingebrigtsen Subject: Re: bug#50503: [PATCH] Properly encode all strings sent to the Python shell References: <87czpgww6a.fsf@gmail.com> <87tuispu2u.fsf@gnus.org> Date: Fri, 10 Sep 2021 18:16:11 +0200 In-Reply-To: <87tuispu2u.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 10 Sep 2021 13:07:37 +0200") Message-ID: <87h7ese790.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50503 Cc: 50503@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Fri, 10 Sep 2021 at 13:07, Lars Ingebrigtsen wrote: >> - python.el now depends on Emacs 28 because it uses 'format-prompt' and >> 'comint-max-line-length' (luckily, only the latter is my fault). Is >> this a problem? > > Yes -- that was a mistake, so I've now reverted the usage of > format-prompt here. Thanks! But note that there is at least one Emacs 28 dependency left, namely `comint-max-line-length'. There's also a byte-compiler warning regarding `comint-highlight-input' even on Emacs 27. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 11 08:39:10 2021 Received: (at 50503) by debbugs.gnu.org; 11 Sep 2021 12:39:10 +0000 Received: from localhost ([127.0.0.1]:39697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mP2Hm-0000FF-9n for submit@debbugs.gnu.org; Sat, 11 Sep 2021 08:39:10 -0400 Received: from quimby.gnus.org ([95.216.78.240]:36300) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mP2Hk-0000F1-82 for 50503@debbugs.gnu.org; Sat, 11 Sep 2021 08:39:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=tRgdoQp5ipTF3woVakVcFphB3Bq01FCTtB0uje2nOp4=; b=FP5lJnDobmKD7WZZsYRkRYRH3/ f6XPHbzch74aVj2fhqjSXbUXiw4nSxyeu3dehL80jntVM40g5agZm99SbaSb/Toqr7J1D0dWUnpgD 9Y92xTNxBcCJ0/G4K0fRuyMudYIlUvpwEiBlApivNqYoyWej4X+cRPQXAM6PPKeAH+fE=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mP2Hc-0008Ud-8V; Sat, 11 Sep 2021 14:39:02 +0200 From: Lars Ingebrigtsen To: Augusto Stoffel Subject: Re: bug#50503: [PATCH] Properly encode all strings sent to the Python shell References: <87czpgww6a.fsf@gmail.com> <87tuispu2u.fsf@gnus.org> <87h7ese790.fsf@gmail.com> Date: Sat, 11 Sep 2021 14:38:59 +0200 In-Reply-To: <87h7ese790.fsf@gmail.com> (Augusto Stoffel's message of "Fri, 10 Sep 2021 18:16:11 +0200") Message-ID: <87r1dvmgm4.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Augusto Stoffel writes: > Thanks! But note that there is at least one Emacs 28 dependency left, > namely `comint-max-line-length'. Perhaps there should be some compat code in that case? Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50503 Cc: 50503@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Augusto Stoffel writes: > Thanks! But note that there is at least one Emacs 28 dependency left, > namely `comint-max-line-length'. Perhaps there should be some compat code in that case? > There's also a byte-compiler warning regarding > `comint-highlight-input' even on Emacs 27. Warnings are normal on older Emacs versions -- I mean, it'd be good to avoid them, but we're mainly worried about actual breakages. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 11 08:44:59 2021 Received: (at 50503) by debbugs.gnu.org; 11 Sep 2021 12:44:59 +0000 Received: from localhost ([127.0.0.1]:39709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mP2NP-0000Nx-De for submit@debbugs.gnu.org; Sat, 11 Sep 2021 08:44:59 -0400 Received: from mail-wr1-f53.google.com ([209.85.221.53]:33633) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mP2NB-0000NS-Ar for 50503@debbugs.gnu.org; Sat, 11 Sep 2021 08:44:58 -0400 Received: by mail-wr1-f53.google.com with SMTP id t18so6792817wrb.0 for <50503@debbugs.gnu.org>; Sat, 11 Sep 2021 05:44:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=VuixFxk7oTZRVTw53SNngdJz9oz3/x4m4rnfsNEUF3w=; b=bMozMri4nqpEKJ6zy484y0iD8V0jYbafPSldpDfgd/gjdHstgvkArQu+vzRfGaSvNz 6fvLu2Wki2Mxp34899t3zYeou31a/NZET/Kjee+fP6hmVw7jRcY9fZNlbaRIjrXmju7s rTEhnb0M2REzaJHD2ZdTdqT0IWCcm2i116NGTyFerEbLEsGea5eQZSKZW229IHMdc6fx pzFvT9cDFlj4kBPbOYMgMJnyQ2LHCokJ+hb4zWzMBS08PPIoaDo4QprEjg1c4nmC+0YC AUkRE3CKTZjmMY5X0TU9Z6CxedOmOY64xLyk6d5pfkMQZEhib1+XnLK5reoHeIxUgJaw 0DJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=VuixFxk7oTZRVTw53SNngdJz9oz3/x4m4rnfsNEUF3w=; b=UFBLjz6e1y4tcDbsZ8hMqcJX5XtfVTQVYI0SEnPLP1/wXJSNY+JY8GAE1GXf4FTCgl aAaWtoqWEaPHzwe7XYpHjOebB59IhRxRwpSz4CvBdzbnMhX1UP1e8ugdyxLLO5I+svDE aMNL+jRuu63gCrMJIKQbghR/nzKPJks6z9F2Od27zpihGasacp6P6fkoPstkUSDWXErg Kf6HsQv2yZ5pNv3GhesFlBL+cvUdS5mfpeSJ+fbBBf+Mzw25E57y7WvLX+mikLse19rz GHdQ572/TyOojRkPFWyXJllWKhUR0OUE6vqpdU+yf0rDL4l9zMgAHMz9YoRtaJg+lMoG acFA== X-Gm-Message-State: AOAM531b5xArcCFbMlpd7V+gfMSJyf/vYBqjzLmsfEsVXn1MfEXLyxiS eslrfFhGzsVYqeouqhXRyqibLb0Jg7zfVw== X-Google-Smtp-Source: ABdhPJz+5BteRdI1CrD80PeXfTnoVvztZu4JVDtYSGA8stPiE0DdOavAsKuC2RopWLpEVlCX5goexg== X-Received: by 2002:a5d:5919:: with SMTP id v25mr2985238wrd.32.1631364279162; Sat, 11 Sep 2021 05:44:39 -0700 (PDT) Received: from ars3 ([2a02:8109:8ac0:56d0::b1d]) by smtp.gmail.com with ESMTPSA id j4sm1658621wrt.23.2021.09.11.05.44.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Sep 2021 05:44:38 -0700 (PDT) From: Augusto Stoffel To: Lars Ingebrigtsen Subject: Re: bug#50503: [PATCH] Properly encode all strings sent to the Python shell References: <87czpgww6a.fsf@gmail.com> <87tuispu2u.fsf@gnus.org> <87h7ese790.fsf@gmail.com> <87r1dvmgm4.fsf@gnus.org> Date: Sat, 11 Sep 2021 14:44:28 +0200 In-Reply-To: <87r1dvmgm4.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 11 Sep 2021 14:38:59 +0200") Message-ID: <87bl4z1dub.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50503 Cc: 50503@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sat, 11 Sep 2021 at 14:38, Lars Ingebrigtsen wrote: > Augusto Stoffel writes: > >> Thanks! But note that there is at least one Emacs 28 dependency left, >> namely `comint-max-line-length'. > > Perhaps there should be some compat code in that case? If it is stylistically acceptable, I think (or (bound-and-true-p comint-max-line-length) 1024) is the simplest solution. One could also replace the mysterious 1024 by 0, which was more or less the previous situation anyway. > >> There's also a byte-compiler warning regarding >> `comint-highlight-input' even on Emacs 27. > > Warnings are normal on older Emacs versions -- I mean, it'd be good to > avoid them, but we're mainly worried about actual breakages. All right then. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 11 08:45:49 2021 Received: (at 50503) by debbugs.gnu.org; 11 Sep 2021 12:45:49 +0000 Received: from localhost ([127.0.0.1]:39713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mP2OC-0000Pk-Tk for submit@debbugs.gnu.org; Sat, 11 Sep 2021 08:45:49 -0400 Received: from quimby.gnus.org ([95.216.78.240]:36596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mP2OA-0000PV-Tf for 50503@debbugs.gnu.org; Sat, 11 Sep 2021 08:45:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=STVJN4jl94pYAEM2hunpBrmVsIQ8zH6KA3sTZso/WJ0=; b=kkJjxtmsziT48iXgn6udKdT4I2 YhoSQNacxhpNQYpIps3DqOmyg3L9OIuK5um+e5W50gVdEsYeDdBULU/2KOl/JXEy9ZYiwGZirRo00 rBF/+stcOhWf9XQvUqbJnrv0lP4w//qOpKocUysdrQBgYwK8MfNm5MSw/6meG9fdT7qk=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mP2O3-0000Ag-0N; Sat, 11 Sep 2021 14:45:41 +0200 From: Lars Ingebrigtsen To: Augusto Stoffel Subject: Re: bug#50503: [PATCH] Properly encode all strings sent to the Python shell References: <87czpgww6a.fsf@gmail.com> <87tuispu2u.fsf@gnus.org> <87h7ese790.fsf@gmail.com> <87r1dvmgm4.fsf@gnus.org> <87bl4z1dub.fsf@gmail.com> Date: Sat, 11 Sep 2021 14:45:38 +0200 In-Reply-To: <87bl4z1dub.fsf@gmail.com> (Augusto Stoffel's message of "Sat, 11 Sep 2021 14:44:28 +0200") Message-ID: <87ee9vmgb1.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Augusto Stoffel writes: > If it is stylistically acceptable, I think > > (or (bound-and-true-p comint-max-line-length) 1024) > > is the simplest solution. One could also replace the mysterious 1024 by > 0, which was more or [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50503 Cc: 50503@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Augusto Stoffel writes: > If it is stylistically acceptable, I think > > (or (bound-and-true-p comint-max-line-length) 1024) > > is the simplest solution. One could also replace the mysterious 1024 by > 0, which was more or less the previous situation anyway. Sure, that'd be fine. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 11 09:32:42 2021 Received: (at 50503) by debbugs.gnu.org; 11 Sep 2021 13:32:42 +0000 Received: from localhost ([127.0.0.1]:39777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mP37a-0005sQ-1M for submit@debbugs.gnu.org; Sat, 11 Sep 2021 09:32:42 -0400 Received: from mail-wm1-f48.google.com ([209.85.128.48]:53095) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mP37X-0005sC-8S for 50503@debbugs.gnu.org; Sat, 11 Sep 2021 09:32:40 -0400 Received: by mail-wm1-f48.google.com with SMTP id e26so3143546wmk.2 for <50503@debbugs.gnu.org>; Sat, 11 Sep 2021 06:32:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=WfSLkG7n0awQIyHKLh74wgsSw+Q2J9PkKF1yxhzXsyE=; b=bztWtoNA1phniQ7xa431HZXrlRVa/FqKVa6oIE/npFYy54M+NSTZBothkC12+mjNmX 5lOOF8VcGDO53e8+g60wn+zjJVIGtYShVJVJOuK8gjYWvWkUWDGadXN87mM0rtG1u047 HRbASsyqRWMEJWzVJCV2Sq66NIGhWKw+pwRb9E3EOt7jcDkhqOxDNsrXchi4dbk2B/Bc KI7sgNv3OESs89d6A5BlJIgWZKhoIRRVcwvkQkfVBF19Vkhq9PQe5czzId72yFesmfno A4fwSGNmbPsvo5qFji2in6CbVAmHNxr2bjryLr/3PF6+FqBw1SFXjD5o1dTKez9VN1iy uazw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=WfSLkG7n0awQIyHKLh74wgsSw+Q2J9PkKF1yxhzXsyE=; b=Ixsm7uYEOm6y+jwWeb36GD5qjdcK+Bo02tZ76FemjlZXU7MEHw0HH2Jp4jYdwz+vnz UDHzFrnCxv8JfgEnKri8BnESiFL9+s1qyOxY4Qe8wNucKo/3mqeui+vVmx8cq9Zv0BZV frL9n3N8vDWbnKCZgsEo/YLLggCaWIjkJcg5nlHrdMS3evUDDp1sI2yVbPWsAVY8MOV1 bM9gIKJAZhK6TH2q2uJ//4CQk0SUKbfqH1TqupwyF6x+CFDm1UgzwIIul9BrUYPePzaN P5tpBwM7iWrLfambTpPQiOJu7PhwKz26NXbrrjtMWQ7aXZJWkKqJdU9otv/KOorfWpbT GjCQ== X-Gm-Message-State: AOAM533aSvclnvkYC5/B4uj4WRONO5/pqRRvNHvL2vO1TzsBa0VtglYO 3LV974xRAT0xzjkHS07Q6rAHrWJxAlJNvg== X-Google-Smtp-Source: ABdhPJzu9TNEtsydBKFGDH1X8OGZhX3n5Ry0DyrBpohkCwHOq+r533IxEkmxojDqx6ssQ8Jovhv9eA== X-Received: by 2002:a1c:20cf:: with SMTP id g198mr2659527wmg.143.1631367153224; Sat, 11 Sep 2021 06:32:33 -0700 (PDT) Received: from ars3 ([2a02:8109:8ac0:56d0::b1d]) by smtp.gmail.com with ESMTPSA id s13sm1616605wmc.47.2021.09.11.06.32.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Sep 2021 06:32:32 -0700 (PDT) From: Augusto Stoffel To: Lars Ingebrigtsen Subject: Re: bug#50503: [PATCH] Properly encode all strings sent to the Python shell References: <87czpgww6a.fsf@gmail.com> <87tuispu2u.fsf@gnus.org> <87h7ese790.fsf@gmail.com> <87r1dvmgm4.fsf@gnus.org> <87bl4z1dub.fsf@gmail.com> <87ee9vmgb1.fsf@gnus.org> Date: Sat, 11 Sep 2021 15:32:26 +0200 In-Reply-To: <87ee9vmgb1.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 11 Sep 2021 14:45:38 +0200") Message-ID: <87sfybjl05.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50503 Cc: 50503@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain On Sat, 11 Sep 2021 at 14:45, Lars Ingebrigtsen wrote: > Augusto Stoffel writes: > >> If it is stylistically acceptable, I think >> >> (or (bound-and-true-p comint-max-line-length) 1024) >> >> is the simplest solution. One could also replace the mysterious 1024 by >> 0, which was more or less the previous situation anyway. > > Sure, that'd be fine. I've attached a patch --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Keep-python.el-compatible-with-older-Emacsen.patch >From d2a6bd70d19f84592235691eb25356bcc5275880 Mon Sep 17 00:00:00 2001 From: Augusto Stoffel Date: Sat, 11 Sep 2021 15:29:06 +0200 Subject: [PATCH] Keep python.el compatible with older Emacsen * progmodes/python.el (python-shell-send-string): Don't assume comint-max-line-length is defined. --- lisp/progmodes/python.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index e71a8102df..b17d740036 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -3155,7 +3155,9 @@ python-shell-send-string (python-shell--encode-string (or (buffer-file-name) ""))))) (if (or (null (process-tty-name process)) - (<= (string-bytes code) comint-max-line-length)) + (<= (string-bytes code) + (or (bound-and-true-p comint-max-line-length) + 1024))) ;; For Emacs < 28 (comint-send-string process code) (let* ((temp-file-name (with-current-buffer (process-buffer process) (python-shell--save-temp-file string))) -- 2.31.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 11 09:39:34 2021 Received: (at 50503) by debbugs.gnu.org; 11 Sep 2021 13:39:34 +0000 Received: from localhost ([127.0.0.1]:39788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mP3EE-00062E-8m for submit@debbugs.gnu.org; Sat, 11 Sep 2021 09:39:34 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mP3EC-000622-NU for 50503@debbugs.gnu.org; Sat, 11 Sep 2021 09:39:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ocn5CaK+zn9vNsMw3I6V97rzrFl7nTJSwlEbEdbMJRI=; b=CxJ7Y13uOD9HUoxi4yoFvDh3GL 2KDBdsT2j86fRU2B4npArEB1tiVmRt8dOjXRSRS9jUAucmyb41rRZWm9lQV30TnpJ/a+93narFt7F XddX68ArhvPjvqTbBMqURoswfk5cg8stxnSBSaA5yMv+cdx9NpZquFLTP8F/u03MyUr4=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mP3E4-0000cQ-Sd; Sat, 11 Sep 2021 15:39:27 +0200 From: Lars Ingebrigtsen To: Augusto Stoffel Subject: Re: bug#50503: [PATCH] Properly encode all strings sent to the Python shell References: <87czpgww6a.fsf@gmail.com> <87tuispu2u.fsf@gnus.org> <87h7ese790.fsf@gmail.com> <87r1dvmgm4.fsf@gnus.org> <87bl4z1dub.fsf@gmail.com> <87ee9vmgb1.fsf@gnus.org> <87sfybjl05.fsf@gmail.com> Date: Sat, 11 Sep 2021 15:39:24 +0200 In-Reply-To: <87sfybjl05.fsf@gmail.com> (Augusto Stoffel's message of "Sat, 11 Sep 2021 15:32:26 +0200") Message-ID: <875yv7kz8z.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Augusto Stoffel writes: > I've attached a patch Thanks; applied to Emacs 28. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50503 Cc: 50503@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Augusto Stoffel writes: > I've attached a patch Thanks; applied to Emacs 28. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Fri Aug 15 03:56:23 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 10 Oct 2021 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator