From unknown Fri Aug 15 20:24:27 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#21376 <21376@debbugs.gnu.org> To: bug#21376 <21376@debbugs.gnu.org> Subject: Status: 25.0.50; Python tests fail on MS-Windows -- issues with the prompt Reply-To: bug#21376 <21376@debbugs.gnu.org> Date: Sat, 16 Aug 2025 03:24:27 +0000 retitle 21376 25.0.50; Python tests fail on MS-Windows -- issues with the p= rompt reassign 21376 emacs submitter 21376 Eli Zaretskii severity 21376 normal tag 21376 patch fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 29 08:21:08 2015 Received: (at submit) by debbugs.gnu.org; 29 Aug 2015 12:21:08 +0000 Received: from localhost ([127.0.0.1]:42030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZVf87-0005nc-MB for submit@debbugs.gnu.org; Sat, 29 Aug 2015 08:21:08 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42498) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZVf85-0005nR-Fe for submit@debbugs.gnu.org; Sat, 29 Aug 2015 08:21:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZVf84-0007gc-9N for submit@debbugs.gnu.org; Sat, 29 Aug 2015 08:21:05 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD, T_MANY_HDRS_LCASE autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:50684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVf84-0007gQ-6H for submit@debbugs.gnu.org; Sat, 29 Aug 2015 08:21:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52490) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVf82-0005tf-NC for bug-gnu-emacs@gnu.org; Sat, 29 Aug 2015 08:21:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZVf7y-0007fQ-NW for bug-gnu-emacs@gnu.org; Sat, 29 Aug 2015 08:21:02 -0400 Received: from mtaout26.012.net.il ([80.179.55.182]:41441) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVf7y-0007fK-A3; Sat, 29 Aug 2015 08:20:58 -0400 Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NTU00700FOX1P00@mtaout26.012.net.il>; Sat, 29 Aug 2015 15:23:02 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NTU00PQSFQD3860@mtaout26.012.net.il>; Sat, 29 Aug 2015 15:23:01 +0300 (IDT) Date: Sat, 29 Aug 2015 15:21:01 +0300 From: Eli Zaretskii Subject: 25.0.50; Python tests fail on MS-Windows -- issues with the prompt X-012-Sender: halo1@inter.net.il To: bug-gnu-emacs@gnu.org, =?iso-8859-1?Q?Fabi=E1n?= Ezequiel Gallina Message-id: <83bndq2slu.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii 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: -6.0 (------) 4 of the Python tests fail on MS-Windows due to some issue related to the prompts displayed by the Python interpreter. The 4 failed tests are: FAILED python-shell-make-comint-4 FAILED python-shell-prompt-detect-1 FAILED python-shell-prompt-detect-2 FAILED python-shell-prompt-set-calculated-regexps-6 I show below the relevant portions of python-tests.log. I need help in figuring out what causes these. One possible suspect is some buffering issue, due to which Emacs does not receive the prompt that Python prints. Another possibility might be the version of the Python (I have 2.6.6 installed). Or maybe something else. Let me know if I can collect more information about the failures, or you'd like me to try something in order to find out the reasons. Thanks. Here are the relevant portions of the test log for the 4 failed tests: Test python-shell-make-comint-4 condition: (ert-test-failed ((should (string= python-shell--prompt-calculated-input-regexp (concat "^\\(extralargeinputprompt\\|\\.\\.> \\|" "block\\|py> \\|pdf\\|sml\\|in\\)"))) :form (string= "^\\(extralargeinputprompt\\|block\\|pdf\\|sml\\|in\\)" "^\\(extralargeinputprompt\\|\\.\\.> \\|block\\|py> \\|pdf\\|sml\\|in\\)") :value nil)) FAILED 192/223 python-shell-make-comint-4 Test python-shell-prompt-detect-1 condition: (ert-test-failed ((should (equal (python-shell-prompt-detect) '...)) :form (equal nil (">>> " "... " "")) :value nil :explanation (different-types nil (">>> " "... " "")))) FAILED 193/223 python-shell-prompt-detect-1 Test python-shell-prompt-detect-2 condition: (ert-test-failed ((should (equal (python-shell-prompt-detect) '...)) :form (equal nil ("py> " "..> " "out ")) :value nil :explanation (different-types nil ("py> " "..> " "out ")))) FAILED 194/223 python-shell-prompt-detect-2 Test python-shell-prompt-set-calculated-regexps-6 condition: (ert-test-failed ((should (string= python-shell--prompt-calculated-input-regexp "^\\(\\.\\.> \\|p\\.> \\|\\)")) :form (string= "^\\(\\)" "^\\(\\.\\.> \\|p\\.> \\|\\)") :value nil)) FAILED 204/223 python-shell-prompt-set-calculated-regexps-6 In GNU Emacs 25.0.50.384 (i686-pc-mingw32) of 2015-08-29 Repository revision: 5e63c842007b0f85e91735a7c4e00be0b7fe9ba5 Windowing system distributor `Microsoft Corp.', version 5.1.2600 Configured using: `configure --prefix=/d/usr --enable-checking=yes,glyphs --with-wide-int 'CFLAGS=-gdwarf-4 -g3 -O0'' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS Important settings: value of $LANG: ENU locale-coding-system: cp1255 Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message dired format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu cl-loaddefs pcase cl-lib mail-prsvr mail-utils time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote w32notify w32 multi-tty make-network-process emacs) Memory information: ((conses 16 84975 6948) (symbols 56 19924 0) (miscs 48 36 107) (strings 16 15967 5012) (string-bytes 1 393017) (vectors 16 11212) (vector-slots 8 402827 5209) (floats 8 125 127) (intervals 40 260 63) (buffers 856 11)) From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 11 03:59:12 2015 Received: (at 21376) by debbugs.gnu.org; 11 Sep 2015 07:59:12 +0000 Received: from localhost ([127.0.0.1]:56122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZaJEl-0006sD-9i for submit@debbugs.gnu.org; Fri, 11 Sep 2015 03:59:11 -0400 Received: from mtaout27.012.net.il ([80.179.55.183]:44506) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZaJEh-0006s3-Qg for 21376@debbugs.gnu.org; Fri, 11 Sep 2015 03:59:08 -0400 Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0NUI00B005QEIE00@mtaout27.012.net.il> for 21376@debbugs.gnu.org; Fri, 11 Sep 2015 10:55:42 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NUI000QV60UGAB0@mtaout27.012.net.il>; Fri, 11 Sep 2015 10:55:42 +0300 (IDT) Date: Fri, 11 Sep 2015 10:58:58 +0300 From: Eli Zaretskii Subject: Re: bug#21376: 25.0.50; Python tests fail on MS-Windows -- issues with the prompt In-reply-to: <83bndq2slu.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: fgallina@gnu.org Message-id: <83a8st4cal.fsf@gnu.org> References: <83bndq2slu.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21376 Cc: 21376@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii 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 (+) Ping! I really need help in debugging these failures. TIA > Date: Sat, 29 Aug 2015 15:21:01 +0300 > From: Eli Zaretskii > > 4 of the Python tests fail on MS-Windows due to some issue related to > the prompts displayed by the Python interpreter. The 4 failed tests > are: > > FAILED python-shell-make-comint-4 > FAILED python-shell-prompt-detect-1 > FAILED python-shell-prompt-detect-2 > FAILED python-shell-prompt-set-calculated-regexps-6 > > I show below the relevant portions of python-tests.log. > > I need help in figuring out what causes these. One possible suspect > is some buffering issue, due to which Emacs does not receive the > prompt that Python prints. Another possibility might be the version > of the Python (I have 2.6.6 installed). Or maybe something else. > > Let me know if I can collect more information about the failures, or > you'd like me to try something in order to find out the reasons. > > Thanks. > > Here are the relevant portions of the test log for the 4 failed tests: > > Test python-shell-make-comint-4 condition: > (ert-test-failed > ((should > (string= python-shell--prompt-calculated-input-regexp > (concat "^\\(extralargeinputprompt\\|\\.\\.> \\|" "block\\|py> \\|pdf\\|sml\\|in\\)"))) > :form > (string= "^\\(extralargeinputprompt\\|block\\|pdf\\|sml\\|in\\)" "^\\(extralargeinputprompt\\|\\.\\.> \\|block\\|py> \\|pdf\\|sml\\|in\\)") > :value nil)) > FAILED 192/223 python-shell-make-comint-4 > Test python-shell-prompt-detect-1 condition: > (ert-test-failed > ((should > (equal > (python-shell-prompt-detect) > '...)) > :form > (equal nil > (">>> " "... " "")) > :value nil :explanation > (different-types nil > (">>> " "... " "")))) > FAILED 193/223 python-shell-prompt-detect-1 > Test python-shell-prompt-detect-2 condition: > (ert-test-failed > ((should > (equal > (python-shell-prompt-detect) > '...)) > :form > (equal nil > ("py> " "..> " "out ")) > :value nil :explanation > (different-types nil > ("py> " "..> " "out ")))) > FAILED 194/223 python-shell-prompt-detect-2 > Test python-shell-prompt-set-calculated-regexps-6 condition: > (ert-test-failed > ((should > (string= python-shell--prompt-calculated-input-regexp "^\\(\\.\\.> \\|p\\.> \\|\\)")) > :form > (string= "^\\(\\)" "^\\(\\.\\.> \\|p\\.> \\|\\)") > :value nil)) > FAILED 204/223 python-shell-prompt-set-calculated-regexps-6 > > > In GNU Emacs 25.0.50.384 (i686-pc-mingw32) > of 2015-08-29 > Repository revision: 5e63c842007b0f85e91735a7c4e00be0b7fe9ba5 > Windowing system distributor `Microsoft Corp.', version 5.1.2600 > Configured using: > `configure --prefix=/d/usr --enable-checking=yes,glyphs --with-wide-int > 'CFLAGS=-gdwarf-4 -g3 -O0'' > > Configured features: > XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB > TOOLKIT_SCROLL_BARS > > Important settings: > value of $LANG: ENU > locale-coding-system: cp1255 > > Major mode: Lisp Interaction > > Minor modes in effect: > tooltip-mode: t > global-eldoc-mode: t > electric-indent-mode: t > mouse-wheel-mode: t > tool-bar-mode: t > menu-bar-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > font-lock-mode: t > blink-cursor-mode: t > auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t > line-number-mode: t > transient-mark-mode: t > > Recent messages: > For information about GNU Emacs and the GNU system, type C-h C-a. > > Load-path shadows: > None found. > > Features: > (shadow sort gnus-util mail-extr emacsbug message dired format-spec > rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 > mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums > mm-util help-fns help-mode easymenu cl-loaddefs pcase cl-lib mail-prsvr > mail-utils time-date mule-util tooltip eldoc electric uniquify > ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table > w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt > fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register > page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock > font-lock syntax facemenu font-core frame cl-generic cham georgian > utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean > japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european > ethiopic indian cyrillic chinese charscript case-table epa-hook > jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice > loaddefs button faces cus-face macroexp files text-properties overlay > sha1 md5 base64 format env code-pages mule custom widget > hashtable-print-readable backquote w32notify w32 multi-tty > make-network-process emacs) > > Memory information: > ((conses 16 84975 6948) > (symbols 56 19924 0) > (miscs 48 36 107) > (strings 16 15967 5012) > (string-bytes 1 393017) > (vectors 16 11212) > (vector-slots 8 402827 5209) > (floats 8 125 127) > (intervals 40 260 63) > (buffers 856 11)) > > > > From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 15 21:39:49 2017 Received: (at 21376) by debbugs.gnu.org; 16 Aug 2017 01:39:49 +0000 Received: from localhost ([127.0.0.1]:40060 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhnJE-00089A-JO for submit@debbugs.gnu.org; Tue, 15 Aug 2017 21:39:48 -0400 Received: from mail-it0-f50.google.com ([209.85.214.50]:38875) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhnJC-00088r-Rt; Tue, 15 Aug 2017 21:39:47 -0400 Received: by mail-it0-f50.google.com with SMTP id m34so11650115iti.1; Tue, 15 Aug 2017 18:39:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=uUKXbWrDmowHWINnriGPE7ucbEI6V6ahWVbn4KAw8aY=; b=pSTHlPG9BGV/DHb1zlob87aqrU7rd1tUQxmSGfY91boa23qpfKe9X7lhdG8QawdoYC KMYTrYJrtU744qKpUWA891DCWjnD8/xGgWtjz+as3Ytc+rzFEmSLAE7LRDm/WsjmQ8HP mfF0tNnlhu5uV07NQ5HcRUEUTZb/H/6vltxg7gn6+Q2P54hI3vsZqoGDJm8+zqAGm2Mv pPZbkjjlYkvWLII5ykj7kPBjJHiVMryC8H+1TmPNv1ufAwXnEf5bf0veHFgiDPKsW66K qAHT7HgpjmG6U619Gk6h5Fz3PWYYxJrFT5ezSmF4jIxAmo2MS4Fcz8a0dPoSYwAAEAIJ FP7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=uUKXbWrDmowHWINnriGPE7ucbEI6V6ahWVbn4KAw8aY=; b=kEy4N1+0nDGtekJlcRz57zF8k/myQT9U6WcpODAqDFGM1YaCwbBag32ONgQ6WfbvWs rDAG11aFLGyMjQtoJssSv0DQWjtqVj3BOW1kVZg2yBWT6M+Dp9tZoB0nZu71L5JdRJgh uUR1XV2TEzm+83Q+KfVezi8ciXIN7YvMon8lC7sbZhX7Hs8ESt2EILROadeW6iatuUYV DrhI174lYoySHaRkFDHNYUit9n3uxu6ZHGWugkt7ErPU8F8mTNPtqkjixH94MAme60oA gTv+xheY39kWB6vEBXr5aiv+0nf3wQnjAL3y7pXyo+kZN/QPBVKDgp2PigwFnAL/flUd aRpQ== X-Gm-Message-State: AHYfb5iuVQgINjt4jn5eTP5wX22+vlVMNx9AN2JgliW0CyaTgimtemor EaIuNOW3btEIoiSN X-Received: by 10.36.34.80 with SMTP id o77mr501596ito.121.1502847581007; Tue, 15 Aug 2017 18:39:41 -0700 (PDT) Received: from zony ([45.2.119.49]) by smtp.googlemail.com with ESMTPSA id l191sm9361itl.13.2017.08.15.18.39.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Aug 2017 18:39:40 -0700 (PDT) From: npostavs@users.sourceforge.net To: Eli Zaretskii Subject: Re: bug#21376: 25.0.50; Python tests fail on MS-Windows -- issues with the prompt References: <83bndq2slu.fsf@gnu.org> Date: Tue, 15 Aug 2017 21:41:18 -0400 In-Reply-To: <83bndq2slu.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 29 Aug 2015 15:21:01 +0300") Message-ID: <87mv70z3up.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 21376 Cc: fgallina@gnu.org, 21376@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: -0.0 (/) --=-=-= Content-Type: text/plain tags 21376 + patch quit Eli Zaretskii writes: > 4 of the Python tests fail on MS-Windows due to some issue related to > the prompts displayed by the Python interpreter. The 4 failed tests > are: > > FAILED python-shell-make-comint-4 > FAILED python-shell-prompt-detect-1 > FAILED python-shell-prompt-detect-2 > FAILED python-shell-prompt-set-calculated-regexps-6 > > I show below the relevant portions of python-tests.log. > > I need help in figuring out what causes these. One possible suspect > is some buffering issue, due to which Emacs does not receive the > prompt that Python prints. Another possibility might be the version > of the Python (I have 2.6.6 installed). Or maybe something else. It seems to be a bug in Python 2.x on Windows (Python 3.6.x doesn't show the problem). In unbuffered mode it rejects carriage returns. Compare results of printf 'print("hello world")\r\n' > hello-world-with-crnl.py python -i < hello-world-with-crnl.py python -i -u < hello-world-with-crnl.py printf 'print("hello world")\n' > hello-world-with-nl.py python -i < hello-world-with-nl.py python -i -u < hello-world-with-nl.py (Setting the PYTHONUNBUFFERED environment variable, as python.el does, is equivalent to passing '-u'.) The bug can be worked around with the following patch: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v1-0001-Work-around-w32-python-2.7-bug-to-fix-prompt-dete.patch Content-Description: patch >From a8b2295d38f50044e0396c29aefd5f465e848c84 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Tue, 15 Aug 2017 17:49:10 -0400 Subject: [PATCH v1] Work around w32-python-2.7 bug to fix prompt detection (Bug#21376) * lisp/progmodes/python.el (python-shell-prompt-detect): Don't put carriage returns into the temporary file when running in unbuffered mode, the w32 build of python 2.7 chokes on them. --- lisp/progmodes/python.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index d774874a43..b7385f870f 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2251,7 +2251,11 @@ python-shell-prompt-detect ;; `condition-case' and displaying the error message to ;; the user in the no-prompts warning. (ignore-errors - (let ((code-file (python-shell--save-temp-file code))) + (let ((code-file + ;; Python 2.7 on Windows does not handle + ;; carriage returns in unbuffered mode. + (let ((inhibit-eol-conversion (getenv "PYTHONUNBUFFERED"))) + (python-shell--save-temp-file code)))) ;; Use `process-file' as it is remote-host friendly. (process-file interpreter -- 2.14.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 16 10:26:55 2017 Received: (at 21376) by debbugs.gnu.org; 16 Aug 2017 14:26:55 +0000 Received: from localhost ([127.0.0.1]:41244 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhzHb-0000R1-8m for submit@debbugs.gnu.org; Wed, 16 Aug 2017 10:26:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45021) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhzHZ-0000Qh-GP for 21376@debbugs.gnu.org; Wed, 16 Aug 2017 10:26:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dhzHQ-0008RN-EO for 21376@debbugs.gnu.org; Wed, 16 Aug 2017 10:26:48 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57378) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhzHQ-0008RF-Aq; Wed, 16 Aug 2017 10:26:44 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2701 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dhzHP-0001VY-Mj; Wed, 16 Aug 2017 10:26:44 -0400 Date: Wed, 16 Aug 2017 17:26:28 +0300 Message-Id: <83tw17fv1n.fsf@gnu.org> From: Eli Zaretskii To: npostavs@users.sourceforge.net In-reply-to: <87mv70z3up.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) Subject: Re: bug#21376: 25.0.50; Python tests fail on MS-Windows -- issues with the prompt References: <83bndq2slu.fsf@gnu.org> <87mv70z3up.fsf@users.sourceforge.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 21376 Cc: fgallina@gnu.org, 21376@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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: npostavs@users.sourceforge.net > Cc: 21376@debbugs.gnu.org, fgallina@gnu.org > Date: Tue, 15 Aug 2017 21:41:18 -0400 > > > FAILED python-shell-make-comint-4 > > FAILED python-shell-prompt-detect-1 > > FAILED python-shell-prompt-detect-2 > > FAILED python-shell-prompt-set-calculated-regexps-6 > > > > I show below the relevant portions of python-tests.log. > > > > I need help in figuring out what causes these. One possible suspect > > is some buffering issue, due to which Emacs does not receive the > > prompt that Python prints. Another possibility might be the version > > of the Python (I have 2.6.6 installed). Or maybe something else. > > It seems to be a bug in Python 2.x on Windows (Python 3.6.x doesn't show > the problem). In unbuffered mode it rejects carriage returns. Compare > results of > > printf 'print("hello world")\r\n' > hello-world-with-crnl.py > python -i < hello-world-with-crnl.py > python -i -u < hello-world-with-crnl.py > > printf 'print("hello world")\n' > hello-world-with-nl.py > python -i < hello-world-with-nl.py > python -i -u < hello-world-with-nl.py > > (Setting the PYTHONUNBUFFERED environment variable, as python.el does, > is equivalent to passing '-u'.) > > The bug can be worked around with the following patch: Thanks, but after applying the patch I still see the same 4 tests mentioned above failing. Do I need to do something in addition to just running the test, as in cd test && make lisp/progmodes/python-tests.log ? From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 16 12:15:05 2017 Received: (at 21376) by debbugs.gnu.org; 16 Aug 2017 16:15:05 +0000 Received: from localhost ([127.0.0.1]:41390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1di0yG-0000BB-KR for submit@debbugs.gnu.org; Wed, 16 Aug 2017 12:15:04 -0400 Received: from mail-oi0-f45.google.com ([209.85.218.45]:35745) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1di0yE-0000AP-B3 for 21376@debbugs.gnu.org; Wed, 16 Aug 2017 12:15:02 -0400 Received: by mail-oi0-f45.google.com with SMTP id e124so40952532oig.2 for <21376@debbugs.gnu.org>; Wed, 16 Aug 2017 09:15:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=curxcEI7kYpWXRX6LGJb2okydtShvKocMZfoMUdnwyg=; b=dKAoInPjLed3MhwFG/8L8rtaJuHS2PGjyxDUqUxDbqyH1iY6MUIpPbteFA0zDgHOyL o112rFXmaxT2imvuKETLuCSTcotG+cHv2dcODECkJ7tby7afiYhHntIY23cHYui8Tjgm L6CybKBq4Q3LZ5biNhZwUyrqxbIc5l7zX9IhQdqH7fhyZypiZyBgPjn/wDZRUINfsmTU 0zsSccujKDfnpmyQhBHruC3/9n7b+r34SvrtfR7gKVVuAM1PdNPAW+FM1l+I7Rw55ZG0 z+87WO4i/efl6LkbJ2Cxwk6vKopcVWILK2FFY+G3RvRL4kUtI5+xtomTtOjDYRKmPy95 RElQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=curxcEI7kYpWXRX6LGJb2okydtShvKocMZfoMUdnwyg=; b=FaN8lvuOdopT6XKcqBzuzLbMkjGFHA2Zmvyv/JyNWewzDzIxVdvwkt+jjlObgBeDlL PV45s0cxCPhbwqDaMhPxDXm3fjhdjbIO9CufpDYgDsOjld1IyS6zbudM96FlmKBq3qhO dnGiuOIebNhkwAVBbNwvHsTrZRzs3OCgkGwzmugJPpxgSY5FiNoqPUbTUwKQ9PTDy/Q4 mXwB9n1YU1Ea1tLj6c0mpMb+EjZMgzuVIhICrW4aSDAZnOzZoevQ1CZkh90hY4AUjPEw iAH1JaZcnPHGNOqqYGAphZMaECdQMIPj7qesMNKRj2ksRNOYcHCsMWFEDEWekr6jooiy 7MIQ== X-Gm-Message-State: AHYfb5gKY30gckKrwGoXlauXEc3/QarRlsKG66yUB3v/F1cRUi21w9QW gHmoI73v6HjEezCvT9eJXvAJyQbHh+AZ X-Received: by 10.202.208.79 with SMTP id h76mr2863856oig.65.1502900096724; Wed, 16 Aug 2017 09:14:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.18.129 with HTTP; Wed, 16 Aug 2017 09:14:56 -0700 (PDT) In-Reply-To: <83tw17fv1n.fsf@gnu.org> References: <83bndq2slu.fsf@gnu.org> <87mv70z3up.fsf@users.sourceforge.net> <83tw17fv1n.fsf@gnu.org> From: Noam Postavsky Date: Wed, 16 Aug 2017 12:14:56 -0400 X-Google-Sender-Auth: IZ7SmrFODRehRTvnMXJF3ZGbUQQ Message-ID: Subject: Re: bug#21376: 25.0.50; Python tests fail on MS-Windows -- issues with the prompt To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 21376 Cc: =?UTF-8?B?RmFiacOhbiBFLiBHYWxsaW5h?= , 21376@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: 0.7 (/) On Wed, Aug 16, 2017 at 10:26 AM, Eli Zaretskii wrote: > > Thanks, but after applying the patch I still see the same 4 tests > mentioned above failing. Do I need to do something in addition to > just running the test, as in > > cd test && make lisp/progmodes/python-tests.log Hmm, that's odd, it works for me. Can you check what the following expressions insert: (let ((pyfile (make-temp-file "test" nil ".py"))) (unwind-protect (progn (let ((inhibit-eol-conversion nil)) (with-temp-file pyfile (insert "print('hello world')\n"))) (call-process "python2" pyfile '(t t) nil "-i" "-u")) (delete-file pyfile))) (let ((pyfile (make-temp-file "test" nil ".py"))) (unwind-protect (progn (let ((inhibit-eol-conversion t)) (with-temp-file pyfile (insert "print('hello world')\n"))) (call-process "python2" pyfile '(t t) nil "-i" "-u")) (delete-file pyfile))) I get this for the first (where ^M is really a carriage return character) Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> File "", line 1 print('hello world')^M ^ SyntaxError: invalid syntax >>> and this for the second: Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> hello world >>> From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 16 12:38:52 2017 Received: (at 21376) by debbugs.gnu.org; 16 Aug 2017 16:38:52 +0000 Received: from localhost ([127.0.0.1]:41403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1di1LH-0000hy-3D for submit@debbugs.gnu.org; Wed, 16 Aug 2017 12:38:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49130) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1di1LE-0000hl-Ut for 21376@debbugs.gnu.org; Wed, 16 Aug 2017 12:38:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1di1L6-0007Ap-KQ for 21376@debbugs.gnu.org; Wed, 16 Aug 2017 12:38:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59213) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1di1L6-0007Al-GR; Wed, 16 Aug 2017 12:38:40 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2864 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1di1L5-00025T-Ka; Wed, 16 Aug 2017 12:38:40 -0400 Date: Wed, 16 Aug 2017 19:38:25 +0300 Message-Id: <83k223foxq.fsf@gnu.org> From: Eli Zaretskii To: Noam Postavsky In-reply-to: (message from Noam Postavsky on Wed, 16 Aug 2017 12:14:56 -0400) Subject: Re: bug#21376: 25.0.50; Python tests fail on MS-Windows -- issues with the prompt References: <83bndq2slu.fsf@gnu.org> <87mv70z3up.fsf@users.sourceforge.net> <83tw17fv1n.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 21376 Cc: fgallina@gnu.org, 21376@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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Noam Postavsky > Date: Wed, 16 Aug 2017 12:14:56 -0400 > Cc: 21376@debbugs.gnu.org, Fabián E. Gallina > > On Wed, Aug 16, 2017 at 10:26 AM, Eli Zaretskii wrote: > > > > Thanks, but after applying the patch I still see the same 4 tests > > mentioned above failing. Do I need to do something in addition to > > just running the test, as in > > > > cd test && make lisp/progmodes/python-tests.log > > Hmm, that's odd, it works for me. Can you check what the following > expressions insert: > > (let ((pyfile (make-temp-file "test" nil ".py"))) > (unwind-protect > (progn (let ((inhibit-eol-conversion nil)) > (with-temp-file pyfile > (insert "print('hello world')\n"))) > (call-process "python2" pyfile '(t t) nil > "-i" "-u")) > (delete-file pyfile))) > > (let ((pyfile (make-temp-file "test" nil ".py"))) > (unwind-protect > (progn (let ((inhibit-eol-conversion t)) > (with-temp-file pyfile > (insert "print('hello world')\n"))) > (call-process "python2" pyfile '(t t) nil > "-i" "-u")) > (delete-file pyfile))) > > I get this for the first (where ^M is really a carriage return character) > > Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) > [MSC v.1500 64 bit (AMD64)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> File "", line 1 > print('hello world')^M > ^ > SyntaxError: invalid syntax > >>> > > and this for the second: > > Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) > [MSC v.1500 64 bit (AMD64)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> hello world > >>> Same here, except that Python version is 2.6.6. Also, I needed to replace "python2" with an explicit absolute file name of python.exe, as I don't have "python2" here and Python is not on PATH. But I don't believe these differences are important, are they? From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 16 12:59:53 2017 Received: (at 21376) by debbugs.gnu.org; 16 Aug 2017 16:59:53 +0000 Received: from localhost ([127.0.0.1]:41427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1di1fd-0001BC-67 for submit@debbugs.gnu.org; Wed, 16 Aug 2017 12:59:53 -0400 Received: from mail-oi0-f52.google.com ([209.85.218.52]:35473) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1di1fb-0001Az-99 for 21376@debbugs.gnu.org; Wed, 16 Aug 2017 12:59:51 -0400 Received: by mail-oi0-f52.google.com with SMTP id e124so42210759oig.2 for <21376@debbugs.gnu.org>; Wed, 16 Aug 2017 09:59:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=GHqBVTV6zzeKnYnBEv0Ig1E22Ob4PYK6WsmgjFdWhAA=; b=NmGGAwQ3gCNLVn+TcZGxH0Nm9HH7E33Rxw4Gcn5cCHDIbAqvfFIWwGu5NAYeglV1Y7 kZSbCJ/Gv3p2ndE7vlAuIi9dSKF4LUrTfKzMpaHDRjcqHpAI2x5DFs5YK1TIdV10Q5PG If7F7EiN0lwxOmc3YtyBd0lL/pvOAbgDPmjXxjVqhIGF3FSwz0Ttt9Zgn30uOQJnVb8i 8Hv1YccvdlW4XHflD2FmTUz2OhaNtun5I9bVf4/eRTMko34/aWaZFBUEuUlnexeqSCLz ZzllX/TvnIdev4rTOjSVd27o2q1m/sJU69BBUqdQ9lkgVI2rPU8ipPgqcOOX9SCwqSWr H6Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=GHqBVTV6zzeKnYnBEv0Ig1E22Ob4PYK6WsmgjFdWhAA=; b=skV/r2ioQNKD40rBUoQXw/ORq8QZt8sAR7kZmPLskFaO33mz/EvceP0BvGEW3a1AVB j1byVKha+tJSNiOjHQ9Qx2nNBrY8q5Sfs12KmOykjfNjIXA2wh8n0AIWbTrUBje/Dd+l SPUGI6cmQmRQNX9sXbf24KeXchQtxZDrxEj3+wAISsBcd58FY6ckVANbikM68hBT9p5l Vu84ihq0HzZPOCQ6j5whAR2PkTnr0h2ESkih3pmRtEhXRu30kkzR2kTb2SEhPljHR3u5 ToiRfEhO6RaMTtvTnLhxOYTf5GDAcjow0xd71GWiYARFniYos2pUZ4XEWOMjTZLgiEt7 ky7w== X-Gm-Message-State: AHYfb5jM6ATu0WnCf1Yd7h0pZ/xYP7oq60pAuRzL3BlxdkVFtrP7coKn AA0bP552ph79p96o0+ue9DC9Wcuczg== X-Received: by 10.202.208.79 with SMTP id h76mr3024465oig.65.1502902785599; Wed, 16 Aug 2017 09:59:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.18.129 with HTTP; Wed, 16 Aug 2017 09:59:45 -0700 (PDT) In-Reply-To: <83k223foxq.fsf@gnu.org> References: <83bndq2slu.fsf@gnu.org> <87mv70z3up.fsf@users.sourceforge.net> <83tw17fv1n.fsf@gnu.org> <83k223foxq.fsf@gnu.org> From: Noam Postavsky Date: Wed, 16 Aug 2017 12:59:45 -0400 X-Google-Sender-Auth: 78h0VwCqQy55YREOC_DSydt9rCY Message-ID: Subject: Re: bug#21376: 25.0.50; Python tests fail on MS-Windows -- issues with the prompt To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 21376 Cc: =?UTF-8?B?RmFiacOhbiBFLiBHYWxsaW5h?= , 21376@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: 0.7 (/) On Wed, Aug 16, 2017 at 12:38 PM, Eli Zaretskii wrote: >> Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) >> [MSC v.1500 64 bit (AMD64)] on win32 >> Type "help", "copyright", "credits" or "license" for more information. >> >>> File "", line 1 >> print('hello world')^M >> ^ >> SyntaxError: invalid syntax >> >>> >> > > Same here, except that Python version is 2.6.6. Also, I needed to > replace "python2" with an explicit absolute file name of python.exe, > as I don't have "python2" here and Python is not on PATH. But I don't > believe these differences are important, are they? Yes, I've been messing around with PATH and bouncing between Python 2 and 3. Anyway, it sounds like your version of Python has the exact same issue. Two questions: Is it possible you didn't recompile python.elc after applying the patch? How does the test run at all if you don't have Python on PATH? python-tests.el has: (defvar python-tests-shell-interpreter "python") ... (ert-deftest python-shell-calculate-command-1 () "Check the command to execute is calculated correctly. Using `python-shell-interpreter' and `python-shell-interpreter-args'." (skip-unless (executable-find python-tests-shell-interpreter)) From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 16 13:28:03 2017 Received: (at 21376) by debbugs.gnu.org; 16 Aug 2017 17:28:03 +0000 Received: from localhost ([127.0.0.1]:41440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1di26s-0001pN-OJ for submit@debbugs.gnu.org; Wed, 16 Aug 2017 13:28:02 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60285) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1di26r-0001ot-FB for 21376@debbugs.gnu.org; Wed, 16 Aug 2017 13:28:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1di26h-0004Yi-7e for 21376@debbugs.gnu.org; Wed, 16 Aug 2017 13:27:56 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59743) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1di26h-0004Yd-4T; Wed, 16 Aug 2017 13:27:51 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2883 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1di26f-0003wQ-RK; Wed, 16 Aug 2017 13:27:50 -0400 Date: Wed, 16 Aug 2017 20:27:29 +0300 Message-Id: <83fucrfmny.fsf@gnu.org> From: Eli Zaretskii To: Noam Postavsky In-reply-to: (message from Noam Postavsky on Wed, 16 Aug 2017 12:59:45 -0400) Subject: Re: bug#21376: 25.0.50; Python tests fail on MS-Windows -- issues with the prompt References: <83bndq2slu.fsf@gnu.org> <87mv70z3up.fsf@users.sourceforge.net> <83tw17fv1n.fsf@gnu.org> <83k223foxq.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 21376 Cc: fgallina@gnu.org, 21376@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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Noam Postavsky > Date: Wed, 16 Aug 2017 12:59:45 -0400 > Cc: 21376@debbugs.gnu.org, Fabián E. Gallina > > Is it possible you didn't recompile python.elc after applying the patch? Sorry, I was blind: I thought your patch changed python-tests.el, not python.el. Now that I compiled python.el, these tests pass. Sorry for my confusion, and thanks for fixing this. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 20 16:49:00 2017 Received: (at 21376) by debbugs.gnu.org; 20 Aug 2017 20:49:00 +0000 Received: from localhost ([127.0.0.1]:47001 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1djX9Y-0008VH-8K for submit@debbugs.gnu.org; Sun, 20 Aug 2017 16:49:00 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:36880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1djX9V-0008Uz-MY; Sun, 20 Aug 2017 16:48:58 -0400 Received: by mail-io0-f196.google.com with SMTP id z196so122333ioe.4; Sun, 20 Aug 2017 13:48:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=e7FkWnSnkLA2LRh8VG+dmkXg/O86NhCzDPDtWmFs97U=; b=aHXhjFdP+yu8GxAHX5Fs4GKFdwy/j3KL7860cY1WXEdVqB4DybpE1+xIdVJd14JBXm TwwwAHpp/41T36WcQM8jarq/HCE76i90P8G5phzN07wOlLv1ZXbsOJc8wdhkKYRL1uQr zO5YmaSzLEAonJrw/wnd2NHzIxbxhk5aW5rFEepta//Q6d3mFLFH5+YE8/7x8nRyI467 5jda7eKJ1/FXRcNmLxQr4jnJI20G89MbxRCTnuWjFKKmaWusmW+RtABM1nidYBZFNNaM 2S8tDj5mmhuB3V/APHWdSz/46Zk2iDr/aQ17Akj+gMtL73UIXIXD/WMcn4y1Ua1Grdxp RL+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version :content-transfer-encoding; bh=e7FkWnSnkLA2LRh8VG+dmkXg/O86NhCzDPDtWmFs97U=; b=VyrVwEwmsJ1fsIXxMHvGshxjTzf4n0M4srHwrWH3Alk7T7K9lwyGCCwCgJ8oTsz9eU U6ux/DqgLt2c60XMrY07+YcK3+6YECL+88MXf5NC6kF5ah1KA1tVm9GGA5hdOkbiYmGk qUfpUBKtTYJpa02e/paH572clZkqithwd3cFYOT1tkjAgU54k2Up4H+wjzfBe7xj4OxU KjD04PWwK8YXw3atLHEd+70KUa+yQ7laeykhcEbdLRbcqIctCtbHyYaHugoT5USk/8IC ErELzUxUh8AuTXucEDeaDOPcpIDCiM3Lx+PZ2+8uUTaJ1aSDMdpbebdbCkw5txUZA7gU JDuw== X-Gm-Message-State: AHYfb5hrsbfPD2w8ckP506KXUE2lqMX0TYd8g9xp4ZaHVue8/XemfggA BI2XMFEkrb4xWzPv X-Received: by 10.107.6.76 with SMTP id 73mr4550092iog.79.1503262132030; Sun, 20 Aug 2017 13:48:52 -0700 (PDT) Received: from zony ([45.2.119.49]) by smtp.googlemail.com with ESMTPSA id 193sm5029437ioo.84.2017.08.20.13.48.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 20 Aug 2017 13:48:51 -0700 (PDT) From: npostavs@users.sourceforge.net To: Eli Zaretskii Subject: Re: bug#21376: 25.0.50; Python tests fail on MS-Windows -- issues with the prompt References: <83bndq2slu.fsf@gnu.org> <87mv70z3up.fsf@users.sourceforge.net> <83tw17fv1n.fsf@gnu.org> <83k223foxq.fsf@gnu.org> <83fucrfmny.fsf@gnu.org> Date: Sun, 20 Aug 2017 16:50:29 -0400 In-Reply-To: <83fucrfmny.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 16 Aug 2017 20:27:29 +0300") Message-ID: <87tw129d62.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 21376 Cc: fgallina@gnu.org, 21376@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: -2.1 (--) tags 21376 fixed close 21376 26.1 quit Eli Zaretskii writes: >> From: Noam Postavsky >> Date: Wed, 16 Aug 2017 12:59:45 -0400 >> Cc: 21376@debbugs.gnu.org, Fabi=C3=A1n E. Gallina >>=20 >> Is it possible you didn't recompile python.elc after applying the patch? > > Sorry, I was blind: I thought your patch changed python-tests.el, not > python.el. Now that I compiled python.el, these tests pass. > > Sorry for my confusion, and thanks for fixing this. No problem, glad we cleared it up. I've pushed to master. [1: 9714545675]: 2017-08-20 16:43:37 -0400 Work around w32-python-2.x bug to fix prompt detection (Bug#21376) http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=3D9714545675af046d7= 30352eb03dc00e93b6f7d3c From unknown Fri Aug 15 20:24:27 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 18 Sep 2017 11:24:05 +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 From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 03 00:43:48 2017 Received: (at control) by debbugs.gnu.org; 3 Dec 2017 05:43:49 +0000 Received: from localhost ([127.0.0.1]:42362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLN48-0002Gc-M1 for submit@debbugs.gnu.org; Sun, 03 Dec 2017 00:43:48 -0500 Received: from mail-io0-f172.google.com ([209.85.223.172]:36703) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLN46-0002GK-OW; Sun, 03 Dec 2017 00:43:47 -0500 Received: by mail-io0-f172.google.com with SMTP id 81so15364316iof.3; Sat, 02 Dec 2017 21:43:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=/j/6vUQiljRSQtFoIhEIN4tI5hPpPBWJp8Wmcfzabns=; b=gIbjp7t5UACDNp3+uwHN//nKWFdM2Uw+ihiYBbVhwDomw48f5mYyYYEZn5s0PMfc2v nLYot1VmQDsJwhvKr+k8oWzqQENpebSjxQk+ueyj5jWCADyBnjt7JRfad7LB1B4yECHi 3/UghqLnTHPM5xf7G4U0AyyRppaXDTm6biUB0+MYeawxB0pmQrni/2U2vmYvqaviAmJp hosnPDHb5PyO6VMVCyeGQNVVZKQuvpnu39HQqqffwWayBh0L9wccRe54oak/VVNobNdo qaCBj5zAPmLxlx/In3UebgOwySsDpzttdk75CYEuA+7U5w6fozo/F3b8/N9xrGwi/Rel Qzfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=/j/6vUQiljRSQtFoIhEIN4tI5hPpPBWJp8Wmcfzabns=; b=V2Ldp+qxXuPB4nR/Y+WGYOm5xPXA3up/vi19gfCk17AF2eugaX3qY7UPf/0pbM/W/4 cl65aOiGjXcMs/tn2c+YkHg/1WLiLJiZm+OqBgfmOdBTi7ICutdFV4KDh0hum7E+j+8Z 2eUhA5o3hBOKnqEGzyL5Fq77HNMRuCskaAx84ARHREQKGJx0w5dIr+3M+mXLO5IMabsy km33wiKK04MSF8lxCmT4AOq41M3uuv3c0GzpRMMxyGkMlnM/TKE8nOkqTLzetysC0Y9m op29YZ4NloIxzXizGYxK+/T+0OOkzJUhjkYGK8fqOeZoXpfaEIhFvAaQSZGyFWMyUdN/ hWiA== X-Gm-Message-State: AJaThX48MFzIg1YXPa6GJlr22eMhaq4v8u0m4e8KLFE29M1c+ttd9l+0 oPHayOMnKmJqbWuf96uATN3cOw== X-Google-Smtp-Source: AGs4zMZAwgFJ0I5+Z0BHFvigokuaTRMa7FXSKLS0mXqURKEcuy8f1btrTtBbPhGlLrj+WDVNody8nQ== X-Received: by 10.107.130.42 with SMTP id e42mr19550646iod.250.1512279821001; Sat, 02 Dec 2017 21:43:41 -0800 (PST) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id j67sm4677489iod.12.2017.12.02.21.43.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 02 Dec 2017 21:43:40 -0800 (PST) From: Noam Postavsky To: Will Wykeham Subject: Re: bug#23095: 24.5; python-shell-unbuffered causes problems on Windows References: <83oaa52o4r.fsf@gnu.org> Date: Sun, 03 Dec 2017 00:43:38 -0500 In-Reply-To: (Will Wykeham's message of "Wed, 23 Mar 2016 16:05:38 +0000") Message-ID: <87tvx8icxh.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control Cc: Eli Zaretskii , 23095@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: -0.0 (/) close 23095 26.1 unarchive 21376 merge 23095 21376 quit Will Wykeham writes: >>> I haven't got to the bottom of why unbuffered is causing this >>> problem. My suspicion is that it relates to the fact that >>> PYTHONUNBUFFERED on Windows also causes python to process stdin/stdout >>> as binary (which also affects line ending processing). >> >> On Windows, Emacs communicates with subprocesses via pipes, which are >> buffered. > > Ah. In which case, it sounds like the appropriate thing would be to > set the default value of 'python-shell-unbuffered' to nil on Windows. So it turns out this is actually some weird bug in w32 Python 2.x, we work around it in Emacs 26 now. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21376#11 From unknown Fri Aug 15 20:24:27 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, 31 Dec 2017 12: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