From unknown Sun Jun 22 03:56:48 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#23095 <23095@debbugs.gnu.org> To: bug#23095 <23095@debbugs.gnu.org> Subject: Status: 24.5; python-shell-unbuffered causes problems on Windows Reply-To: bug#23095 <23095@debbugs.gnu.org> Date: Sun, 22 Jun 2025 10:56:48 +0000 retitle 23095 24.5; python-shell-unbuffered causes problems on Windows reassign 23095 emacs submitter 23095 Will Wykeham severity 23095 normal tag 23095 patch fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 22 18:17:38 2016 Received: (at submit) by debbugs.gnu.org; 22 Mar 2016 22:17:38 +0000 Received: from localhost ([127.0.0.1]:60525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiUcL-0005kE-Ol for submit@debbugs.gnu.org; Tue, 22 Mar 2016 18:17:38 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiNod-00058f-6V for submit@debbugs.gnu.org; Tue, 22 Mar 2016 11:01:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiNoS-0003Dz-4p for submit@debbugs.gnu.org; Tue, 22 Mar 2016 11:01:46 -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.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:44053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiNoS-0003Dr-23 for submit@debbugs.gnu.org; Tue, 22 Mar 2016 11:01:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46350) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiNoL-0002Wk-JG for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2016 11:01:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiNoG-00034U-Si for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2016 11:01:33 -0400 Received: from mail-vk0-x22a.google.com ([2607:f8b0:400c:c05::22a]:35663) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiNoG-000344-J9 for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2016 11:01:28 -0400 Received: by mail-vk0-x22a.google.com with SMTP id e6so257711314vkh.2 for ; Tue, 22 Mar 2016 08:01:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wykeham-net.20150623.gappssmtp.com; s=20150623; h=mime-version:date:message-id:subject:from:to; bh=bSm8CXTKIRGn6MBAGfmJn/lQaTY7HIbt/jvqbQhIeAQ=; b=FQQun5aazT0xvKrdOHJ9h28zLtAFIIho4wBk8GXcUv0sXkM5bDxCTv5l1/kGKnJkon A8Qr+djPx+HjsofmO3yKWGGLh6I/zKM+ZGk+UicHTAnRzxsvHFf2ZvYHlsmkYG9RTEr6 UCdUdNdv2pFg8ifHQgBdk5FQdrINUQAmahs5N17Cb7PInsaigtBdoSm7BbAjpJ536Opr CBJcSCzxouShAiVIrnweHujZ4nTOMl2EKNCy25meRAdKEGoTlHg517rlKn9m2B3ZlSRR hO43th7PRce++hSYm1ddvG7pnLPV1bGQmpMAFqhBNoQSHSpTEeDcJUlgkZWjIMsYYeIb A0xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=bSm8CXTKIRGn6MBAGfmJn/lQaTY7HIbt/jvqbQhIeAQ=; b=I2XZkvSVlZuTU76ihl0K4TBT352qnM6HnEOf9Um2S4XvAwq887PVyaPyhjPMhOCKLh n/xLaHqjRrNGfWezs6LFGsT7WJfeEHCVpXwFpzdpC3gscawe5AdIxv5plT4ivEcHOFl/ Bfrgz5nP/ThaxPIAHWm2xlfeD7qxVGscvAS0w0Id3MTeuSWN8kh9JPzGXuq2PyWenSLy GLrsztENOnixZJvi3FvYKM4vb+bB8N6UxpZj286xsiR9LxIm1EzGXR8auR2umcsqITDK eCFcKu4Ac9mmIo3QXuForjY3lO6SjFDRWNsvh9Q8Pk4rKTF0mcp18VgRdIiDoZIASk22 ZPbQ== X-Gm-Message-State: AD7BkJJMKT19K430F4KQqtpSdCja0l1oALaWaewCPKtp1QbmV0F+YtzaxDLcaGZOzqnDG5pPc17i9NpJ9czlng== MIME-Version: 1.0 X-Received: by 10.31.1.194 with SMTP id 185mr11106639vkb.114.1458658887591; Tue, 22 Mar 2016 08:01:27 -0700 (PDT) Received: by 10.176.64.198 with HTTP; Tue, 22 Mar 2016 08:01:27 -0700 (PDT) Date: Tue, 22 Mar 2016 15:01:27 +0000 Message-ID: Subject: 24.5; python-shell-unbuffered causes problems on Windows From: Will Wykeham To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 22 Mar 2016 18:17:37 -0400 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: -5.0 (-----) The relevant context is mostly below, but the important bits are: Emacs 24.5 Microsoft Windows 8 Python 2.7.11 >From a user facing point of view, the issue I'm having is that 'out of the box', the function python-shell-prompt-detect produces the warning "Warning (emacs): Python shell prompts cannot be detected". To reduce the test case down, this demonstrates the core problem: (let ((process-environment (python-shell-calculate-process-environment)) (code (concat "import sys\n" "print(sys.ps1)"))) (with-temp-buffer (let ((code-file (python-shell--save-temp-file code))) (call-process "python" code-file '(t nil) nil "-i") (delete-file code-file)) (buffer-string))) In an 'out of the box' emacs, with 'python-shell-unbuffered' set to t as default, this evaluates to an empty string. If python-shell-unbuffered is then set to nil, then the above evaluates to the expected ">>>\n". 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). Happy to provide any further information, testing etc. to help narrow down the issue. Regards, Will ******************************************** In GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570 Windowing system distributor `Microsoft Corp.', version 6.3.9600 Configured using: `configure --prefix=/c/usr --host=i686-pc-mingw32' Important settings: value of $LANG: ENG locale-coding-system: cp1252 Major mode: Lisp Interaction Minor modes in effect: which-function-mode: t diff-auto-refine-mode: t global-highlight-parentheses-mode: t highlight-parentheses-mode: t show-paren-mode: t dtrt-indent-mode: t iswitchb-mode: t shell-dirtrack-mode: t winner-mode: t global-ede-mode: t global-semantic-mru-bookmark-mode: t global-semanticdb-minor-mode: t global-semantic-decoration-mode: t global-semantic-idle-completions-mode: t global-semantic-idle-scheduler-mode: t global-semantic-idle-summary-mode: t global-semantic-highlight-func-mode: t global-semantic-stickyfunc-mode: t semantic-mode: t delete-selection-mode: t cua-mode: t global-auto-revert-mode: t desktop-save-mode: t savehist-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-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 column-number-mode: t line-number-mode: t transient-mark-mode: t Recent messages: Type "q" in help window to restore its previous buffer. Quit [2 times] Mark set [2 times] "" Mark set Quit Mark saved where search started Type "q" in help window to restore its previous buffer. "" Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug conf-mode nxml-uchnm rng-xsd xsd-regexp rng-cmpct nxml-mode-expansions html-mode-expansions sgml-mode rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok browse-url url-util cua-rect rect expand-region text-mode-expansions cc-mode-expansions python-el-fgallina-expansions er-basic-expansions expand-region-core expand-region-custom semantic/tag-write semantic/edit debug misearch multi-isearch semantic/db-typecache semantic/imenu semantic/sb ede/dired vc-hg xhg-dvc xhg xhg-annotate xhg-mq xhg-log vc-svn eldoc which-func imenu semantic/tag-file semantic/db-file data-debug cedet-files tla hl-line smerge-mode dvc-state dvc-config dvc-diff dvc-fileinfo diff tla-gnus dvc-gnus gnus-art mm-uu mml2015 mm-view mml-smime smime dig mailcap gnus-sum nnoo gnus-group gnus-undo nnmail mail-source gnus-start gnus-spec gnus-int gnus-range message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus gnus-ems nnheader dvc-cmenu dvc-about dvc-version dvc-revlist semantic/wisent/python semantic/decorate/include warnings semantic/dep semantic/wisent/python-wy semantic/wisent semantic/wisent/wisent rx superword subword python json ede/cpp-root ede/emacs bzr-core tla-core pp tla-autoconf tla-defs dvc-log vc vc-dispatcher add-log diff-mode ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff xdarcs-core xgit-core xhg-core xmtn-minimal kalasm-mode qmake-mode bb-mode dts-mode php-mode etags cc-langs generic generic-x cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs dvc-autoloads dvc-unified dvc-tips dired-x dvc-core edebug dvc-lisp dvc-buffers derived dvc-ui dvc-register dvc-utils dvc-emacs ewoc dvc-defs dvc-site highlight-parentheses paren dtrt-indent iswitchb tramp tramp-compat tramp-loaddefs trampver shell pcomplete format-spec icomplete+ icomplete icicles icicles-mode easy-mmode dired icicles-cmd cus-edit cus-start cus-load icicles-mcmd icicles-mac icicles-fn icicles-face icicles-var icicles-opt ffap url-parse auth-source gnus-util password-cache url-vars color-theme sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils reporter thingatpt hexrgb two-column cl-macs cl winner windmove framemove findstr grep compile comint ansi-color ede/speedbar ede/files ede ede/base ede/auto ede/source eieio-speedbar eieio-custom wid-edit semantic/mru-bookmark semantic/db-mode semantic/decorate/mode semantic/complete semantic/idle eieio-opt help-mode speedbar sb-image dframe find-func semantic/ia semantic/analyze/refs semantic/db-find semantic/db-ref semantic/senator semantic/decorate ring pulse semantic/analyze semantic/sort semantic/scope semantic/analyze/fcn semantic/db gv eieio-base semantic/ctxt semantic/format ezimage semantic/tag-ls semantic/find semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw eieio byte-opt bytecomp byte-compile cl-extra cconv eieio-core mode-local cedet edmacro kmacro advice help-fns delsel cua-base saveplace autorevert filenotify desktop frameset cl-loaddefs cl-lib savehist server info easymenu package epg-config time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp w32-common-fns disp-table w32-win w32-vars tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer 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 make-network-process w32notify w32 multi-tty emacs) Memory information: ((conses 8 649133 135398) (symbols 32 52813 0) (miscs 32 11322 2303) (strings 16 127824 18777) (string-bytes 1 3792793) (vectors 8 54846) (vector-slots 4 1586068 18114) (floats 8 526 1355) (intervals 28 5955 102) (buffers 508 40)) From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 23 11:46:56 2016 Received: (at 23095) by debbugs.gnu.org; 23 Mar 2016 15:46:56 +0000 Received: from localhost ([127.0.0.1]:34601 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aikzo-0002a4-ET for submit@debbugs.gnu.org; Wed, 23 Mar 2016 11:46:56 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57674) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aikzm-0002Zn-Dh for 23095@debbugs.gnu.org; Wed, 23 Mar 2016 11:46:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aikzd-00077X-Dm for 23095@debbugs.gnu.org; Wed, 23 Mar 2016 11:46:49 -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.0 required=5.0 tests=BAYES_40,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53450) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aikzd-00077Q-Ae; Wed, 23 Mar 2016 11:46:45 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1880 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aikzc-0006l5-Gm; Wed, 23 Mar 2016 11:46:45 -0400 Date: Wed, 23 Mar 2016 17:46:28 +0200 Message-Id: <83oaa52o4r.fsf@gnu.org> From: Eli Zaretskii To: Will Wykeham In-reply-to: (message from Will Wykeham on Tue, 22 Mar 2016 15:01:27 +0000) Subject: Re: bug#23095: 24.5; python-shell-unbuffered causes problems on Windows References: 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: 23095 Cc: 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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Tue, 22 Mar 2016 15:01:27 +0000 > From: Will Wykeham > > (let ((process-environment (python-shell-calculate-process-environment)) > (code (concat "import sys\n" > "print(sys.ps1)"))) > (with-temp-buffer > (let ((code-file (python-shell--save-temp-file code))) > (call-process "python" code-file '(t nil) nil "-i") > (delete-file code-file)) > (buffer-string))) > > In an 'out of the box' emacs, with 'python-shell-unbuffered' set to t as > default, this evaluates to an empty string. > > If python-shell-unbuffered is then set to nil, then the above evaluates to > the expected ">>>\n". > > 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. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 23 12:05:45 2016 Received: (at 23095) by debbugs.gnu.org; 23 Mar 2016 16:05:45 +0000 Received: from localhost ([127.0.0.1]:34623 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ailI1-00032C-Ca for submit@debbugs.gnu.org; Wed, 23 Mar 2016 12:05:45 -0400 Received: from mail-vk0-f41.google.com ([209.85.213.41]:33318) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ailI0-00031z-6t for 23095@debbugs.gnu.org; Wed, 23 Mar 2016 12:05:44 -0400 Received: by mail-vk0-f41.google.com with SMTP id k1so25374739vkb.0 for <23095@debbugs.gnu.org>; Wed, 23 Mar 2016 09:05:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wykeham-net.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=+XoyCDj4MYFslORdsZIHYaMAI72UDbugfdtD3nMZ2r0=; b=fNemmz+UbMX75MVMOca9hHoyBkBvONcaH5CLB1YzpX+Tc6CJw9d3VJmyJTAtDrXRfz htddvH3t3iyZZvk1kb3ickBjrItCGgFx1w6I4ATmOYlV4jhl7mteBA2i4gynjGKxupJX k4z2i3KnikSkmVgXj+Q0b1uUJFp6PD5nlMLwcc8jBEsKzS1ul511N0xQOqmzX7I8B1GM qRZyP1zlnjSafjq73WQMbLOeo1M503lzmtc2+WqIaOWRG3xmOzs2bOCU+JkqFFO1jKwk unuqrQ3vXKHT8c/5X36qVJWBUb409SOgiA/KwODHcMIEOiI1o56MFnjYXRc0QHduXmDf IC2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=+XoyCDj4MYFslORdsZIHYaMAI72UDbugfdtD3nMZ2r0=; b=MvKDp1OYnigPF/DkrwGFxkSNxQ44fFbBmgN+ywha1jBo8iNAnmTjYkIuuWoEEEQnkZ WxCoRAlPsaRDmf21+b80LV3s0iqc2B+CDSOA2t8isM6EZeXa43COJdDYqtZ8NIkiz+KL Nlb+aXC8Sp1MHu7eJ3Wtmij4Yiuh05rjA80utPcBHzL3pjyJkS09lYBPyIxR8QSJ9C57 SIZaIxRXImgpVzbEK4pUNuT+z24rW7ZIJr5nID9K20RnHBkaGQBzDFecxwTuydl8uf/N HamEK+7sbSXh0J8c6ehAIb3g7iwsKqoLZUvf7OOkiu8uNktnR7LrTDm+XjhYz2C4shmH ehxA== X-Gm-Message-State: AD7BkJKW/6Ce1SBmcjjw0EYCkX1hOherP6vsL+J+fdsAYNJb4AENJ3XBX4uY7et2qOurQB3g6M1nRdlvp/YZ3w== MIME-Version: 1.0 X-Received: by 10.31.141.194 with SMTP id p185mr1783931vkd.57.1458749138862; Wed, 23 Mar 2016 09:05:38 -0700 (PDT) Received: by 10.176.64.198 with HTTP; Wed, 23 Mar 2016 09:05:38 -0700 (PDT) In-Reply-To: <83oaa52o4r.fsf@gnu.org> References: <83oaa52o4r.fsf@gnu.org> Date: Wed, 23 Mar 2016 16:05:38 +0000 Message-ID: Subject: Re: bug#23095: 24.5; python-shell-unbuffered causes problems on Windows From: Will Wykeham To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23095 Cc: 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.7 (/) On 23 March 2016 at 15:46, Eli Zaretskii wrote: >> Date: Tue, 22 Mar 2016 15:01:27 +0000 >> From: Will Wykeham >> >> (let ((process-environment (python-shell-calculate-process-environment)) >> (code (concat "import sys\n" >> "print(sys.ps1)"))) >> (with-temp-buffer >> (let ((code-file (python-shell--save-temp-file code))) >> (call-process "python" code-file '(t nil) nil "-i") >> (delete-file code-file)) >> (buffer-string))) >> >> In an 'out of the box' emacs, with 'python-shell-unbuffered' set to t as >> default, this evaluates to an empty string. >> >> If python-shell-unbuffered is then set to nil, then the above evaluates to >> the expected ">>>\n". >> >> 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. Will From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 03 00:43:49 2017 Received: (at 23095) by debbugs.gnu.org; 3 Dec 2017 05:43:49 +0000 Received: from localhost ([127.0.0.1]:42364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLN48-0002Gj-U1 for submit@debbugs.gnu.org; Sun, 03 Dec 2017 00:43:49 -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: 23095 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 Sun Jun 22 03:56:48 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