GNU bug report logs - #25753
Python with libedit (macOS default) echoes input, breaks native completion

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: charles@HIDDEN (Charles A. Roelli); merged with #21431, #22796, #26326; dated Thu, 16 Feb 2017 16:09:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Disconnected #32042 from all other report(s). Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Merged 21431 22796 25753 26326 32042. Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Merged 21431 22796 25753 26326. Request was from npostavs@HIDDEN to control <at> debbugs.gnu.org. Full text available.
Merged 21431 25753 26326. Request was from npostavs@HIDDEN to control <at> debbugs.gnu.org. Full text available.
Merged 25753 26326. Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Changed bug title to 'Python with libedit (macOS default) echoes input, breaks native completion' from '25.2; Python mode shell interaction not working 100%' Request was from npostavs@HIDDEN to control <at> debbugs.gnu.org. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 1 Mar 2017 22:59:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 01 17:59:30 2017
Received: from localhost ([127.0.0.1]:34995 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cjDDV-0006Q1-Th
	for submit <at> debbugs.gnu.org; Wed, 01 Mar 2017 17:59:30 -0500
Received: from mail-it0-f65.google.com ([209.85.214.65]:36758)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>)
 id 1cjDDU-0006Pi-3Y; Wed, 01 Mar 2017 17:59:28 -0500
Received: by mail-it0-f65.google.com with SMTP id w185so6649241ita.3;
 Wed, 01 Mar 2017 14:59:27 -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=7g9hZ5cwZQDvaY5Ivvf+0iKNR9stKA7YA1bFt8iEPm0=;
 b=st173gf+eiqWYsi/Lq8pJqVxhgzsDJ/rZfTR63P3V3BVcNZC4Bu3vhEGuUnJjlpQoa
 E/0jF2S39qjw/UxjO61MZtoogZJx3xtPZUGKr0xacNMk3+DVvv+j8cyFGKJXR9zvMIGr
 rI/MFhkyHBtrbc6WhCyVmdfeZZRn1xcvkl3bGdSkAfdaO8uCaQVanp94P8N0VXrHkBRT
 bSWB8orvwQURqs1RZkqvXbIpryjp81FOGcS1NUHnyATSN8aZfNnlrrrC5yCqGwibQyoL
 FPa2I06vRgRJOtfmwf1RYagD7jbYNw8fj/WoHU8Y676fSxyH+msoIxweLxmUAbAbcDL+
 SXkg==
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=7g9hZ5cwZQDvaY5Ivvf+0iKNR9stKA7YA1bFt8iEPm0=;
 b=BY0ZNnQ5SoXBnTvBkv4EeBuxuCuHl4W5ywaLNzRY7R3Sr16JjXCYAgzJic/S2XtPVl
 IUaFGpZA0rxDXXf3VGG0za8aZ64KNM4DBueJ9pCXZPygoneoJgw0ng8ZSrkpm5Pk/bdK
 3l5aro4WCrfhwq0PvEuv/LRs9E1ZX+57XeOllUsM1NO0wF4W0KWF59CcmlBKpkilq8pQ
 8p2x0E0xyRBVaHY73ngNyUOvcb26YCkcNH2uEv5YCulA5NyQsqCR/wyyqJEnzZzWJfcn
 8kX4Ohks3UAiF6xMtadwr1uarrvFb47XsDMa6XohDSoiyJOAC1aXn5hPZKc9+wIQKIhS
 QCXw==
X-Gm-Message-State: AMke39lFMVDGmP9lKBmEXUpK1MZU8N7sfTRO/+FjVS+58DId0JV7xaBZyjRcLm3B6TQ1jg==
X-Received: by 10.36.19.133 with SMTP id 127mr6983287itz.3.1488409162303;
 Wed, 01 Mar 2017 14:59:22 -0800 (PST)
Received: from zony ([45.2.7.65])
 by smtp.googlemail.com with ESMTPSA id e20sm214892itc.3.2017.03.01.14.59.20
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Wed, 01 Mar 2017 14:59:20 -0800 (PST)
From: npostavs@HIDDEN
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
 <87poifjsw2.fsf@HIDDEN>
 <87poibgfyw.fsf@HIDDEN> <m24lzmm2oz.fsf@HIDDEN>
 <87o9xtf0q6.fsf@HIDDEN> <m2shn2742b.fsf@HIDDEN>
 <877f4efifx.fsf@HIDDEN> <m2efylsy6b.fsf@HIDDEN>
 <87innwe5wq.fsf@HIDDEN> <m2y3wqfvtn.fsf@HIDDEN>
 <87r32icsu1.fsf@HIDDEN> <83zih6nwat.fsf@HIDDEN>
Date: Wed, 01 Mar 2017 18:00:34 -0500
In-Reply-To: <83zih6nwat.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 28 Feb
 2017 17:56:42 +0200")
Message-ID: <87a894d2lp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: 25753
Cc: 25753 <at> debbugs.gnu.org, charles@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.7 (/)

retitle 25753 Python with libedit (macOS default) echoes input, breaks native completion
quit

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: npostavs@HIDDEN
>> Cc: 25753 <at> debbugs.gnu.org,  Eli Zaretskii <eliz@HIDDEN>
>> Date: Tue, 28 Feb 2017 09:07:02 -0500
>> 
>> Does this look okay?
>> 
>> --- i/etc/PROBLEMS
>> +++ w/etc/PROBLEMS
>
> Yes, thanks.

Pushed to emacs-25 [1: 6e788ef0e2].

1: 2017-03-01 17:56:20 -0500 6e788ef0e262fafc014c21f4ad52cc5dc9f1715b
  ; etc/PROBLEMS: Explain about the python+libedit problem (Bug#25753).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 28 Feb 2017 15:57:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 28 10:57:18 2017
Received: from localhost ([127.0.0.1]:60448 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cik9N-0002J2-Rh
	for submit <at> debbugs.gnu.org; Tue, 28 Feb 2017 10:57:18 -0500
Received: from eggs.gnu.org ([208.118.235.92]:49841)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1cik9M-0002Im-FJ
 for 25753 <at> debbugs.gnu.org; Tue, 28 Feb 2017 10:57:16 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1cik9E-00049u-0F
 for 25753 <at> debbugs.gnu.org; Tue, 28 Feb 2017 10:57:11 -0500
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]:49323)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1cik9D-00049q-Tl; Tue, 28 Feb 2017 10:57:07 -0500
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3423
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1cik9D-0006XJ-5G; Tue, 28 Feb 2017 10:57:07 -0500
Date: Tue, 28 Feb 2017 17:56:42 +0200
Message-Id: <83zih6nwat.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: npostavs@HIDDEN
In-reply-to: <87r32icsu1.fsf@HIDDEN>
 (npostavs@HIDDEN)
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
 <87poifjsw2.fsf@HIDDEN>
 <87poibgfyw.fsf@HIDDEN> <m24lzmm2oz.fsf@HIDDEN>
 <87o9xtf0q6.fsf@HIDDEN> <m2shn2742b.fsf@HIDDEN>
 <877f4efifx.fsf@HIDDEN> <m2efylsy6b.fsf@HIDDEN>
 <87innwe5wq.fsf@HIDDEN> <m2y3wqfvtn.fsf@HIDDEN>
 <87r32icsu1.fsf@HIDDEN>
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: 25753
Cc: 25753 <at> debbugs.gnu.org, charles@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: npostavs@HIDDEN
> Cc: 25753 <at> debbugs.gnu.org,  Eli Zaretskii <eliz@HIDDEN>
> Date: Tue, 28 Feb 2017 09:07:02 -0500
> 
> Does this look okay?
> 
> --- i/etc/PROBLEMS
> +++ w/etc/PROBLEMS

Yes, thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 28 Feb 2017 14:05:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 28 09:05:57 2017
Received: from localhost ([127.0.0.1]:59213 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ciiPd-0007en-9q
	for submit <at> debbugs.gnu.org; Tue, 28 Feb 2017 09:05:57 -0500
Received: from mail-io0-f193.google.com ([209.85.223.193]:33108)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1ciiPb-0007eZ-Sw
 for 25753 <at> debbugs.gnu.org; Tue, 28 Feb 2017 09:05:56 -0500
Received: by mail-io0-f193.google.com with SMTP id f84so1504866ioj.0
 for <25753 <at> debbugs.gnu.org>; Tue, 28 Feb 2017 06:05:55 -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=hoF3XOIOjIBnblHggBJhX/tZJtvp81CiuzDQ9FK0Xy0=;
 b=I6bWPQx2vM8nbw2o+nis+FW7TecfDHt3fIbKXzeBYJyAS75SftPAOyeW+JJP9LSmN1
 uTn4JJy/dBz6Gn3iiIeBfZGKchxj5BDk3ipdaX12MX2X/DOi7TK71LJ+hj07OG2Ozizv
 E3Xq6TDPCcHplnjEsgHyRkZ9xE2fXgdLGolaZj0gIH7S0Vqj3Dzy1/ZA0KynqefVm3xo
 QyXi1V8dVGci1ga2BGNVg425Kq+OFaJgbK+UGMA83YwOMqjOzNhtcR0pqHr0r8bJwf1Q
 MZnOi3OcqlSdJcrS8hquc6ohWhnLleVoJ7rhVfz3435q2H2u15HPchHinRp38A4bQFNc
 AaJA==
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=hoF3XOIOjIBnblHggBJhX/tZJtvp81CiuzDQ9FK0Xy0=;
 b=j+wHzgbr894TkR/z+2gJSD/opFovwqHIG3Fs+71/jeV5vBHxLUEpZg9/pKhAVx9kRx
 tk4gZV+AR4wyac4zgHuYv5H3ULCLU79e6buweu/OGHDgTDFKFlOpbPJC40GonhYS+miK
 zndDu6VsV8CCT7hGs0YUmXIyPbDCKNZERQgi3ryORX7W+2i7QYIwBmP2pNW1Ge3oryma
 2j2O+vbTklPBj+nBQxHx3G+AeT8PbdLHCNYXiaP+tl233GceQ3vubuO4M0ANnePbgCgd
 NrdK9Qa4WvY01aPQU2XD8tBXVtDOu4n5if2Eiy2IASe0QA4m3LIldlA6JiMBO3YL3X3E
 3eyw==
X-Gm-Message-State: AMke39kLUn4K6o0ba8YRInuc51KrG/mP9GNJCgX5mbUbYSdfXo8lF3Y2CbciLezEZfj6kQ==
X-Received: by 10.107.162.194 with SMTP id l185mr3075462ioe.184.1488290750021; 
 Tue, 28 Feb 2017 06:05:50 -0800 (PST)
Received: from zony ([45.2.7.65])
 by smtp.googlemail.com with ESMTPSA id a4sm830628ioa.43.2017.02.28.06.05.48
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Tue, 28 Feb 2017 06:05:49 -0800 (PST)
From: npostavs@HIDDEN
To: charles@HIDDEN (Charles A. Roelli)
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
 <87poifjsw2.fsf@HIDDEN>
 <87poibgfyw.fsf@HIDDEN> <m24lzmm2oz.fsf@HIDDEN>
 <87o9xtf0q6.fsf@HIDDEN> <m2shn2742b.fsf@HIDDEN>
 <877f4efifx.fsf@HIDDEN> <m2efylsy6b.fsf@HIDDEN>
 <87innwe5wq.fsf@HIDDEN> <m2y3wqfvtn.fsf@HIDDEN>
Date: Tue, 28 Feb 2017 09:07:02 -0500
In-Reply-To: <m2y3wqfvtn.fsf@HIDDEN> (Charles A. Roelli's message of "Tue,
 28 Feb 2017 11:34:12 +0100")
Message-ID: <87r32icsu1.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: 25753
Cc: 25753 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.7 (/)

charles@HIDDEN (Charles A. Roelli) writes:

> using `python-shell-interpreter' and `cat | python $'.  Python exited
> immediately with code 126, so I guess this solution does not work here.
> But I can't claim to understand any issues having to do with TTYs/"dumb
> terminals", so maybe I am missing something.

The equivalent for python.el would be approximately

(defun my-python-shell-calculate-command (&rest _)
  "sh -c \"cat | python -i\"")
(advice-add 'python-shell-calculate-command :override
            #'my-python-shell-calculate-command)

But this breaks native completion and prompt detection, due to IO
buffering I think.

>>>  So it would seem that `sudo easy_install
>>> gnureadline' is the right thing to run.  However that still does not fix
>>> the issue because python2.7/lib-dynload/ comes before
>>> python2.7/site-packages/ (where `gnureadline' is installed) in Python's
>>> $PATH equivalent, `sys.path'.  The solution, then, is to reorder the
>>> path somehow or get `readline.so' out of the way (maybe by renaming it
>>> -- cleaner suggestions welcome).
>>
>> I guess renaming should have the least amount of side-effects.
>
> Great.  This is what works for me:
>
> cd /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
> mv readline.so readline.so.bak
>
> Hopefully we can add into emacs-25 a comment about this situation,
> advising Mac OS X users to install `gnureadline' with `easy_install
> gnureadline', then renaming `readline.so' to something not ending in
> `.so', if the native completion does not work immediately.

Does this look okay?

--- i/etc/PROBLEMS
+++ w/etc/PROBLEMS
@@ -463,8 +463,25 @@ problem by adding this to your .cshrc file:
         unset edit
         stty -icrnl -onlcr -echo susp ^Z
     endif
 
+*** In Inferior Python mode, input is echoed and native completion doesn't work.
+<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25753>
+
+This happens when python uses a libedit based readline module, which
+is the default on macOS.  This can be worked around by installing a
+GNU readline based module instead, for example, using setuptools
+
+    sudo easy_install gnureadline
+
+And then rename the system's readline so that it won't be loaded:
+
+    cd /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
+    mv readline.so readline.so.bak
+
+See <https://pypi.python.org/pypi/gnureadline> for more details on
+installation.
+
 *** Emacs startup on GNU/Linux systems (and possibly other systems) is slow.
 
 This can happen if the system is misconfigured and Emacs can't get the
 full qualified domain name, FQDN.  You should have your FQDN in the




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 28 Feb 2017 10:34:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 28 05:34:26 2017
Received: from localhost ([127.0.0.1]:59097 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cif6v-0000na-To
	for submit <at> debbugs.gnu.org; Tue, 28 Feb 2017 05:34:26 -0500
Received: from sinyavsky.aurox.ch ([37.35.109.145]:53507)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <charles@HIDDEN>) id 1cif6u-0000nN-3v
 for 25753 <at> debbugs.gnu.org; Tue, 28 Feb 2017 05:34:24 -0500
Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1])
 by sinyavsky.aurox.ch (Postfix) with ESMTP id E748922380
 for <25753 <at> debbugs.gnu.org>; Tue, 28 Feb 2017 10:31:08 +0000 (UTC)
Authentication-Results: sinyavsky.aurox.ch (amavisd-new);
 dkim=pass (1024-bit key) reason="pass (just generated, assumed good)"
 header.d=aurox.ch
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h=
 content-type:content-type:mime-version:message-id:in-reply-to
 :date:date:references:subject:subject:to:from:from; s=dkim; t=
 1488277866; x=1489141867; bh=kAQ4KvcunXTnwySzJ87ae2CRkcXgxz18KbQ
 ixEW62Ew=; b=SD3vAzk6x0Ux7yypWTowhU/s5JaU3Wc23S2Kdks46y4m2D1TO4S
 Dz60vEGDg2fO1iDjn1vjypjHmxx/ao7/LgVpJiL2vbxgr4urp0dy6/0D/PhMAFF/
 RUUhWk9xXBjWwbGdQWs5yx0sKGG5Al+a2BDT/34CIM9ybVEQj2f4mFvo=
X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com
Received: from sinyavsky.aurox.ch ([127.0.0.1])
 by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new,
 port 10026) with ESMTP id OJyaFto82-zA for <25753 <at> debbugs.gnu.org>;
 Tue, 28 Feb 2017 10:31:06 +0000 (UTC)
Received: from gray (54.4.4.85.dynamic.wline.res.cust.swisscom.ch [85.4.4.54])
 by sinyavsky.aurox.ch (Postfix) with ESMTPSA id DCB462236B;
 Tue, 28 Feb 2017 10:31:04 +0000 (UTC)
From: charles@HIDDEN (Charles A. Roelli)
To: npostavs@HIDDEN
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
 <87poifjsw2.fsf@HIDDEN>
 <87poibgfyw.fsf@HIDDEN> <m24lzmm2oz.fsf@HIDDEN>
 <87o9xtf0q6.fsf@HIDDEN> <m2shn2742b.fsf@HIDDEN>
 <877f4efifx.fsf@HIDDEN> <m2efylsy6b.fsf@HIDDEN>
 <87innwe5wq.fsf@HIDDEN>
Date: Tue, 28 Feb 2017 11:34:12 +0100
In-Reply-To: <87innwe5wq.fsf@HIDDEN>
 (npostavs@HIDDEN's message of "Sun, 26 Feb 2017
 21:14:45 -0500")
Message-ID: <m2y3wqfvtn.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 25753
Cc: 25753 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

On Sun, Feb 26 2017 at 09:14:45 pm, npostavs@HIDDEN wrote:

> charles@HIDDEN (Charles A. Roelli) writes:
>
>> On Sat, Feb 25 2017 at 09:34:10 am, npostavs@HIDDEN wrote:
>>
>>> Possibly setting `comint-process-echoes' could help, though I don't
>>> understand why there is echoing in the first place.
>>
>> Thanks for the pointer to that variable.  I ran this:
>>
>>    (add-hook 'inferior-python-mode-hook (lambda () (setq comint-process-echoes t)))
>>
>> and the commands at the prompt stopped echoing, but the support
>> functions still echoed.  So it looks like the problem has to be fixed on
>> the readline/libedit side of Python.
>
> This thread[1] might be somewhat relevant:
>
>     The problem is that eshell tells subprocesses that they're running in
>     a terminal (e.g., when queried via hIsTerminalDevice), but always
>     echos user input itself regardless of the tty's ECHO attribute. This
>     confuses libedit, which assumes that if it's connected to a terminal
>     then it can turn off echoing in order to run its own rich line editor.
>
> [1]:
> http://glasgow-haskell-users.haskell.narkive.com/vyeVJUEB/problem-with-echo-prompting-in-ghci-visible-in-emacs

Thanks.  FWIW, I tried this approach:

> Given this info, there's a fairly easy emacs haskell-mode work-around. I
> made a shell script "ghci-no-tty" in my ~/bin that contains
> 
> # So ghci+readline won't echo input
> cat | /usr/local/bin/ghci $*
> 
> and used "M-x customize-group" with the "haskell" group to set the "Haskell
> Program Name" variable to "/home/conal/bin/ghci-no-tty" (must be full path).
> 
> Now there's no more input echoing, and commands like automatic signature
> insertion ("\C-c\C-t") work again.

using `python-shell-interpreter' and `cat | python $'.  Python exited
immediately with code 126, so I guess this solution does not work here.
But I can't claim to understand any issues having to do with TTYs/"dumb
terminals", so maybe I am missing something.

>>  So it would seem that `sudo easy_install
>> gnureadline' is the right thing to run.  However that still does not fix
>> the issue because python2.7/lib-dynload/ comes before
>> python2.7/site-packages/ (where `gnureadline' is installed) in Python's
>> $PATH equivalent, `sys.path'.  The solution, then, is to reorder the
>> path somehow or get `readline.so' out of the way (maybe by renaming it
>> -- cleaner suggestions welcome).
>
> I guess renaming should have the least amount of side-effects.

Great.  This is what works for me:

cd /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
mv readline.so readline.so.bak

Hopefully we can add into emacs-25 a comment about this situation,
advising Mac OS X users to install `gnureadline' with `easy_install
gnureadline', then renaming `readline.so' to something not ending in
`.so', if the native completion does not work immediately.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 27 Feb 2017 02:13:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 26 21:13:42 2017
Received: from localhost ([127.0.0.1]:57344 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ciAon-0007O5-VV
	for submit <at> debbugs.gnu.org; Sun, 26 Feb 2017 21:13:42 -0500
Received: from mail-io0-f196.google.com ([209.85.223.196]:34533)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1ciAom-0007Ns-0Z
 for 25753 <at> debbugs.gnu.org; Sun, 26 Feb 2017 21:13:40 -0500
Received: by mail-io0-f196.google.com with SMTP id n76so2972601ioe.1
 for <25753 <at> debbugs.gnu.org>; Sun, 26 Feb 2017 18:13:40 -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=0zA/fEA3rTGh9Ya+RHdsb3FK2G7b7tRnHK/okIsyoVw=;
 b=Dej+cSmLWSjGYvvxfJgFrNm6FOXPmNVQ3wxBYzWJbluRf49XXpgoGCjN62PBOrdll/
 MUGUDdj3LBq2hbPdYhFzVMN5xCEoFPwb8n5Nb5azuY9R/bvWy5LQeOqNjqpb+jsxJIim
 8xr4olW+F1+nj8Zzpuy0qbAn2PuzJzZ7BUukgTqLNeZ/ssG4Jf8plDkB88PujY3HHOm6
 eoULjEjpbdmA0v8ccWIPuLIBS4zHR4V/eiFeuoLi+wfP4FML+3B3EKhKtSy0Ww2tfCq/
 zAnC6QImg1x3GR4yq7v0/mWHNYScp+WVrX1YR3Xga9pMuyCBZEcKHOW+5AhVqlK5M1T2
 +nVQ==
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=0zA/fEA3rTGh9Ya+RHdsb3FK2G7b7tRnHK/okIsyoVw=;
 b=mCrIA/68RYSZE5EzTgW0quIG2zXiivOgkZF9v30lu4HHxFq8zAuARuBxxWAaqflpQF
 dLGczochpQIOqwviN5YPaWr1K4WPHK9Wpx7YBz8oZBY1xZptZZZk2kmxtYE95ObR53XJ
 fpogU3ZiJ4gyXj+gfS6S79HYfh+M+AHtmLMGGlBlWeGLZKJxWRhunFuEtRb4QD3YUd88
 gGjD098JgsZcGHCXT8hq8BhvONODTsdHrr2vY2BZ2zN+KjEY1a/xewY91HSg/jgWDemq
 My2zBc2LlXuc9d2Xrjz2EC91G3G6p0Takx5e6tJqaVhVrFRGosTYK7Fc5oZEITLr7sz2
 3uzA==
X-Gm-Message-State: AMke39mGpvmnCfQzjyHBS6I2Ya2g5CsfT4D9rdmoLLANDvAjZmqBzKWcLlnr9CdLW+dubg==
X-Received: by 10.107.138.140 with SMTP id c12mr5025673ioj.18.1488161614428;
 Sun, 26 Feb 2017 18:13:34 -0800 (PST)
Received: from zony ([45.2.7.65])
 by smtp.googlemail.com with ESMTPSA id w75sm3812663itc.21.2017.02.26.18.13.33
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sun, 26 Feb 2017 18:13:33 -0800 (PST)
From: npostavs@HIDDEN
To: charles@HIDDEN (Charles A. Roelli)
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
 <87poifjsw2.fsf@HIDDEN>
 <87poibgfyw.fsf@HIDDEN> <m24lzmm2oz.fsf@HIDDEN>
 <87o9xtf0q6.fsf@HIDDEN> <m2shn2742b.fsf@HIDDEN>
 <877f4efifx.fsf@HIDDEN> <m2efylsy6b.fsf@HIDDEN>
Date: Sun, 26 Feb 2017 21:14:45 -0500
In-Reply-To: <m2efylsy6b.fsf@HIDDEN> (Charles A. Roelli's message of "Sat,
 25 Feb 2017 23:28:12 +0100")
Message-ID: <87innwe5wq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.1 (/)
X-Debbugs-Envelope-To: 25753
Cc: 25753 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.1 (/)

charles@HIDDEN (Charles A. Roelli) writes:

> On Sat, Feb 25 2017 at 09:34:10 am, npostavs@HIDDEN wrote:
>
>> Possibly setting `comint-process-echoes' could help, though I don't
>> understand why there is echoing in the first place.
>
> Thanks for the pointer to that variable.  I ran this:
>
>    (add-hook 'inferior-python-mode-hook (lambda () (setq comint-process-echoes t)))
>
> and the commands at the prompt stopped echoing, but the support
> functions still echoed.  So it looks like the problem has to be fixed on
> the readline/libedit side of Python.

This thread[1] might be somewhat relevant:

    The problem is that eshell tells subprocesses that they're running in
    a terminal (e.g., when queried via hIsTerminalDevice), but always
    echos user input itself regardless of the tty's ECHO attribute. This
    confuses libedit, which assumes that if it's connected to a terminal
    then it can turn off echoing in order to run its own rich line editor.

[1]: http://glasgow-haskell-users.haskell.narkive.com/vyeVJUEB/problem-with-echo-prompting-in-ghci-visible-in-emacs

>  So it would seem that `sudo easy_install
> gnureadline' is the right thing to run.  However that still does not fix
> the issue because python2.7/lib-dynload/ comes before
> python2.7/site-packages/ (where `gnureadline' is installed) in Python's
> $PATH equivalent, `sys.path'.  The solution, then, is to reorder the
> path somehow or get `readline.so' out of the way (maybe by renaming it
> -- cleaner suggestions welcome).

I guess renaming should have the least amount of side-effects.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 25 Feb 2017 22:28:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 25 17:28:28 2017
Received: from localhost ([127.0.0.1]:56108 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1chkpI-000690-EY
	for submit <at> debbugs.gnu.org; Sat, 25 Feb 2017 17:28:28 -0500
Received: from sinyavsky.aurox.ch ([37.35.109.145]:50923)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <charles@HIDDEN>) id 1chkpG-00068l-8N
 for 25753 <at> debbugs.gnu.org; Sat, 25 Feb 2017 17:28:26 -0500
Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1])
 by sinyavsky.aurox.ch (Postfix) with ESMTP id D8D1C2237F
 for <25753 <at> debbugs.gnu.org>; Sat, 25 Feb 2017 22:25:10 +0000 (UTC)
Authentication-Results: sinyavsky.aurox.ch (amavisd-new);
 dkim=pass (1024-bit key) reason="pass (just generated, assumed good)"
 header.d=aurox.ch
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h=
 content-type:content-type:mime-version:message-id:in-reply-to
 :date:date:references:subject:subject:to:from:from; s=dkim; t=
 1488061508; x=1488925509; bh=CLIQflWuGMLCniNORas02JZVU18VfR5uih9
 6CsM7Lmw=; b=fsctIRCWGkjTidGysQJNqD/rDxDtOSwbIN5kH44m7T7cS2+g9kU
 9khlfH8dudf7nPqtoSnz0LxsDoeKnYWnMExeIwlSMgAyVCPC81N6iSDCysWcbvOm
 duKK/PbH2FrzJOoxMnq7Z0wuAS4uVu38B30yVPFCesutYL+1jfxJZ8sY=
X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com
Received: from sinyavsky.aurox.ch ([127.0.0.1])
 by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new,
 port 10026) with ESMTP id Ja2dh2i4-UU6 for <25753 <at> debbugs.gnu.org>;
 Sat, 25 Feb 2017 22:25:08 +0000 (UTC)
Received: from gray (54.4.4.85.dynamic.wline.res.cust.swisscom.ch [85.4.4.54])
 by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 03EFD2233E;
 Sat, 25 Feb 2017 22:25:07 +0000 (UTC)
From: charles@HIDDEN (Charles A. Roelli)
To: npostavs@HIDDEN
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
 <87poifjsw2.fsf@HIDDEN>
 <87poibgfyw.fsf@HIDDEN> <m24lzmm2oz.fsf@HIDDEN>
 <87o9xtf0q6.fsf@HIDDEN> <m2shn2742b.fsf@HIDDEN>
 <877f4efifx.fsf@HIDDEN>
Date: Sat, 25 Feb 2017 23:28:12 +0100
In-Reply-To: <877f4efifx.fsf@HIDDEN>
 (npostavs@HIDDEN's message of "Sat, 25 Feb 2017
 09:34:10 -0500")
Message-ID: <m2efylsy6b.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 25753
Cc: 25753 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

On Sat, Feb 25 2017 at 09:34:10 am, npostavs@HIDDEN wrote:

> charles@HIDDEN (Charles A. Roelli) writes:
>
>> Could you please evaluate these forms with a running instance of
>> Python in Emacs?  My output follows each form.  It seems like the Mac
>> version of Python echoes the last command sent, and maybe python.el
>> does not expect this?
>
> Yes, I was going to ask if you also get this echoing for commands typed
> in at the prompt or is it just the support functions?  

Seems to be everywhere.

> Possibly setting `comint-process-echoes' could help, though I don't
> understand why there is echoing in the first place.

Thanks for the pointer to that variable.  I ran this:

   (add-hook 'inferior-python-mode-hook (lambda () (setq comint-process-echoes t)))

and the commands at the prompt stopped echoing, but the support
functions still echoed.  So it looks like the problem has to be fixed on
the readline/libedit side of Python.

> Here is what I get:
>
>     (python-shell-send-string-no-output "import os\nimport sys") ;=> ""
>     (python-shell-send-string-no-output "import os; import sys") ;=> ""
>     (python-ffap-module-path "os") ;=> "/usr/lib/python3.6/os.py"

Thanks.  I managed to fix my setup to give equivalent results (see below).

> By the way, it was reported[1] that using "homebrew" python avoids these
> issues, apparently that build uses GNU readline instead of libedit[2].
>
> [1]: https://github.com/jorgenschaefer/elpy/issues/887#issuecomment-282215656
> [2]: https://github.com/jorgenschaefer/elpy/issues/887#issuecomment-282332143

Thanks for setting me on this trail.  It turns out there's a package you
can install via `easy_install' (part of Python's `setuptools') called
`gnureadline' [1] (formerly called just `readline') which is supposed to
shadow python2.7/lib-dynload/'s `readline.so' with a relatively
up-to-date statically linked GNU replacement (for those of us with a
wacky `libedit'-ized version).  So it would seem that `sudo easy_install
gnureadline' is the right thing to run.  However that still does not fix
the issue because python2.7/lib-dynload/ comes before
python2.7/site-packages/ (where `gnureadline' is installed) in Python's
$PATH equivalent, `sys.path'.  The solution, then, is to reorder the
path somehow or get `readline.so' out of the way (maybe by renaming it
-- cleaner suggestions welcome).  I haven't tested that yet, but it
should work as expected.

At the moment I've been running M-x run-python from the
python2.7/site-packages/ folder where `readline.py' is stored, since
Python adds the path of the current directory to the front of
`sys.path'.  That means `readline.py' gets picked from there, which is
convenient, if not a little surprising at first.  With that done, the
forms I posted previously evaluate as expected, without the code
echoing.  Eldoc also works fine.  Maybe we can add a notice about this
somewhere in python.el in emacs-25.  I'm not sure yet about the best way
to handle the path ordering issue between `readline.so' and
`gnureadline'.

[1] https://pypi.python.org/pypi/gnureadline




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 25 Feb 2017 14:33:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 25 09:33:06 2017
Received: from localhost ([127.0.0.1]:55297 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1chdPG-0007os-Lp
	for submit <at> debbugs.gnu.org; Sat, 25 Feb 2017 09:33:06 -0500
Received: from mail-io0-f195.google.com ([209.85.223.195]:36082)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1chdPE-0007oM-8j
 for 25753 <at> debbugs.gnu.org; Sat, 25 Feb 2017 09:33:04 -0500
Received: by mail-io0-f195.google.com with SMTP id w10so1557101iod.3
 for <25753 <at> debbugs.gnu.org>; Sat, 25 Feb 2017 06:33:04 -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=uSyPRL4KVKfVTaY03SqAgCABP6aLVROItNzl+kSv7CE=;
 b=vOnUul5kXpZ5yGYzTlmhstMT8SiS/L0re3VeBwZH7vpojwP/PKTY9LvCkCt5t9BsR8
 elXuegTpezktvAJbj/HJQQflvW+ewABApYC0fw8esykfiUr/dUMpn7PlYKpdUnIcn0Tl
 aPY6BYhDhk756WMap5WEQJgdGv4dh6mYQvs+N6sYIwjiZZEevuFWx3CzDK005IuHtew4
 uCEJGCup46vvje+a5KOoDZIKuPsprcT1erYIvjpqT0s2wGDhyLpC/1Xx7sUp3rBk4Z+X
 M1QZXT/E+65WaqJfUGHMyGIK7CEr2/2Q62YXDrA5W9UYxTdFiQOd2ggqBaYj0tHM8iv3
 t4jA==
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=uSyPRL4KVKfVTaY03SqAgCABP6aLVROItNzl+kSv7CE=;
 b=iWslQzPXR0UnzCUWfYl4aEkSyqMyCyBr2ec4uWTQB9lWASsLgJDgEzDirFqeCyKdSO
 XKuT+npRkEewUlSbi2xDd3iJKYyUjN2GSvVksojdZqQVhEIgjel4weh7pp6RzzSDW3GG
 JU1BXj9d/d+OLNcyw9NyG+nQCY+KGd5Ay+/EBCNTWrNn6cELlnhJqzCp6JfdrY3G85/X
 Am4m65MaBrF/x5IugMH+aS7Cb+GObBTZUPbEsutyJ386sW0Tn5b6nt2oXJudoPlmN/w5
 qVjfrrFoUfhNGdiA+X/h77aCJqrKFKVJ6W2gd9VZALMxdx+H1Q2PVku+yRtbkHhQT3l7
 NOZQ==
X-Gm-Message-State: AMke39lcEkOSnqJzBsuTryueEeVZWryjs3XDKuwTR2YY8T3br4czJg53X1jBTmBKY7od/g==
X-Received: by 10.107.21.6 with SMTP id 6mr6729777iov.116.1488033178438;
 Sat, 25 Feb 2017 06:32:58 -0800 (PST)
Received: from zony ([45.2.7.65])
 by smtp.googlemail.com with ESMTPSA id m77sm2041164ita.16.2017.02.25.06.32.57
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sat, 25 Feb 2017 06:32:57 -0800 (PST)
From: npostavs@HIDDEN
To: charles@HIDDEN (Charles A. Roelli)
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
 <87poifjsw2.fsf@HIDDEN>
 <87poibgfyw.fsf@HIDDEN> <m24lzmm2oz.fsf@HIDDEN>
 <87o9xtf0q6.fsf@HIDDEN> <m2shn2742b.fsf@HIDDEN>
Date: Sat, 25 Feb 2017 09:34:10 -0500
In-Reply-To: <m2shn2742b.fsf@HIDDEN> (Charles A. Roelli's message of "Sat,
 25 Feb 2017 15:11:56 +0100")
Message-ID: <877f4efifx.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.4 (/)
X-Debbugs-Envelope-To: 25753
Cc: 25753 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

charles@HIDDEN (Charles A. Roelli) writes:

> Could you please evaluate these forms with a running instance of
> Python in Emacs?  My output follows each form.  It seems like the Mac
> version of Python echoes the last command sent, and maybe python.el
> does not expect this?

Yes, I was going to ask if you also get this echoing for commands typed
in at the prompt or is it just the support functions?  Possibly setting
`comint-process-echoes' could help, though I don't understand why there
is echoing in the first place.

Here is what I get:

    (python-shell-send-string-no-output "import os\nimport sys") ;=> ""
    (python-shell-send-string-no-output "import os; import sys") ;=> ""
    (python-ffap-module-path "os") ;=> "/usr/lib/python3.6/os.py"

By the way, it was reported[1] that using "homebrew" python avoids these
issues, apparently that build uses GNU readline instead of libedit[2].

[1]: https://github.com/jorgenschaefer/elpy/issues/887#issuecomment-282215656
[2]: https://github.com/jorgenschaefer/elpy/issues/887#issuecomment-282332143




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 25 Feb 2017 14:12:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 25 09:12:12 2017
Received: from localhost ([127.0.0.1]:55287 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1chd52-0005cP-F2
	for submit <at> debbugs.gnu.org; Sat, 25 Feb 2017 09:12:12 -0500
Received: from sinyavsky.aurox.ch ([37.35.109.145]:50703)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <charles@HIDDEN>) id 1chd4z-0005c9-KH
 for 25753 <at> debbugs.gnu.org; Sat, 25 Feb 2017 09:12:11 -0500
Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1])
 by sinyavsky.aurox.ch (Postfix) with ESMTP id 9537F2237E
 for <25753 <at> debbugs.gnu.org>; Sat, 25 Feb 2017 14:08:56 +0000 (UTC)
Authentication-Results: sinyavsky.aurox.ch (amavisd-new);
 dkim=pass (1024-bit key) reason="pass (just generated, assumed good)"
 header.d=aurox.ch
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h=
 content-type:content-type:mime-version:message-id:in-reply-to
 :date:date:references:subject:subject:to:from:from; s=dkim; t=
 1488031733; x=1488895734; bh=u/46wFGP8Fmm4aqqXCQDXs9jodwuezEzgPH
 CPtjF8xM=; b=YG+ysVF0un8lW4ADmzrw62IiDWdem8SlhfWMiaZRJverdLaGwe0
 UIVvhyunACqVXS8tbScPAphhbLvzppwabuMk+O+yEfemOQzJU65gs6XCJop/xeS8
 9gKgcw+NvDmMDzwAo+CeRRwo1evoVY1SwXgFlfDq0uSHbVXL/6HtduBk=
X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com
Received: from sinyavsky.aurox.ch ([127.0.0.1])
 by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new,
 port 10026) with ESMTP id 5jJCRen1YHzj for <25753 <at> debbugs.gnu.org>;
 Sat, 25 Feb 2017 14:08:53 +0000 (UTC)
Received: from gray (54.4.4.85.dynamic.wline.res.cust.swisscom.ch [85.4.4.54])
 by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 1D1D02233E;
 Sat, 25 Feb 2017 14:08:51 +0000 (UTC)
From: charles@HIDDEN (Charles A. Roelli)
To: npostavs@HIDDEN
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
 <87poifjsw2.fsf@HIDDEN>
 <87poibgfyw.fsf@HIDDEN> <m24lzmm2oz.fsf@HIDDEN>
 <87o9xtf0q6.fsf@HIDDEN>
Date: Sat, 25 Feb 2017 15:11:56 +0100
In-Reply-To: <87o9xtf0q6.fsf@HIDDEN>
 (npostavs@HIDDEN's message of "Thu, 23 Feb 2017
 09:20:01 -0500")
Message-ID: <m2shn2742b.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 25753
Cc: 25753 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Could you please evaluate these forms with a running instance of
Python in Emacs?  My output follows each form.  It seems like the Mac
version of Python echoes the last command sent, and maybe python.el
does not expect this?  Notice in the third example, the correct result
appears, but is preceded by the code sent to the interpreter (which
should be omitted as garbage).

(python-shell-send-string-no-output "import os\nimport sys")
=> "import codecs, os;__pyfile = codecs.open('''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py167Tvh''', encoding='''utf-8''');__code = __pyfile.read().encode('''utf-8''');__pyfile.close();os.remove('''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py167Tvh''');exec(compile(__code, '''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py167Tvh''', 'exec'));"

(python-shell-send-string-no-output "import os; import sys")
=> "import os; import sys"

(python-ffap-module-path "os")
=> "import codecs, os;__pyfile = codecs.open('''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py167tDu''', encoding='''utf-8''');__code = __pyfile.read().encode('''utf-8''');__pyfile.close();os.remove('''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py167tDu''');exec(compile(__code, '''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py167tDu''', 'exec'));^M
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py"




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 24 Feb 2017 10:20:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 24 05:20:02 2017
Received: from localhost ([127.0.0.1]:53559 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1chCyn-0004ib-DR
	for submit <at> debbugs.gnu.org; Fri, 24 Feb 2017 05:20:01 -0500
Received: from sinyavsky.aurox.ch ([37.35.109.145]:50006)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <charles@HIDDEN>) id 1chCyl-0004iG-Hs
 for 25753 <at> debbugs.gnu.org; Fri, 24 Feb 2017 05:20:00 -0500
Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1])
 by sinyavsky.aurox.ch (Postfix) with ESMTP id E64042237C
 for <25753 <at> debbugs.gnu.org>; Fri, 24 Feb 2017 10:16:45 +0000 (UTC)
Authentication-Results: sinyavsky.aurox.ch (amavisd-new);
 dkim=pass (1024-bit key) reason="pass (just generated, assumed good)"
 header.d=aurox.ch
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h=
 content-type:content-type:mime-version:message-id:in-reply-to
 :date:date:references:subject:subject:to:from:from; s=dkim; t=
 1487931403; x=1488795404; bh=MhWCuJatp93jeOYZDKqS86OFswU8ImAHZJ/
 GmQQFl1s=; b=KRyMBGJtJAGb+4BRBq8NTZalaMCTqsmTXdej4fVMuDlmYS09qTy
 erle3KwY1oMxc5RHYsPyP5LmUErnLEnrhv8vmhWJEsfAF/b7qs9Jbrrlw78iGdKQ
 E+gqTxKyqwEuDgeVom6Tl+4MSPYR46IJDScdHZzlIaSidFNnmIGu9w9Y=
X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com
Received: from sinyavsky.aurox.ch ([127.0.0.1])
 by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new,
 port 10026) with ESMTP id E-okBFLaWvU8 for <25753 <at> debbugs.gnu.org>;
 Fri, 24 Feb 2017 10:16:43 +0000 (UTC)
Received: from gray (54.4.4.85.dynamic.wline.res.cust.swisscom.ch [85.4.4.54])
 by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 5C4C622364;
 Fri, 24 Feb 2017 10:16:43 +0000 (UTC)
From: charles@HIDDEN (Charles A. Roelli)
To: npostavs@HIDDEN
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
 <87poifjsw2.fsf@HIDDEN>
 <87poibgfyw.fsf@HIDDEN> <m24lzmm2oz.fsf@HIDDEN>
 <87o9xtf0q6.fsf@HIDDEN>
Date: Fri, 24 Feb 2017 11:19:46 +0100
In-Reply-To: <87o9xtf0q6.fsf@HIDDEN>
 (npostavs@HIDDEN's message of "Thu, 23 Feb 2017
 09:20:01 -0500")
Message-ID: <m2y3wvriv1.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 25753
Cc: 25753 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

On Thu, Feb 23 2017 at 09:20:01 am, npostavs@HIDDEN wrote:

> charles@HIDDEN (Charles A. Roelli) writes:
>>
>> Tested, and it has the same problem.  Here is what *Python* normally
>> looks like at the start, run from M-x run-python in emacs -Q:
>>
>> Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 26 2016, 12:10:39) 
>> [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
>> Type "help", "copyright", "credits" or "license" for more information.
>>>>> import codecs, os;__pyfile =
>>>>> codecs.open('''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py16611qgD''',
>>>>> encoding='''utf-8''');__code =
>>>>> __pyfile.read().encode('''utf-8''');__pyfile.close();os.remove('''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py16611qgD''');exec(compile(__code,
>>>>> '''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py16611qgD''',
>>>>> 'exec'));
>> python.el: native completion setup loaded
>>
>> It seems like the line starting with ">>> " should not be printed, if
>> <nyc4bos@HIDDEN>'s test output is deemed to be running more or less
>> correctly.  Maybe that can point us in the right direction?
>
> Hmm, it's odd, though since you're still getting the "setup loaded"
> message, the code *is* getting evaluated anyway, so it's likely that
> this problem is not directly related.  Let's see if we can track it down
> anyway, try the loading the attached as
>
>     emacs -Q -l py-trace-bad-output.el
>
> and see if anything shows up in *Messages*.
>
> (require 'python)
>
> (advice-add
>  'python-shell-make-comint :filter-return
>  (lambda (proc-buffer-name)
>    (with-current-buffer proc-buffer-name
>      (add-hook 'after-change-functions
>                (lambda (beg end len)
>                  (ignore-errors
>                    (save-excursion
>                      (save-match-data
>                        (when (string-prefix-p "import codecs" (buffer-substring beg end))
>                          (backtrace))))))
>                nil t))
>    proc-buffer-name))
>
> (run-python)
>
> (switch-to-buffer "*Python*")
> (display-buffer "*Messages*")
>

Here is what I got:

Loading ~/Downloads/py-trace-bad-output.el (source)...done
  backtrace()
  (progn (backtrace))
  (if (string-prefix-p "import codecs" (buffer-substring beg end)) (progn (backtrace)))
  (progn (if (string-prefix-p "import codecs" (buffer-substring beg end)) (progn (backtrace))))
  (unwind-protect (progn (if (string-prefix-p "import codecs" (buffer-substring beg end)) (progn (backtrace)))) (set-match-data save-match-data-internal (quote evaporate)))
  (let ((save-match-data-internal (match-data))) (unwind-protect (progn (if (string-prefix-p "import codecs" (buffer-substring beg end)) (progn (backtrace)))) (set-match-data save-match-data-internal (quote evaporate))))
  (save-excursion (let ((save-match-data-internal (match-data))) (unwind-protect (progn (if (string-prefix-p "import codecs" (buffer-substring beg end)) (progn (backtrace)))) (set-match-data save-match-data-internal (quote evaporate)))))
  (progn (save-excursion (let ((save-match-data-internal (match-data))) (unwind-protect (progn (if (string-prefix-p "import codecs" (buffer-substring beg end)) (progn (backtrace)))) (set-match-data save-match-data-internal (quote evaporate))))))
  (condition-case nil (progn (save-excursion (let ((save-match-data-internal (match-data))) (unwind-protect (progn (if (string-prefix-p "import codecs" ...) (progn ...))) (set-match-data save-match-data-internal (quote evaporate)))))) (error nil))
  (lambda (beg end len) (condition-case nil (progn (save-excursion (let ((save-match-data-internal (match-data))) (unwind-protect (progn (if ... ...)) (set-match-data save-match-data-internal (quote evaporate)))))) (error nil)))(191 556 0)
  comint-output-filter(#<process Python> "import codecs, os;__pyfile = codecs.open('''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py683UGH''', encoding='''utf-8''');__code = __pyfile.read().encode('''utf-8''');__pyfile.close();os.remove('''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py683UGH''');exec(compile(__code, '''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py683UGH''', 'exec'));
")
  accept-process-output(#<process Python> 1.0)
  python-shell-accept-process-output(#<process Python> 1.0)
  python-shell-completion-native-setup()
  python-shell-completion-native-turn-on-maybe(t)
  python-shell-completion-native-turn-on-maybe-with-msg()
  run-hooks(python-shell-first-prompt-hook)
  python-shell-comint-watch-for-first-prompt-output-filter(">>> ")
  run-hook-with-args(python-shell-comint-watch-for-first-prompt-output-filter ">>> ")
  comint-output-filter(#<process Python> ">>> ")
  read-event(nil t 2)
  sit-for(2)
  execute-extended-command(nil "load-file" "load-file")
  funcall-interactively(execute-extended-command nil "load-file" "load-file")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

Shell native completion is disabled, using fallback

>>> Can you test the python code from python-shell-completion-native-setup
>>> outside of Emacs, e.g., save it to a file called 'native-completion.py'
>>> and then run 'python -i native-completion.py' and then type an
>>> underscore and hit <tab>.
>>
>> I get the following:
>>
>>>>> ___package__
>> __PYTHON_EL_native_completion_setup
>> __name__
>> __doc__
>> __import__
>> __debug__
>>
>> Interestingly, none of the dummy completions pop up.
>
> This seems to be the core of the problem.  I gather that macOS uses
> libedit instead of readline by default, perhaps that is the source of
> incompatibility.  Can you figure out how to change the python code so
> that the dummy completions do show up?

Yes, I will look into it.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 23 Feb 2017 14:18:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 23 09:18:57 2017
Received: from localhost ([127.0.0.1]:52086 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cguES-0000NU-PQ
	for submit <at> debbugs.gnu.org; Thu, 23 Feb 2017 09:18:56 -0500
Received: from mail-it0-f68.google.com ([209.85.214.68]:33007)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1cguER-0000NH-Ds
 for 25753 <at> debbugs.gnu.org; Thu, 23 Feb 2017 09:18:55 -0500
Received: by mail-it0-f68.google.com with SMTP id e137so102069itc.0
 for <25753 <at> debbugs.gnu.org>; Thu, 23 Feb 2017 06:18:55 -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=YsiG8LGldWEyU9TjxBn9X3ksfrab5Y1cgpuwH8Q0gUQ=;
 b=cFGbmBzd17orgjFyxNcL7j+hsu96zp7xQE+4OqL26DczbofvPcwxU7RbgczInklcsH
 BPKySmeYEpBISl8rgg2uSCasgcxmOipcy1MKwhb2XAKlraUFb7sY08GaWloUTe4r3B++
 fWZksm5dOvV4xrEPWi0TWFMTmn2cr/hmbZ7z/e7nDtq8rTAnc4hYYrPcTmq7g210sTXq
 l6y1OffBEZI5Uyqq5sYdTdT4j945CebGp1YlWcbEHeyny/g+PkgXD2xLDSGwNTboMo5i
 3CuM7OfOJT3mSI/rUrCW820nBfu3q/K++7RGOXdheVjZw9Db6kKr+20yPTN4LRJgw6EU
 0yTA==
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=YsiG8LGldWEyU9TjxBn9X3ksfrab5Y1cgpuwH8Q0gUQ=;
 b=Og2jw2TtM2CYakFVqv4monIG/3+hpRXG5NHHCJlEVvNmNzLfMELjiXyH75GAvJPx/o
 cGLCOke552XmkaPuYIN85bWCS3p+QKBfFRdEl4fkt3ri0MUV+4/JTjJdZOATp0vcZQ+x
 f+LbKvtl9HftnX3UuM319HavA6PGLCb1k1l9mceFoPzMqbEljHFOuBJh1TMs9K8ufpY3
 JPAB3Ka9CozlOd40A4MCkM1b8mcohbe15O4cRQQSgp3CmFJv3z710AQL4e0iMJdxpHrt
 0qg1cM/QNw0TBCZBzs53jwyExlkp6vHlSkJtlFohfOZtD95lg7dR/3PSYvggXvbptpJB
 DuHg==
X-Gm-Message-State: AMke39kDFVjVeS+VhMjfEkpFNCvmeC/CMmUuoHJkhdsfJQCpZbpL0Z9QGQPb8EwYT4+0Qw==
X-Received: by 10.36.216.9 with SMTP id b9mr2673185itg.82.1487859529876;
 Thu, 23 Feb 2017 06:18:49 -0800 (PST)
Received: from zony ([45.2.7.65])
 by smtp.googlemail.com with ESMTPSA id l19sm1834592ioe.51.2017.02.23.06.18.48
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Thu, 23 Feb 2017 06:18:48 -0800 (PST)
From: npostavs@HIDDEN
To: charles@HIDDEN (Charles A. Roelli)
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
 <87poifjsw2.fsf@HIDDEN>
 <87poibgfyw.fsf@HIDDEN> <m24lzmm2oz.fsf@HIDDEN>
Date: Thu, 23 Feb 2017 09:20:01 -0500
In-Reply-To: <m24lzmm2oz.fsf@HIDDEN> (Charles A. Roelli's message of "Wed,
 22 Feb 2017 20:43:24 +0100")
Message-ID: <87o9xtf0q6.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 25753
Cc: 25753 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.2 (/)

--=-=-=
Content-Type: text/plain

charles@HIDDEN (Charles A. Roelli) writes:
>
> Tested, and it has the same problem.  Here is what *Python* normally
> looks like at the start, run from M-x run-python in emacs -Q:
>
> Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 26 2016, 12:10:39) 
> [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import codecs, os;__pyfile =
>>>> codecs.open('''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py16611qgD''',
>>>> encoding='''utf-8''');__code =
>>>> __pyfile.read().encode('''utf-8''');__pyfile.close();os.remove('''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py16611qgD''');exec(compile(__code,
>>>> '''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py16611qgD''',
>>>> 'exec'));
> python.el: native completion setup loaded
>
> It seems like the line starting with ">>> " should not be printed, if
> <nyc4bos@HIDDEN>'s test output is deemed to be running more or less
> correctly.  Maybe that can point us in the right direction?

Hmm, it's odd, though since you're still getting the "setup loaded"
message, the code *is* getting evaluated anyway, so it's likely that
this problem is not directly related.  Let's see if we can track it down
anyway, try the loading the attached as

    emacs -Q -l py-trace-bad-output.el

and see if anything shows up in *Messages*.


--=-=-=
Content-Type: application/emacs-lisp
Content-Disposition: attachment; filename=py-trace-bad-output.el
Content-Transfer-Encoding: quoted-printable
Content-Description: tracing code

(require 'python)

(advice-add
 'python-shell-make-comint :filter-return
 (lambda (proc-buffer-name)
   (with-current-buffer proc-buffer-name
     (add-hook 'after-change-functions
               (lambda (beg end len)
                 (ignore-errors
                   (save-excursion
                     (save-match-data
                       (when (string-prefix-p "import codecs" (buffer-subst=
ring beg end))
                         (backtrace))))))
               nil t))
   proc-buffer-name))

(run-python)

(switch-to-buffer "*Python*")
(display-buffer "*Messages*")

--=-=-=
Content-Type: text/plain


>> Can you test the python code from python-shell-completion-native-setup
>> outside of Emacs, e.g., save it to a file called 'native-completion.py'
>> and then run 'python -i native-completion.py' and then type an
>> underscore and hit <tab>.
>
> I get the following:
>
>>>> ___package__
> __PYTHON_EL_native_completion_setup
> __name__
> __doc__
> __import__
> __debug__
>
> Interestingly, none of the dummy completions pop up.

This seems to be the core of the problem.  I gather that macOS uses
libedit instead of readline by default, perhaps that is the source of
incompatibility.  Can you figure out how to change the python code so
that the dummy completions do show up?

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 22 Feb 2017 19:43:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 22 14:43:39 2017
Received: from localhost ([127.0.0.1]:51556 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cgcp8-0001IH-VP
	for submit <at> debbugs.gnu.org; Wed, 22 Feb 2017 14:43:39 -0500
Received: from sinyavsky.aurox.ch ([37.35.109.145]:48839)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <charles@HIDDEN>) id 1cgcp7-0001I3-1f
 for 25753 <at> debbugs.gnu.org; Wed, 22 Feb 2017 14:43:37 -0500
Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1])
 by sinyavsky.aurox.ch (Postfix) with ESMTP id 9A14D22372
 for <25753 <at> debbugs.gnu.org>; Wed, 22 Feb 2017 19:40:27 +0000 (UTC)
Authentication-Results: sinyavsky.aurox.ch (amavisd-new);
 dkim=pass (1024-bit key) reason="pass (just generated, assumed good)"
 header.d=aurox.ch
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h=
 content-type:content-type:mime-version:message-id:in-reply-to
 :date:date:references:subject:subject:to:from:from; s=dkim; t=
 1487792426; x=1488656427; bh=JiPOrV6Ju1Z6LseOFemq1x1VohaFVez3y9P
 38nXjmZM=; b=bMIs0nVEpKjtGH0Wpv5pvEoy5Uo1BwoS95vaYM18z6xLktZXQgZ
 oPrKroatiToc9XeSEtsaukdlcsrr1hUx0+zwKEs/n3xAu2obBgs/Gvq2yLvTE9oa
 AKA2ISot3CKX2M/D6MCkvG67lZlkTMjhhHsA66Y43B/sErB5n3UCmMKI=
X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com
Received: from sinyavsky.aurox.ch ([127.0.0.1])
 by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new,
 port 10026) with ESMTP id 0atgWrHLu0Y5 for <25753 <at> debbugs.gnu.org>;
 Wed, 22 Feb 2017 19:40:26 +0000 (UTC)
Received: from gray (54.4.4.85.dynamic.wline.res.cust.swisscom.ch [85.4.4.54])
 by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 572802236D;
 Wed, 22 Feb 2017 19:40:22 +0000 (UTC)
From: charles@HIDDEN (Charles A. Roelli)
To: npostavs@HIDDEN
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
 <87poifjsw2.fsf@HIDDEN>
 <87poibgfyw.fsf@HIDDEN>
Date: Wed, 22 Feb 2017 20:43:24 +0100
In-Reply-To: <87poibgfyw.fsf@HIDDEN>
 (npostavs@HIDDEN's message of "Tue, 21 Feb 2017
 20:40:55 -0500")
Message-ID: <m24lzmm2oz.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 25753
Cc: 25753 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

> As I've said, I don't think rc2 would change this, but since it's come
> out now, please test it. 

Tested, and it has the same problem.  Here is what *Python* normally
looks like at the start, run from M-x run-python in emacs -Q:

Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 26 2016, 12:10:39) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import codecs, os;__pyfile = codecs.open('''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py16611qgD''', encoding='''utf-8''');__code = __pyfile.read().encode('''utf-8''');__pyfile.close();os.remove('''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py16611qgD''');exec(compile(__code, '''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py16611qgD''', 'exec'));
python.el: native completion setup loaded

It seems like the line starting with ">>> " should not be printed, if
<nyc4bos@HIDDEN>'s test output is deemed to be running more or less
correctly.  Maybe that can point us in the right direction?

> Can you test the python code from python-shell-completion-native-setup
> outside of Emacs, e.g., save it to a file called 'native-completion.py'
> and then run 'python -i native-completion.py' and then type an
> underscore and hit <tab>.

I get the following:

>>> ___package__
__PYTHON_EL_native_completion_setup
__name__
__doc__
__import__
__debug__

Interestingly, none of the dummy completions pop up.

> Can you try load the attached file in Emacs?  Does it show similar
> output in the "*py native complete test*" buffer?
> 
>     emacs -Q -l py-native-completion.el

I get no completions with this -- here is all that shows up:

Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 26 2016, 12:10:39) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> python.el: native completion setup loaded
>>> 

> Also post the contents of buffer " *Python completions redirect*"
> after doing M-x run-python.

- emacs -Q
- M-x run-python
- C-x b " *Python completions redirect*"

It's this: "_	^H^H" (space in the middle is a tab character).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 22 Feb 2017 01:39:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 21 20:39:51 2017
Received: from localhost ([127.0.0.1]:49440 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cgLuI-00066a-SO
	for submit <at> debbugs.gnu.org; Tue, 21 Feb 2017 20:39:51 -0500
Received: from mail-io0-f196.google.com ([209.85.223.196]:34826)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1cgLuH-00066O-AT
 for 25753 <at> debbugs.gnu.org; Tue, 21 Feb 2017 20:39:49 -0500
Received: by mail-io0-f196.google.com with SMTP id m98so5787337iod.2
 for <25753 <at> debbugs.gnu.org>; Tue, 21 Feb 2017 17:39:49 -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=K7EqyEO9LHyqPp70ze4p/E13o1wLVqRpLcggCFMYVfE=;
 b=vMisREHSWH5Ckn+HB1jICjluL9O6vwtG3idt59/tUnkRTlGM9XpRV7l3g03ApA2cH/
 1YwOpjxeMbzQ8k/aFT4HfGJqTRxsTmWk7M0kVtfwqeDUeITAoYwz5x/hQ5ChSoLDTWB3
 iCygu4xtydBGRxD1VHVTREtW965vX2oNxD8IhrFn6q6BLowf7Mr19K98Qp0LPKqJjTpt
 GaUDfxOow0U2UiGqF36g8333Pm9CX0guRV5C5sEaO6hx1maIF9UfZCBPlIoR4ycuL2Pt
 PefZ+EOMeiV87/6ZY3LxW6Ep+vlIlefY2Q07XRIYUglnY6hneg2FFaivqZrXbNljRhxB
 BkKA==
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=K7EqyEO9LHyqPp70ze4p/E13o1wLVqRpLcggCFMYVfE=;
 b=X+820i1dOaB7InLYYBNAyUcvvZryqyQZ1ITlSrMh0wEdTkyVYKNXensTDnA6QMQh8B
 ZOrR5YiJ1V2TImcaO/TuSSDB4vExuAiCEXuiU1OVUOARsf79eHhbjrxpbWid05CzywW+
 m8hX5Y6+rg9H9JXWEsHBAU/6/CgikU8S2jC87HxwJC7stSFAxtN+mi3Ja6xFMLTVYD9f
 cLTjRAiblU54RRKWoMurUPe/0HQwFEyJOIwqMcgOWpihG6sda7MgcV+/9ZohJKYj7jyk
 KzoVxbU/7g01mm7vQpjMYp87ZZd92wQBuq1N2jc8hK2lOwz/B1N6O7TuthUs+gaTibI+
 sXvA==
X-Gm-Message-State: AMke39mT//BqbqB3l/tHsP0D4EqYKwqgN0kwollEyl8sjhKDWovARz8rZ2ouZS/e6rOkOQ==
X-Received: by 10.107.46.85 with SMTP id i82mr21327199ioo.85.1487727583660;
 Tue, 21 Feb 2017 17:39:43 -0800 (PST)
Received: from zony ([45.2.7.65])
 by smtp.googlemail.com with ESMTPSA id w188sm211926itc.6.2017.02.21.17.39.42
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Tue, 21 Feb 2017 17:39:42 -0800 (PST)
From: npostavs@HIDDEN
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
 <87poifjsw2.fsf@HIDDEN>
Date: Tue, 21 Feb 2017 20:40:55 -0500
In-Reply-To: <87poifjsw2.fsf@HIDDEN>
 (npostavs@HIDDEN's message of "Sat, 18 Feb 2017 12:44:29
 -0500")
Message-ID: <87poibgfyw.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.4 (/)
X-Debbugs-Envelope-To: 25753
Cc: 25753 <at> debbugs.gnu.org, "Charles A. Roelli" <charles@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

npostavs@HIDDEN writes:

> Eli Zaretskii <eliz@HIDDEN> writes:
>
>>> From: charles@HIDDEN (Charles A. Roelli)
>>> Date: Thu, 16 Feb 2017 17:07:48 +0100
>>> 
>>> In emacs 25.2 (rc1) and 25.1, interaction with the Python shell does not
>>> seem to be working fully.  Python version is '2.7.12 (v2.7.12:d33e0cf91556,
>>> Jun 26 2016, 12:10:39) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]', and
>>> this is on Snow Leopard.
>>
>> Please try the next RC (should be out in a few days), I think we fixed
>> that there.
>
> AFAIK, the only change since rc1 is to add "ipython" to
> python-shell-completion-native-disabled-interpreters.  And that should
> not affect the problem reported here, which does not seem to involve
> ipython.

As I've said, I don't think rc2 would change this, but since it's come
out now, please test it.  Assuming rc2 still has the problem, please try
the tests I posted in
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25753#29 and
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25753#35.  Also post the
contents of buffer " *Python completions redirect*" after doing M-x
run-python.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 21 Feb 2017 23:18:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 21 18:18:04 2017
Received: from localhost ([127.0.0.1]:49394 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cgJh5-0002te-Up
	for submit <at> debbugs.gnu.org; Tue, 21 Feb 2017 18:18:04 -0500
Received: from omr-a018e.mx.aol.com ([204.29.186.64]:61429)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <nyc4bos@HIDDEN>) id 1cgJh4-0002tA-Pf
 for 25753 <at> debbugs.gnu.org; Tue, 21 Feb 2017 18:18:03 -0500
Received: from mtaout-aab01.mx.aol.com (mtaout-aab01.mx.aol.com
 [172.26.126.205])
 by omr-a018e.mx.aol.com (Outbound Mail Relay) with ESMTP id 476DE3800049;
 Tue, 21 Feb 2017 18:17:57 -0500 (EST)
Received: from localhost (c-50-163-97-64.hsd1.ma.comcast.net [50.163.97.64])
 (using TLSv1 with cipher AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mtaout-aab01.mx.aol.com (MUA/Third Party Client Interface) with ESMTPSA id
 BA55338000082; Tue, 21 Feb 2017 18:17:56 -0500 (EST)
From: Live System User <nyc4bos@HIDDEN>
To: npostavs@HIDDEN
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
In-Reply-To: <87vas3hdjb.fsf@HIDDEN>
 (npostavs@HIDDEN's message of "Tue, 21 Feb 2017
 08:35:52 -0500")
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
 <87poifjsw2.fsf@HIDDEN> <87lgt2rz4j.fsf@HIDDEN>
 <CAM-tV--CV5jfJS3S0J6toHFjfB7suEhx0ASVKOpBc8ONknjfGQ@HIDDEN>
 <87d1eermwb.fsf@HIDDEN>
 <CAM-tV--Y3_COVU7-AbMJpHw1Jvg2+VWAvbcgcGmvf6sw1m6VFA@HIDDEN>
 <878tp1sw7y.fsf@HIDDEN> <87wpclir72.fsf@HIDDEN>
 <871sussd9b.fsf@HIDDEN> <87bmtwiact.fsf@HIDDEN>
 <87tw7oqkw2.fsf@HIDDEN> <87vas3hdjb.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
Date: Tue, 21 Feb 2017 18:17:55 -0500
Message-ID: <87wpcjyvz0.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
x-aol-global-disposition: G
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mx.aol.com;
 s=20150623; t=1487719077;
 bh=OU55Sm80I7vIdir5hqGPrn5OktUDHaA5mysSog8Q7Zo=;
 h=From:To:Subject:Message-ID:Date:MIME-Version:Content-Type;
 b=gwA/soK8eIPqoYz2jMV+mVp9xgidA2les94V+phqWbCwNmvgXTLsjYBE8aEITx4Rp
 Z+s+XWHUb/eDTNOL55KEzsV1bRvhZRFf1JwhbDtSwvv3+WlF8VflHi0O+voqHYfV+A
 zuojg7VZXnCL+BBBjeyNut1z6MSpkQzve9Jh1dcw=
x-aol-sid: 3039ac1a7ecd58accaa46e74
X-AOL-IP: 50.163.97.64
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 25753
Cc: 25753 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 "Charles A. Roelli" <charles@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)

npostavs@HIDDEN writes:

> Live System User <nyc4bos@HIDDEN> writes:
>
>> npostavs@HIDDEN writes:
>>
>> [...]
>>>
>>> Can you try load the attached file in Emacs?  Does it show similar
>>> output in the "*py native complete test*" buffer?
>>>
>>>     emacs -Q -l py-native-completion.el
>>
>>       Attached are my results.
>
> Hmm, that looks like it should be working.  Wait, when you said
>
>     I was already using that (wrapped in a "with-eval-after-load
>     'python") from:
>
>     https://github.com/jorgenschaefer/elpy/issues/887#issuecomment-275175119
>
>     to no avail.
>
> You meant the code from that exact comment?  That's a broken solution,
> try this instead:
>
>     (with-eval-after-load 'python
>       (defun python-shell-completion-native-try ()
>         "Return non-nil if can trigger native completion."
>         (let ((python-shell-completion-native-enable t)
>               (python-shell-completion-native-output-timeout
>                python-shell-completion-native-try-output-timeout))
>           (python-shell-completion-native-get-completions
>            (get-buffer-process (current-buffer))
>            nil "_"))))

    Your version of the solution works for me.

    Thanks for your effort!.


>
> If it's still not working, please post the contents of buffer " *Python
> completions redirect*" (note the leading space).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 21 Feb 2017 13:34:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 21 08:34:50 2017
Received: from localhost ([127.0.0.1]:48388 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cgAag-0000rB-FC
	for submit <at> debbugs.gnu.org; Tue, 21 Feb 2017 08:34:50 -0500
Received: from mail-oi0-f65.google.com ([209.85.218.65]:36202)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1cgAad-0000qx-Oc
 for 25753 <at> debbugs.gnu.org; Tue, 21 Feb 2017 08:34:48 -0500
Received: by mail-oi0-f65.google.com with SMTP id l128so405211oia.3
 for <25753 <at> debbugs.gnu.org>; Tue, 21 Feb 2017 05:34:47 -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=S8NOgfVA65t7ZH5OUFRto2cTU/9I+k9cWnB6BcsAeYk=;
 b=QME1qtyzaB7PQw9mmJrF8WhS62YZU3LY+at7wc//gPx6hQlkjS8VE8642/+6W66md8
 FPbrwgM4fACThYwRpmI50w+j8WPqawmenBtLxNmhgy63v2F2KUI563BB8lDZe4KEeHLx
 Y683YFbsOa1rMUjJ/8onkjGaZNVT7O6eDh5pzEkJzCFDVroqVZGoPWpRHITcK91ras/e
 VZZRZpAtLzipsRtKmcac8/kaVHwdms29wLvKajRECA12xmE2dLg40H3Oepl5yS4Ztdsm
 mMQYtot1kAixgEt2gsqCe9e/yoECiDioy3ECvNGcy2xLXKH1pQJP0LSdX/AAO2B6egF6
 MSCw==
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=S8NOgfVA65t7ZH5OUFRto2cTU/9I+k9cWnB6BcsAeYk=;
 b=jSlUrzRUWA0H4CrI7YaB3am4RiY49nYuH+IOvm7c+gKichJ0FtxsTDyWTA1JWPEO3F
 sTtWHWET5FEvHJfemXMcBRjLRg63SwWPoQPMTdYpPS8UWH9vBQhis3pgldXJK2xPcehB
 FtZ2eownLNSQPtgG/dH2Hb9nAXKYvsQGDNu5sbraX2hgJMaIvKzrhO1PZTYg3KZQP57H
 WYwXfwkQJ2sHR2u1SkapzDdlkJaxYF/LDVg7ftRh1zLErnUGoUo7xQOVmTQkC5BX90Bj
 tq+Y5F+R/M42s0qX9pv+d4owgyA6YdBd5h2/Kn2SZdWK0NVEAAbTT7WsrpHDKJcz4LO4
 PsgQ==
X-Gm-Message-State: AMke39naXLw9OJXA7s6sxULIOnbcHyiMfnJpUq9QpML+wfGGooIKENNI1Js8GnC8sedXPg==
X-Received: by 10.107.199.130 with SMTP id x124mr19346972iof.216.1487684082056; 
 Tue, 21 Feb 2017 05:34:42 -0800 (PST)
Received: from zony ([45.2.7.65])
 by smtp.googlemail.com with ESMTPSA id d5sm7671313itd.3.2017.02.21.05.34.40
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Tue, 21 Feb 2017 05:34:41 -0800 (PST)
From: npostavs@HIDDEN
To: Live System User <nyc4bos@HIDDEN>
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
 <87poifjsw2.fsf@HIDDEN> <87lgt2rz4j.fsf@HIDDEN>
 <CAM-tV--CV5jfJS3S0J6toHFjfB7suEhx0ASVKOpBc8ONknjfGQ@HIDDEN>
 <87d1eermwb.fsf@HIDDEN>
 <CAM-tV--Y3_COVU7-AbMJpHw1Jvg2+VWAvbcgcGmvf6sw1m6VFA@HIDDEN>
 <878tp1sw7y.fsf@HIDDEN> <87wpclir72.fsf@HIDDEN>
 <871sussd9b.fsf@HIDDEN> <87bmtwiact.fsf@HIDDEN>
 <87tw7oqkw2.fsf@HIDDEN>
Date: Tue, 21 Feb 2017 08:35:52 -0500
In-Reply-To: <87tw7oqkw2.fsf@HIDDEN> (Live System User's message of "Mon, 20
 Feb 2017 22:32:13 -0500")
Message-ID: <87vas3hdjb.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: 25753
Cc: 25753 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 "Charles A. Roelli" <charles@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.7 (/)

Live System User <nyc4bos@HIDDEN> writes:

> npostavs@HIDDEN writes:
>
> [...]
>>
>> Can you try load the attached file in Emacs?  Does it show similar
>> output in the "*py native complete test*" buffer?
>>
>>     emacs -Q -l py-native-completion.el
>
>       Attached are my results.

Hmm, that looks like it should be working.  Wait, when you said

    I was already using that (wrapped in a "with-eval-after-load
    'python") from:

    https://github.com/jorgenschaefer/elpy/issues/887#issuecomment-275175119

    to no avail.

You meant the code from that exact comment?  That's a broken solution,
try this instead:

    (with-eval-after-load 'python
      (defun python-shell-completion-native-try ()
        "Return non-nil if can trigger native completion."
        (let ((python-shell-completion-native-enable t)
              (python-shell-completion-native-output-timeout
               python-shell-completion-native-try-output-timeout))
          (python-shell-completion-native-get-completions
           (get-buffer-process (current-buffer))
           nil "_"))))

If it's still not working, please post the contents of buffer " *Python
completions redirect*" (note the leading space).






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 21 Feb 2017 03:32:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 20 22:32:28 2017
Received: from localhost ([127.0.0.1]:48024 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cg1Bk-0006un-1y
	for submit <at> debbugs.gnu.org; Mon, 20 Feb 2017 22:32:28 -0500
Received: from omr-a013e.mx.aol.com ([204.29.186.60]:50161)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <nyc4bos@HIDDEN>) id 1cg1Bi-0006uZ-4i
 for 25753 <at> debbugs.gnu.org; Mon, 20 Feb 2017 22:32:26 -0500
Received: from mtaout-aaf02.mx.aol.com (mtaout-aaf02.mx.aol.com
 [172.26.127.98])
 by omr-a013e.mx.aol.com (Outbound Mail Relay) with ESMTP id 77006380008A;
 Mon, 20 Feb 2017 22:32:20 -0500 (EST)
Received: from localhost.localdomain (c-50-163-97-64.hsd1.ma.comcast.net
 [50.163.97.64]) (using TLSv1 with cipher AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mtaout-aaf02.mx.aol.com (MUA/Third Party Client Interface) with ESMTPSA id
 590B238000082; Mon, 20 Feb 2017 22:32:16 -0500 (EST)
From: Live System User <nyc4bos@HIDDEN>
To: npostavs@HIDDEN
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
In-Reply-To: <87bmtwiact.fsf@HIDDEN>
 (npostavs@HIDDEN's message of "Mon, 20 Feb 2017
 20:46:58 -0500")
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
 <87poifjsw2.fsf@HIDDEN> <87lgt2rz4j.fsf@HIDDEN>
 <CAM-tV--CV5jfJS3S0J6toHFjfB7suEhx0ASVKOpBc8ONknjfGQ@HIDDEN>
 <87d1eermwb.fsf@HIDDEN>
 <CAM-tV--Y3_COVU7-AbMJpHw1Jvg2+VWAvbcgcGmvf6sw1m6VFA@HIDDEN>
 <878tp1sw7y.fsf@HIDDEN> <87wpclir72.fsf@HIDDEN>
 <871sussd9b.fsf@HIDDEN> <87bmtwiact.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
Date: Mon, 20 Feb 2017 22:32:13 -0500
Message-ID: <87tw7oqkw2.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
x-aol-global-disposition: G
X-AOL-VSS-INFO: 5800.7501/114562
X-AOL-VSS-CODE: clean
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mx.aol.com;
 s=20150623; t=1487647940;
 bh=olnxgtFeap7MwAk1qzKKjLbbyrWy5NYDFpLaauMx8LI=;
 h=From:To:Subject:Message-ID:Date:MIME-Version:Content-Type;
 b=Pz2lWBrzB04Ie5CNRQnSZXN1A8K354B0lxJw0dTzedTbArBcnjQ8UgfZsQL7U+oud
 sMA7ArALEX3agGZqcSBBFyks/pon4MaFD2F6dmj1zJ5VMDa9NyZGOMor8ccxArFxd0
 yH1vbMDHMdIyQwhicLW5IkEa5igZQKVD7TMEOGo8=
x-aol-sid: 3039ac1a7f6258abb4c05456
X-AOL-IP: 50.163.97.64
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 25753
Cc: 25753 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 "Charles A. Roelli" <charles@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

--=-=-=
Content-Type: text/plain

npostavs@HIDDEN writes:

[...]
>
> Can you try load the attached file in Emacs?  Does it show similar
> output in the "*py native complete test*" buffer?
>
>     emacs -Q -l py-native-completion.el

      Attached are my results.


--=-=-=
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=py-native-completion.test
Content-Transfer-Encoding: base64
Content-Description: py-native-completion results

UHl0aG9uIDIuNy4xMyAoZGVmYXVsdCwgSmFuIDEzIDIwMTcsIDEwOjE1OjE2KSAKW0dDQyA2LjMu
MSAyMDE2MTIyMSAoUmVkIEhhdCA2LjMuMS0xKV0gb24gbGludXgyClR5cGUgImhlbHAiLCAiY29w
eXJpZ2h0IiwgImNyZWRpdHMiIG9yICJsaWNlbnNlIiBmb3IgbW9yZSBpbmZvcm1hdGlvbi4KPj4+
IHB5dGhvbi5lbDogbmF0aXZlIGNvbXBsZXRpb24gc2V0dXAgbG9hZGVkCj4+PiBfZWxlbWVudHRy
ZWUKX3JhbmRvbW1vZHVsZQpfbXVsdGlieXRlY29kZWNtb2R1bGUKX2NvZGVjc190dwpfY3R5cGVz
Cl9ob3RzaG90Cl9zcmUKX2hlYXBxCl9hc3QKX2Jpc2VjdG1vZHVsZQpfc29ja2V0bW9kdWxlCl9f
Y29kZQpfd2Vha3JlZnNldApfY29sbGVjdGlvbnNtb2R1bGUKX2NvZGVjc19pc28yMDIyCl9sb2Nh
bGVtb2R1bGUKX3RraW50ZXIKX19weWZpbGUKX0xXUENvb2tpZUphcgpfb3N4X3N1cHBvcnQKX2Nz
dgpfY3Vyc2VzCl9jb2RlY3NfaGsKX2hhc2hsaWIKX2NvZGVjcwpfc3NsCl9zcWxpdGUzCl9jdXJz
ZXNfcGFuZWwKX2lvCl9zdHJwdGltZQpfanNvbgpfbHNwcm9mCl9jcnlwdG1vZHVsZQpfTW96aWxs
YUNvb2tpZUphcgpfX2RvY19fCl9jb2RlY3Nfa3IKX19wYWNrYWdlX18KX2Z1bmN0b29sc21vZHVs
ZQpfc3ltdGFibGUKX3dlYWtyZWYKX2RidXNfZ2xpYl9iaW5kaW5ncwpfbXVsdGlwcm9jZXNzaW5n
Cl9fbmFtZV9fCl9fUFlUSE9OX0VMX25hdGl2ZV9jb21wbGV0aW9uX3NldHVwCl90aHJlYWRpbmdf
bG9jYWwKX2NvZGVjc19qcApfd2FybmluZ3MKX2JzZGRiCl9jb2RlY3NfY24KX3B5aW8KX2RidXNf
YmluZGluZ3MKX3N5c2NvbmZpZ2RhdGEKX3N0cnVjdApfYWJjb2xsCl9faW1wb3J0X18KX19kZWJ1
Z19fCgowX19kdW1teV9jb21wbGV0aW9uX18gIDFfX2R1bW15X2NvbXBsZXRpb25fXyAgCg==
--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 21 Feb 2017 01:45:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 20 20:45:55 2017
Received: from localhost ([127.0.0.1]:47933 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cfzWd-0007aW-Dv
	for submit <at> debbugs.gnu.org; Mon, 20 Feb 2017 20:45:55 -0500
Received: from mail-it0-f49.google.com ([209.85.214.49]:38423)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1cfzWb-0007aH-IO
 for 25753 <at> debbugs.gnu.org; Mon, 20 Feb 2017 20:45:53 -0500
Received: by mail-it0-f49.google.com with SMTP id y135so35388711itc.1
 for <25753 <at> debbugs.gnu.org>; Mon, 20 Feb 2017 17:45:53 -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=dcXIT4X0XrAkJfvbpanHqn+r4ds1Gm/Wz8oNjtgEUGs=;
 b=TkeT/IldIGNYKe9dCEbkspHaC9t/14YO1M20173D7SeAICOtvNBi4Wb2aCC1Yo77mp
 yb7GVu5xtBtSCnJFlom7ECyd+WX54l3jUkGswMf4iinohR3Bk8+i5NVNuu8u/vXu+Xc6
 L4J4vbeGSRsXSBljYvvf/Ftxz7QQJBT5iuu7cAUTF9RUjpix07TiYE9Uwg09gFsqebV/
 xUL3yaFygOl0rTCSPBfpwtS1LXaeD1VTPUBwmxyrWtv3sIWBb3oULwwsfoauiXeNmwTr
 M/TJKCdN4aP2/vAep1y8vvvn6RRAjxn7mDCuhHQVTNF4OG11rdbeBQL+dtL5vyeqOUcW
 GwaA==
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=dcXIT4X0XrAkJfvbpanHqn+r4ds1Gm/Wz8oNjtgEUGs=;
 b=UDA1lJvIBphomPArb2auGvpW3GeMqAxc64+3yuQ+7PhL/qJ7zGbXjRHoRUYwYQawpt
 gXvmbsOr/GUDoyc7j3o+funWHBY6WqWWkDIfS2pkj9BZt05gQ0qebEcq0GN/XNusSl5q
 MT6m2MXyW+GLRkyJzjpTiKX3JRZ3Q733gQjhMWWmnz4390MaLAcK1cLSm9NooSEAej0I
 mnWBUwx8oCvcmRkiVB9IrZCJ5n00Kf2mk9f0eY5hspWgdO7DixJIR5/tOWO9AnkxGQf3
 OEs1Z/IH+DxwKaICnbW9H5eJLKeVRn/oYWiTWOoQ9EaRbBft7gTVWv6rk9klSYTAQKOR
 XJqg==
X-Gm-Message-State: AMke39l5fIQ5903PRn7PfokvRXafh9GAUCreZDw1VokJIIarwGEAm9cE3b0g5q+nOxFJIQ==
X-Received: by 10.36.207.136 with SMTP id y130mr11891882itf.56.1487641548018; 
 Mon, 20 Feb 2017 17:45:48 -0800 (PST)
Received: from zony ([45.2.7.65])
 by smtp.googlemail.com with ESMTPSA id j14sm6405551itd.0.2017.02.20.17.45.46
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Mon, 20 Feb 2017 17:45:47 -0800 (PST)
From: npostavs@HIDDEN
To: Live System User <nyc4bos@HIDDEN>
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
 <87poifjsw2.fsf@HIDDEN> <87lgt2rz4j.fsf@HIDDEN>
 <CAM-tV--CV5jfJS3S0J6toHFjfB7suEhx0ASVKOpBc8ONknjfGQ@HIDDEN>
 <87d1eermwb.fsf@HIDDEN>
 <CAM-tV--Y3_COVU7-AbMJpHw1Jvg2+VWAvbcgcGmvf6sw1m6VFA@HIDDEN>
 <878tp1sw7y.fsf@HIDDEN> <87wpclir72.fsf@HIDDEN>
 <871sussd9b.fsf@HIDDEN>
Date: Mon, 20 Feb 2017 20:46:58 -0500
In-Reply-To: <871sussd9b.fsf@HIDDEN> (Live System User's message of "Mon, 20
 Feb 2017 17:34:08 -0500")
Message-ID: <87bmtwiact.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.1 (/)
X-Debbugs-Envelope-To: 25753
Cc: 25753 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 "Charles A. Roelli" <charles@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable


Live System User <nyc4bos@HIDDEN> writes:

> npostavs@HIDDEN writes:
>
>> Can you test the python code from python-shell-completion-native-setup
>> outside of Emacs, e.g., save it to a file called 'native-completion.py'
>> and then run 'python -i native-completion.py' and then type an
>> underscore and hit <tab>.
>>
>
>       I get the same:
>
> $ =E2=96=B8 python2 -i native-completion.py
> python.el: native completion setup loaded
>>>> ___package__
> __PYTHON_EL_native_completion_setup
> __name__
> __doc__
> __import__
> __debug__
>
> 0__dummy_completion__  1__dummy_completion__=20=20
>>>> _

Can you try load the attached file in Emacs?  Does it show similar
output in the "*py native complete test*" buffer?

    emacs -Q -l py-native-completion.el


--=-=-=
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=py-native-completion.el
Content-Transfer-Encoding: base64
Content-Description: test elisp file

KHJlcXVpcmUgJ3B5dGhvbikKCih3aXRoLWN1cnJlbnQtYnVmZmVyIChnZXQtYnVmZmVyLWNyZWF0
ZSAiKnB5IG5hdGl2ZSBjb21wbGV0ZSB0ZXN0KiIpCiAgKGxldCAoKHByb2MgKHN0YXJ0LXByb2Nl
c3MgInB5dGhvbiIgKGN1cnJlbnQtYnVmZmVyKSAicHl0aG9uMiIgIi1pIikpKQogICAgKHB5dGhv
bi1zaGVsbC1zZW5kLXN0cmluZyAiCmRlZiBfX1BZVEhPTl9FTF9uYXRpdmVfY29tcGxldGlvbl9z
ZXR1cCgpOgogICAgdHJ5OgogICAgICAgIGltcG9ydCByZWFkbGluZQoKICAgICAgICB0cnk6CiAg
ICAgICAgICAgIGltcG9ydCBfX2J1aWx0aW5fXwogICAgICAgIGV4Y2VwdCBJbXBvcnRFcnJvcjoK
ICAgICAgICAgICAgIyBQeXRob24gMwogICAgICAgICAgICBpbXBvcnQgYnVpbHRpbnMgYXMgX19i
dWlsdGluX18KCiAgICAgICAgYnVpbHRpbnMgPSBkaXIoX19idWlsdGluX18pCiAgICAgICAgaXNf
aXB5dGhvbiA9ICgnX19JUFlUSE9OX18nIGluIGJ1aWx0aW5zIG9yCiAgICAgICAgICAgICAgICAg
ICAgICAnX19JUFlUSE9OX19hY3RpdmUnIGluIGJ1aWx0aW5zKQoKICAgICAgICBjbGFzcyBfX1BZ
VEhPTl9FTF9Db21wbGV0ZXI6CiAgICAgICAgICAgICcnJ0NvbXBsZXRlciB3cmFwcGVyIHRoYXQg
cHJpbnRzIGNhbmRpZGF0ZXMgdG8gc3Rkb3V0LgoKICAgICAgICAgICAgSXQgd3JhcHMgYW4gZXhp
c3RpbmcgY29tcGxldGVyIGZ1bmN0aW9uIGFuZCBjaGFuZ2VzIGl0cyBiZWhhdmlvciBzbwogICAg
ICAgICAgICB0aGF0IHRoZSB1c2VyIGlucHV0IGlzIHVuY2hhbmdlZCBhbmQgcmVhbCBjYW5kaWRh
dGVzIGFyZSBwcmludGVkIHRvCiAgICAgICAgICAgIHN0ZG91dC4KCiAgICAgICAgICAgIFJldHVy
bmVkIGNhbmRpZGF0ZXMgYXJlICcwX19kdW1teV9jb21wbGV0aW9uX18nIGFuZAogICAgICAgICAg
ICAnMV9fZHVtbXlfY29tcGxldGlvbl9fJyBpbiB0aGF0IG9yZGVyICgnMF9fZHVtbXlfY29tcGxl
dGlvbl9fJyBpcwogICAgICAgICAgICByZXR1cm5lZCByZXBlYXRlZGx5IHVudGlsIGFsbCBwb3Nz
aWJsZSBjYW5kaWRhdGVzIGFyZSBjb25zdW1lZCkuCgogICAgICAgICAgICBUaGUgcmVhbCBjYW5k
aWRhdGVzIGFyZSBwcmludGVkIHRvIHN0ZG91dCBzbyB0aGF0IHRoZXkgY2FuIGJlCiAgICAgICAg
ICAgIGVhc2lseSByZXRyaWV2ZWQgdGhyb3VnaCBjb21pbnQgb3V0cHV0IHJlZGlyZWN0IHRyaWNr
ZXJ5LgogICAgICAgICAgICAnJycKCiAgICAgICAgICAgIFBZVEhPTl9FTF9XUkFQUEVEID0gVHJ1
ZQoKICAgICAgICAgICAgZGVmIF9faW5pdF9fKHNlbGYsIGNvbXBsZXRlcik6CiAgICAgICAgICAg
ICAgICBzZWxmLmNvbXBsZXRlciA9IGNvbXBsZXRlcgogICAgICAgICAgICAgICAgc2VsZi5sYXN0
X2NvbXBsZXRpb24gPSBOb25lCiAgICAgICAgICAgICAgICBzZWxmLnByaW50X21vZGUgPSBUcnVl
CgogICAgICAgICAgICBkZWYgX19jYWxsX18oc2VsZiwgdGV4dCwgc3RhdGUpOgogICAgICAgICAg
ICAgICAgaWYgc3RhdGUgPT0gMDoKICAgICAgICAgICAgICAgICAgICAjIFNldCB0aGUgZmlyc3Qg
ZHVtbXkgY29tcGxldGlvbi4KICAgICAgICAgICAgICAgICAgICBzZWxmLmxhc3RfY29tcGxldGlv
biA9IE5vbmUKICAgICAgICAgICAgICAgICAgICBjb21wbGV0aW9uID0gJzBfX2R1bW15X2NvbXBs
ZXRpb25fXycKICAgICAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICAgICAgY29tcGxl
dGlvbiA9IHNlbGYuY29tcGxldGVyKHRleHQsIHN0YXRlIC0gMSkKCiAgICAgICAgICAgICAgICBp
ZiBub3QgY29tcGxldGlvbjoKICAgICAgICAgICAgICAgICAgICBpZiBzZWxmLmxhc3RfY29tcGxl
dGlvbiAhPSAnMV9fZHVtbXlfY29tcGxldGlvbl9fJzoKICAgICAgICAgICAgICAgICAgICAgICAg
IyBXaGVuIG5vIG1vcmUgY29tcGxldGlvbnMgYXJlIGF2YWlsYWJsZSwgcmV0dXJuaW5nIGEKICAg
ICAgICAgICAgICAgICAgICAgICAgIyBkdW1teSB3aXRoIG5vbi1zaGFyaW5nIHByZWZpeCBhbGxv
dyBlbnN1cmluZyBvdXRwdXQKICAgICAgICAgICAgICAgICAgICAgICAgIyB3aGlsZSBwcmV2ZW50
aW5nIGNoYW5nZXMgdG8gY3VycmVudCBpbnB1dC4KICAgICAgICAgICAgICAgICAgICAgICAgIyBD
b2luY2lkZW50YWxseSBpdCdzIGFsc28gdGhlIGVuZCBvZiBvdXRwdXQuCiAgICAgICAgICAgICAg
ICAgICAgICAgIGNvbXBsZXRpb24gPSAnMV9fZHVtbXlfY29tcGxldGlvbl9fJwogICAgICAgICAg
ICAgICAgZWxpZiBjb21wbGV0aW9uLmVuZHN3aXRoKCcoJyk6CiAgICAgICAgICAgICAgICAgICAg
IyBSZW1vdmUgcGFyZW5zIG9uIGNhbGxhYmxlcyBhcyBpdCBicmVha3MgY29tcGxldGlvbiBvbgog
ICAgICAgICAgICAgICAgICAgICMgYXJndW1lbnRzIChlLmcuIHN0cihBcmk8dGFiPikpLgogICAg
ICAgICAgICAgICAgICAgIGNvbXBsZXRpb24gPSBjb21wbGV0aW9uWzotMV0KICAgICAgICAgICAg
ICAgIHNlbGYubGFzdF9jb21wbGV0aW9uID0gY29tcGxldGlvbgoKICAgICAgICAgICAgICAgIGlm
IGNvbXBsZXRpb24gaW4gKAogICAgICAgICAgICAgICAgICAgICAgICAnMF9fZHVtbXlfY29tcGxl
dGlvbl9fJywgJzFfX2R1bW15X2NvbXBsZXRpb25fXycpOgogICAgICAgICAgICAgICAgICAgIHJl
dHVybiBjb21wbGV0aW9uCiAgICAgICAgICAgICAgICBlbGlmIGNvbXBsZXRpb246CiAgICAgICAg
ICAgICAgICAgICAgIyBGb3IgZXZlcnkgbm9uLWR1bW15IGNvbXBsZXRpb24sIHJldHVybiBhIHJl
cGVhdGVkIGR1bW15CiAgICAgICAgICAgICAgICAgICAgIyBvbmUgYW5kIHByaW50IHRoZSByZWFs
IGNhbmRpZGF0ZSBzbyBpdCBjYW4gYmUgcmV0cmlldmVkCiAgICAgICAgICAgICAgICAgICAgIyBi
eSBjb21pbnQgb3V0cHV0IGZpbHRlcnMuCiAgICAgICAgICAgICAgICAgICAgaWYgc2VsZi5wcmlu
dF9tb2RlOgogICAgICAgICAgICAgICAgICAgICAgICBwcmludCAoY29tcGxldGlvbikKICAgICAg
ICAgICAgICAgICAgICAgICAgcmV0dXJuICcwX19kdW1teV9jb21wbGV0aW9uX18nCiAgICAgICAg
ICAgICAgICAgICAgZWxzZToKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbXBsZXRp
b24KICAgICAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbXBs
ZXRpb24KCiAgICAgICAgY29tcGxldGVyID0gcmVhZGxpbmUuZ2V0X2NvbXBsZXRlcigpCgogICAg
ICAgIGlmIG5vdCBjb21wbGV0ZXI6CiAgICAgICAgICAgICMgVXNlZCBhcyBsYXN0IHJlc29ydCB0
byBhdm9pZCBicmVha2luZyBjdXN0b21pemF0aW9ucy4KICAgICAgICAgICAgaW1wb3J0IHJsY29t
cGxldGVyCiAgICAgICAgICAgIGNvbXBsZXRlciA9IHJlYWRsaW5lLmdldF9jb21wbGV0ZXIoKQoK
ICAgICAgICBpZiBjb21wbGV0ZXIgYW5kIG5vdCBnZXRhdHRyKGNvbXBsZXRlciwgJ1BZVEhPTl9F
TF9XUkFQUEVEJywgRmFsc2UpOgogICAgICAgICAgICAjIFdyYXAgdGhlIGV4aXN0aW5nIGNvbXBs
ZXRlciBmdW5jdGlvbiBvbmx5IG9uY2UuCiAgICAgICAgICAgIG5ld19jb21wbGV0ZXIgPSBfX1BZ
VEhPTl9FTF9Db21wbGV0ZXIoY29tcGxldGVyKQogICAgICAgICAgICBpZiBub3QgaXNfaXB5dGhv
bjoKICAgICAgICAgICAgICAgIHJlYWRsaW5lLnNldF9jb21wbGV0ZXIobmV3X2NvbXBsZXRlcikK
ICAgICAgICAgICAgZWxzZToKICAgICAgICAgICAgICAgICMgVHJ5IGJvdGggaW5pdGlhbGl6YXRp
b25zIHRvIGNvcGUgd2l0aCBhbGwgSVB5dGhvbiB2ZXJzaW9ucy4KICAgICAgICAgICAgICAgICMg
VGhpcyB3b3JrcyBmaW5lIGZvciBJUHl0aG9uIDMueCBidXQgbm90IGZvciBlYXJsaWVyOgogICAg
ICAgICAgICAgICAgcmVhZGxpbmUuc2V0X2NvbXBsZXRlcihuZXdfY29tcGxldGVyKQogICAgICAg
ICAgICAgICAgIyBJUHl0aG9uPDMgaGFja3MgcmVhZGxpbmUgc3VjaCB0aGF0IGByZWFkbGluZS5z
ZXRfY29tcGxldGVyYAogICAgICAgICAgICAgICAgIyB3b24ndCB3b3JrLiAgVGhpcyB3b3JrYXJv
dW5kIGluamVjdHMgdGhlIG5ldyBjb21wbGV0ZXIKICAgICAgICAgICAgICAgICMgZnVuY3Rpb24g
aW50byB0aGUgZXhpc3RpbmcgaW5zdGFuY2UgZGlyZWN0bHk6CiAgICAgICAgICAgICAgICBpbnN0
YW5jZSA9IGdldGF0dHIoY29tcGxldGVyLCAnaW1fc2VsZicsIGNvbXBsZXRlci5fX3NlbGZfXykK
ICAgICAgICAgICAgICAgIGluc3RhbmNlLnJsY29tcGxldGUgPSBuZXdfY29tcGxldGVyCgogICAg
ICAgIGlmIHJlYWRsaW5lLl9fZG9jX18gYW5kICdsaWJlZGl0JyBpbiByZWFkbGluZS5fX2RvY19f
OgogICAgICAgICAgICByZWFkbGluZS5wYXJzZV9hbmRfYmluZCgnYmluZCBeSSBybF9jb21wbGV0
ZScpCiAgICAgICAgZWxzZToKICAgICAgICAgICAgcmVhZGxpbmUucGFyc2VfYW5kX2JpbmQoJ3Rh
YjogY29tcGxldGUnKQogICAgICAgICAgICAjIFJlcXVpcmUganVzdCBvbmUgdGFiIHRvIHNlbmQg
b3V0cHV0LgogICAgICAgICAgICByZWFkbGluZS5wYXJzZV9hbmRfYmluZCgnc2V0IHNob3ctYWxs
LWlmLWFtYmlndW91cyBvbicpCgogICAgICAgIHByaW50ICgncHl0aG9uLmVsOiBuYXRpdmUgY29t
cGxldGlvbiBzZXR1cCBsb2FkZWQnKQogICAgZXhjZXB0OgogICAgICAgIHByaW50ICgncHl0aG9u
LmVsOiBuYXRpdmUgY29tcGxldGlvbiBzZXR1cCBmYWlsZWQnKQoKX19QWVRIT05fRUxfbmF0aXZl
X2NvbXBsZXRpb25fc2V0dXAoKSIgcHJvYykKICAgIChwcm9jZXNzLXNlbmQtc3RyaW5nIHByb2Mg
Il9cdCIpKQogIChkaXNwbGF5LWJ1ZmZlciAoY3VycmVudC1idWZmZXIpKSkK
--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 20 Feb 2017 22:34:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 20 17:34:20 2017
Received: from localhost ([127.0.0.1]:47885 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cfwXE-00039k-Gu
	for submit <at> debbugs.gnu.org; Mon, 20 Feb 2017 17:34:20 -0500
Received: from omr-m008e.mx.aol.com ([204.29.186.7]:36900)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <nyc4bos@HIDDEN>) id 1cfwXC-00039Y-TB
 for 25753 <at> debbugs.gnu.org; Mon, 20 Feb 2017 17:34:19 -0500
Received: from mtaout-mab01.mx.aol.com (mtaout-mab01.mx.aol.com
 [172.26.249.81])
 by omr-m008e.mx.aol.com (Outbound Mail Relay) with ESMTP id 02A8338000E2;
 Mon, 20 Feb 2017 17:34:12 -0500 (EST)
Received: from localhost.localdomain (c-50-163-97-64.hsd1.ma.comcast.net
 [50.163.97.64]) (using TLSv1 with cipher AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mtaout-mab01.mx.aol.com (MUA/Third Party Client Interface) with ESMTPSA id
 611943800008D; Mon, 20 Feb 2017 17:34:12 -0500 (EST)
From: Live System User <nyc4bos@HIDDEN>
To: npostavs@HIDDEN
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
In-Reply-To: <87wpclir72.fsf@HIDDEN>
 (npostavs@HIDDEN's message of "Sun, 19 Feb 2017
 20:30:57 -0500")
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
 <87poifjsw2.fsf@HIDDEN> <87lgt2rz4j.fsf@HIDDEN>
 <CAM-tV--CV5jfJS3S0J6toHFjfB7suEhx0ASVKOpBc8ONknjfGQ@HIDDEN>
 <87d1eermwb.fsf@HIDDEN>
 <CAM-tV--Y3_COVU7-AbMJpHw1Jvg2+VWAvbcgcGmvf6sw1m6VFA@HIDDEN>
 <878tp1sw7y.fsf@HIDDEN> <87wpclir72.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
Date: Mon, 20 Feb 2017 17:34:08 -0500
Message-ID: <871sussd9b.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
x-aol-global-disposition: G
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mx.aol.com;
 s=20150623; t=1487630052;
 bh=K9kHJN7/20cm5KUiGq/b54wZvI/jvGI6718DCZRj1WI=;
 h=From:To:Subject:Message-ID:Date:MIME-Version:Content-Type;
 b=mqQH6sPkKVM4F7VYhtGLFnQVI3ZxwjqbS1Nw2LFtDy5yVEqgH4USJJWVei/3EUzUg
 Gfl/ZmTvL0mPeZz90GHTwGmAAseMhBwvNku7wqqhpuQsHtLdDhblpx1LAyoBe2EaTp
 4QVHZj3Ux+5Ci6IcYCZEb8Kfk5PbAsvKmqpUAgYA=
x-aol-sid: 3039ac1af95158ab6ee46c0b
X-AOL-IP: 50.163.97.64
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 25753
Cc: 25753 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 "Charles A. Roelli" <charles@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)

npostavs@HIDDEN writes:

> Live System User <nyc4bos@HIDDEN> writes:
>>     I was already using that (wrapped in a "with-eval-after-load
>>     'python") from:
>>
>>     https://github.com/jorgenschaefer/elpy/issues/887#issuecomment-27517=
5119
>>
>>     to no avail.
>
> Can you test the python code from python-shell-completion-native-setup
> outside of Emacs, e.g., save it to a file called 'native-completion.py'
> and then run 'python -i native-completion.py' and then type an
> underscore and hit <tab>.
>
> With 2.7.13, I get
>
>     $ python2 -i native-completion.py=20
>     python.el: native completion setup loaded
>     >>> ___package__
>     __PYTHON_EL_native_completion_setup
>     __name__
>     __doc__
>     __import__
>     __debug__
>
>     0__dummy_completion__  1__dummy_completion__=20=20
>     >>> _

      I get the same:

$ =E2=96=B8 python2 -i native-completion.py
python.el: native completion setup loaded
>>> ___package__
__PYTHON_EL_native_completion_setup
__name__
__doc__
__import__
__debug__

0__dummy_completion__  1__dummy_completion__=20=20
>>> _

    In Emacs I still get the (visable) *Warning* buffer with contents:

Warning (python): Your =E2=80=98python-shell-interpreter=E2=80=99 doesn=E2=
=80=99t seem to support readline, yet =E2=80=98python-shell-completion-nati=
ve=E2=80=99 was t and "python" is not part of the =E2=80=98python-shell-com=
pletion-native-disabled-interpreters=E2=80=99 list.  Native completions hav=
e been disabled locally.=20


>
> With python 3.6.0 I get:
>
>     $ python -i native-completion.py=20
>     python.el: native completion setup loaded
>     >>> ___name__
>     __doc__
>     __package__
>     __loader__
>     __spec__
>     __annotations__
>     __cached__
>     __PYTHON_EL_native_completion_setup
>     __build_class__
>     __import__
>     __debug__
>
>     0__dummy_completion__  1__dummy_completion__=20=20
>     >>> _

      With Python 3.5.2 I get something a little different:

liveuser@localhost:~$ =E2=96=B8  python3 -i native-completion.py
python.el: native completion setup loaded
>>> ___loader__
__spec__
__cached__
__name__
__package__
__PYTHON_EL_native_completion_setup
__doc__
__build_class__
__import__
__debug__

0__dummy_completion__  1__dummy_completion__=20=20
>>> _

    Thanks.
=20=20=20=20




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 20 Feb 2017 01:29:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 19 20:29:56 2017
Received: from localhost ([127.0.0.1]:46661 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cfcnb-0007jl-MW
	for submit <at> debbugs.gnu.org; Sun, 19 Feb 2017 20:29:55 -0500
Received: from mail-io0-f196.google.com ([209.85.223.196]:33629)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1cfcnZ-0007jY-9q
 for 25753 <at> debbugs.gnu.org; Sun, 19 Feb 2017 20:29:53 -0500
Received: by mail-io0-f196.google.com with SMTP id d198so3479362ioe.0
 for <25753 <at> debbugs.gnu.org>; Sun, 19 Feb 2017 17:29:53 -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=Of41X0zdqB0sQgclUJ67e9bSHHSsAIcOkYiVKN6TXeg=;
 b=gWdCTt5vP+CTyge4QZ/BvoQq84kGX/Qg1hw6oh+NcmHJHdsscmorG/8DNJDi2+Pcom
 Oxico9U4AGOYGMcNgbUy6eUA7fiFt6dTcYcVFlXNLDooKsOfyiLe+t89TQNegyiHJGEY
 ujUfPELR70rzR85UxPKJ0G0wBM5jSkjwkyP2J9TqJwsq8un6k98hs94MecmT7oJjpHJv
 w/k5eimYaohNAdUWWf1HYtTsyi7EEGme1jfod6mkxlk7M9f/078OAe5kxHxokI5fjy7J
 T7aBSj4LFRHnn/Rjy+xBgYh5bcEYrTHKtHQiIlFvQj1a8zNpOZFyl610GvfpTsvygha0
 HFPw==
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=Of41X0zdqB0sQgclUJ67e9bSHHSsAIcOkYiVKN6TXeg=;
 b=ItKiQu85/Zl0UtBZDdLIbRqccR8SYNX0Z7VVFrDhfxv7nZ8hGWfvwBv0P/Djxym9VK
 EG+e1F/As2ng/KfaA6jsO9v1/7Rb25yOvu+JLZZtkC0cpw3LqWbQW8qIb+Zd9ApiBjrz
 xvOVijO6UvSY1QqIYe8PGlbzVBMzeduyyu7fi9ozvIW2Sz/v2oBtKLk32dURp2Fmfr9n
 0+7aOHJDvl3zKuvoQ/c3eNrD0SEeeo6/PNTV6MMMoZ3aYHuaKA50tgUOozFha1Lr0h26
 PliUAmnanWz3BLzp0yFBIQAFUcUG39xZgf57t4HvmKNt0GVKuKPTG8jCcwHghrERYY7j
 4Otw==
X-Gm-Message-State: AMke39luvDspq0a+FhP2ezBcJBR/ysoayuOZtD5zBquHnt8/j9kJR609RLqzuI411uES9g==
X-Received: by 10.107.164.232 with SMTP id d101mr15793885ioj.182.1487554187687; 
 Sun, 19 Feb 2017 17:29:47 -0800 (PST)
Received: from zony ([45.2.7.65])
 by smtp.googlemail.com with ESMTPSA id d128sm4332179ite.23.2017.02.19.17.29.46
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sun, 19 Feb 2017 17:29:47 -0800 (PST)
From: npostavs@HIDDEN
To: Live System User <nyc4bos@HIDDEN>
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
 <87poifjsw2.fsf@HIDDEN> <87lgt2rz4j.fsf@HIDDEN>
 <CAM-tV--CV5jfJS3S0J6toHFjfB7suEhx0ASVKOpBc8ONknjfGQ@HIDDEN>
 <87d1eermwb.fsf@HIDDEN>
 <CAM-tV--Y3_COVU7-AbMJpHw1Jvg2+VWAvbcgcGmvf6sw1m6VFA@HIDDEN>
 <878tp1sw7y.fsf@HIDDEN>
Date: Sun, 19 Feb 2017 20:30:57 -0500
In-Reply-To: <878tp1sw7y.fsf@HIDDEN> (Live System User's message of "Sun, 19
 Feb 2017 16:32:17 -0500")
Message-ID: <87wpclir72.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.6 (--)
X-Debbugs-Envelope-To: 25753
Cc: 25753 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 "Charles A. Roelli" <charles@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

Live System User <nyc4bos@HIDDEN> writes:
>     I was already using that (wrapped in a "with-eval-after-load
>     'python") from:
>
>     https://github.com/jorgenschaefer/elpy/issues/887#issuecomment-275175119
>
>     to no avail.

Can you test the python code from python-shell-completion-native-setup
outside of Emacs, e.g., save it to a file called 'native-completion.py'
and then run 'python -i native-completion.py' and then type an
underscore and hit <tab>.

With 2.7.13, I get

    $ python2 -i native-completion.py 
    python.el: native completion setup loaded
    >>> ___package__
    __PYTHON_EL_native_completion_setup
    __name__
    __doc__
    __import__
    __debug__

    0__dummy_completion__  1__dummy_completion__  
    >>> _

With python 3.6.0 I get:

    $ python -i native-completion.py 
    python.el: native completion setup loaded
    >>> ___name__
    __doc__
    __package__
    __loader__
    __spec__
    __annotations__
    __cached__
    __PYTHON_EL_native_completion_setup
    __build_class__
    __import__
    __debug__

    0__dummy_completion__  1__dummy_completion__  
    >>> _




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 19 Feb 2017 21:32:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 19 16:32:26 2017
Received: from localhost ([127.0.0.1]:46550 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cfZ5m-0002N6-1F
	for submit <at> debbugs.gnu.org; Sun, 19 Feb 2017 16:32:26 -0500
Received: from omr-m008e.mx.aol.com ([204.29.186.7]:56861)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <nyc4bos@HIDDEN>) id 1cfZ5k-0002Mu-Fm
 for 25753 <at> debbugs.gnu.org; Sun, 19 Feb 2017 16:32:24 -0500
Received: from mtaout-mba01.mx.aol.com (mtaout-mba01.mx.aol.com
 [172.26.133.109])
 by omr-m008e.mx.aol.com (Outbound Mail Relay) with ESMTP id 0781A380004C;
 Sun, 19 Feb 2017 16:32:19 -0500 (EST)
Received: from localhost.localdomain (c-50-163-97-64.hsd1.ma.comcast.net
 [50.163.97.64]) (using TLSv1 with cipher AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mtaout-mba01.mx.aol.com (MUA/Third Party Client Interface) with ESMTPSA id
 915CF3800008E; Sun, 19 Feb 2017 16:32:18 -0500 (EST)
From: Live System User <nyc4bos@HIDDEN>
To: Noam Postavsky <npostavs@HIDDEN>
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
 <87poifjsw2.fsf@HIDDEN> <87lgt2rz4j.fsf@HIDDEN>
 <CAM-tV--CV5jfJS3S0J6toHFjfB7suEhx0ASVKOpBc8ONknjfGQ@HIDDEN>
 <87d1eermwb.fsf@HIDDEN>
 <CAM-tV--Y3_COVU7-AbMJpHw1Jvg2+VWAvbcgcGmvf6sw1m6VFA@HIDDEN>
Date: Sun, 19 Feb 2017 16:32:17 -0500
In-Reply-To: <CAM-tV--Y3_COVU7-AbMJpHw1Jvg2+VWAvbcgcGmvf6sw1m6VFA@HIDDEN>
 (Noam Postavsky's message of "Sun, 19 Feb 2017 15:00:03 -0500")
Message-ID: <878tp1sw7y.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
x-aol-global-disposition: G
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mx.aol.com;
 s=20150623; t=1487539938;
 bh=6Z6kfjNvFn5gd7gUqvVGVdZSVRagWqZ4irO+LyMAu4w=;
 h=From:To:Subject:Message-ID:Date:MIME-Version:Content-Type;
 b=UR+9FuldJzLawjZOyg0DM+RcAYRJ5veMCwbm88UxCm6pc7oi/5ghYgA5ooBgKVPCZ
 cA23S+gnSD6+oVr4gj2hLmMwqbPSfR20sttKtq7Cw2Z4c1C1g4eFJe7UJaMVdLP9BX
 BiwwPtLEwe/SDY5ZQCe7WF/YEzTT4kKdpyt4nIQM=
x-aol-sid: 3039ac1a856d58aa0ee23694
X-AOL-IP: 50.163.97.64
X-Spam-Score: -2.8 (--)
X-Debbugs-Envelope-To: 25753
Cc: 25753 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 "Charles A. Roelli" <charles@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.8 (--)

Noam Postavsky <npostavs@HIDDEN> writes:

> On Sun, Feb 19, 2017 at 2:39 PM, Live System User <nyc4bos@HIDDEN> wrote:
>>>
>>> Do you see this with 25.2-rc1 on GNU/Linux though?
>>
>>   Fedora doesn't have that version available currently.
>
> Can you try it after M-x load-library python RET and then evaluate
> this new definition of python-shell-completion-native-try:
>
> (defun python-shell-completion-native-try ()
>   "Return non-nil if can trigger native completion."
>   (let ((python-shell-completion-native-enable t)
>         (python-shell-completion-native-output-timeout
>          python-shell-completion-native-try-output-timeout))
>     (python-shell-completion-native-get-completions
>      (get-buffer-process (current-buffer))
>      nil "_")))

    I was already using that (wrapped in a "with-eval-after-load
    'python") from:

    https://github.com/jorgenschaefer/elpy/issues/887#issuecomment-275175119

    to no avail.

>
>>
>>   I did, however, look into the Python modules having to do with
>>   "readline"(completion).
>>
>>   I discovered that if I used the "readline" from "pyrepl.py"instead
>>   of the standard default one, then even though that warning still
>>   occured in a *Warning* buffer in Emacs, I never saw it -- I just
>>   saw   the *Python* buffer and my source buffer, as expected.
>
> I'm not sure what "pyrepl" is or to "use" it, but just looking at web
> search results, it seems to be connected to pypy, which is in the list
> of python-shell-completion-native-disabled-interpreters, could that be
> related?

  Not really but it makes allowances on whether or not pypy.py is
  currently loaded.

  Here is an important piece of pyrepl that appears to be revelent
  to how it deals with input and output from terminals (TTYs) and
  non-terminals:


    if '__pypy__' in sys.builtin_module_names:    # PyPy

        def _old_raw_input(prompt=''):
            # sys.__raw_input__() is only called when stdin and stdout are
            # as expected and are ttys.  If it is the case, then get_reader()
            # should not really fail in _wrapper.raw_input().  If it still
            # does, then we will just cancel the redirection and call again
            # the built-in raw_input().
            try:
                del sys.__raw_input__
            except AttributeError:
                pass
            return raw_input(prompt)
        sys.__raw_input__ = _wrapper.raw_input

    else:
        # this is not really what readline.c does.  Better than nothing I guess
        import __builtin__
        _old_raw_input = __builtin__.raw_input
        __builtin__.raw_input = _wrapper.raw_input

_old_raw_input = None


  I think that this related in the fact that the Emacs interaction is
  not with a real TTY (it doesn't have defined or tigetstr-retrievable
  terminal capabilities (curses) like how to do operations like "clear",
  "cup" or "horizontal" positioning).

  Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 19 Feb 2017 20:00:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 19 15:00:12 2017
Received: from localhost ([127.0.0.1]:46505 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cfXeV-0006ww-RJ
	for submit <at> debbugs.gnu.org; Sun, 19 Feb 2017 15:00:12 -0500
Received: from mail-ot0-f194.google.com ([74.125.82.194]:32991)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1cfXeU-0006vt-6l
 for 25753 <at> debbugs.gnu.org; Sun, 19 Feb 2017 15:00:10 -0500
Received: by mail-ot0-f194.google.com with SMTP id j49so2242563otb.0
 for <25753 <at> debbugs.gnu.org>; Sun, 19 Feb 2017 12:00:10 -0800 (PST)
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=1Z4IFT8Yk87v9WquC2KHU/wySlr+u+ApAcGWiLNOzyU=;
 b=GBJOj2nTAo6NwtcpdaExlU/gOUN7IwRVcD2sz2DzIJQd2xfhPssjqpiePrKI3dH6V9
 Gy8iTv4vDK59mjyOE5rTD2MZk/3F+ojKOEZSbrhOI1wvIkRJ4zQbsHZ4Da6YqUj2gcnp
 ny2fuj9KyliDo8By6RqK2H2F5M/nfOAQcAahjItko27duicCXRMgh/AubuT9TnUfAPlU
 oFdKhqz4wXwiMErCvStmaCsJIXK71WGxDT7DLd+ZBwQld3dLwj1AgmZvZiUbyQyFGOhH
 +7X5lgs+N2lElE3G9jRxOKKd9GezQ9S7EZwvSloqZA88N1UwmDI1JHMJF473xFAUsSNH
 ILkQ==
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=1Z4IFT8Yk87v9WquC2KHU/wySlr+u+ApAcGWiLNOzyU=;
 b=eUAV+W6rA+8W3aCZ8J3ON10SLOZ/cDvpmtY6TCKQ/pdTe/Sc5iTyw6uI2oF4k5ozeU
 loOoMrN5SOyM7yMCGcqR8+Dw8LN27e8pHNZDD1rriEB1SAEgempwofSv02di+JeY79xE
 FBspYj/1mpigmyvXG1seIe/81NEfx1sNHKlM4gXam7AnpY8hfesIrNVwUk738gcq0UCI
 RnykvO3QcFHqbDVZPPPuhNzNc7K6LjKAGWHJiUpVg1hR1ErEGokELllRlAAw6Ns74wP+
 lKG6M/UjbSSl2no9Sb2+UHfl4GW286m1i5sA0v+41CjWr4ffpLyRHLZC6+2eYlYtaY3K
 JRCQ==
X-Gm-Message-State: AMke39lLZe435luJqdWKsUO44O35DGX4iGlkYSoURhv+swEntQCD0H6wIHBjjlG+LIX1Tlp/Zv4rWWfrFj1pZA==
X-Received: by 10.157.14.85 with SMTP id n21mr10746643otd.244.1487534404331;
 Sun, 19 Feb 2017 12:00:04 -0800 (PST)
MIME-Version: 1.0
Received: by 10.157.35.87 with HTTP; Sun, 19 Feb 2017 12:00:03 -0800 (PST)
In-Reply-To: <87d1eermwb.fsf@HIDDEN>
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
 <87poifjsw2.fsf@HIDDEN> <87lgt2rz4j.fsf@HIDDEN>
 <CAM-tV--CV5jfJS3S0J6toHFjfB7suEhx0ASVKOpBc8ONknjfGQ@HIDDEN>
 <87d1eermwb.fsf@HIDDEN>
From: Noam Postavsky <npostavs@HIDDEN>
Date: Sun, 19 Feb 2017 15:00:03 -0500
X-Google-Sender-Auth: SP7sOWZlbNdiIK2utv2q0G_rQXo
Message-ID: <CAM-tV--Y3_COVU7-AbMJpHw1Jvg2+VWAvbcgcGmvf6sw1m6VFA@HIDDEN>
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
To: Live System User <nyc4bos@HIDDEN>
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: 25753
Cc: 25753 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 "Charles A. Roelli" <charles@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.7 (/)

On Sun, Feb 19, 2017 at 2:39 PM, Live System User <nyc4bos@HIDDEN> wrote:
>>
>> Do you see this with 25.2-rc1 on GNU/Linux though?
>
>   Fedora doesn't have that version available currently.

Can you try it after M-x load-library python RET and then evaluate
this new definition of python-shell-completion-native-try:

(defun python-shell-completion-native-try ()
  "Return non-nil if can trigger native completion."
  (let ((python-shell-completion-native-enable t)
        (python-shell-completion-native-output-timeout
         python-shell-completion-native-try-output-timeout))
    (python-shell-completion-native-get-completions
     (get-buffer-process (current-buffer))
     nil "_")))

>
>   I did, however, look into the Python modules having to do with
>   "readline"(completion).
>
>   I discovered that if I used the "readline" from "pyrepl.py"instead
>   of the standard default one, then even though that warning still
>   occured in a *Warning* buffer in Emacs, I never saw it -- I just
>   saw   the *Python* buffer and my source buffer, as expected.

I'm not sure what "pyrepl" is or to "use" it, but just looking at web
search results, it seems to be connected to pypy, which is in the list
of python-shell-completion-native-disabled-interpreters, could that be
related?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 19 Feb 2017 19:39:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 19 14:39:26 2017
Received: from localhost ([127.0.0.1]:46500 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cfXKQ-0004k2-4t
	for submit <at> debbugs.gnu.org; Sun, 19 Feb 2017 14:39:26 -0500
Received: from omr-m015e.mx.aol.com ([204.29.186.15]:58720)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <nyc4bos@HIDDEN>) id 1cfXKO-0004jo-EE
 for 25753 <at> debbugs.gnu.org; Sun, 19 Feb 2017 14:39:24 -0500
Received: from mtaout-mca01.mx.aol.com (mtaout-mca01.mx.aol.com
 [172.26.221.77])
 by omr-m015e.mx.aol.com (Outbound Mail Relay) with ESMTP id C41293800097;
 Sun, 19 Feb 2017 14:39:18 -0500 (EST)
Received: from localhost.localdomain (c-50-163-97-64.hsd1.ma.comcast.net
 [50.163.97.64]) (using TLSv1 with cipher AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mtaout-mca01.mx.aol.com (MUA/Third Party Client Interface) with ESMTPSA id
 AA53C38000089; Sun, 19 Feb 2017 14:39:17 -0500 (EST)
From: Live System User <nyc4bos@HIDDEN>
To: Noam Postavsky <npostavs@HIDDEN>
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
 <87poifjsw2.fsf@HIDDEN> <87lgt2rz4j.fsf@HIDDEN>
 <CAM-tV--CV5jfJS3S0J6toHFjfB7suEhx0ASVKOpBc8ONknjfGQ@HIDDEN>
Date: Sun, 19 Feb 2017 14:39:00 -0500
In-Reply-To: <CAM-tV--CV5jfJS3S0J6toHFjfB7suEhx0ASVKOpBc8ONknjfGQ@HIDDEN>
 (Noam Postavsky's message of "Sun, 19 Feb 2017 10:26:45 -0500")
Message-ID: <87d1eermwb.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
x-aol-global-disposition: G
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mx.aol.com;
 s=20150623; t=1487533158;
 bh=wWLVij5vfMQZ5FjFGryCGTMU5qam43WyUBX+aZRVtXw=;
 h=From:To:Subject:Message-ID:Date:MIME-Version:Content-Type;
 b=8UQXOwo+WL4FsFyUD0ATN2R85l7QtyJG8KevlvNP5c5On/qCkmt5Em22eCGZnB7c8
 OWWcS2WMGRoxEg91XtUqvLsZbwj7OEmOwCD0C18/7eguJtC7SymxPv9N4G00VtZ0h5
 b4UZhpoj+CGLW6V7cqq4Hc+dpqNN1YEZLmE1auTI=
x-aol-sid: 3039ac1add4d58a9f4654892
X-AOL-IP: 50.163.97.64
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 25753
Cc: 25753 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 "Charles A. Roelli" <charles@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Noam Postavsky <npostavs@HIDDEN> writes:

> On Sun, Feb 19, 2017 at 10:14 AM, Live System User <nyc4bos@HIDDEN> wrot=
e:
>>>
>>> It might be something macOS specific, because I don't see any problems
>>> on Arch GNU/Linux with python 2.7.13.
>>
>>   I see the problem on GNU/Linux (Fedora):
>>
>> Warning (python): Your =E2=80=98python-shell-interpreter=E2=80=99 doesn=
=E2=80=99t seem to
> [...]
>> In GNU Emacs 25.1.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.20.9)
>>  of 2016-10-13 built on buildvm-05.phx2.fedoraproject.org
>> Windowing system distributor 'Fedora Project', version 11.0.11803000
>
> Do you see this with 25.2-rc1 on GNU/Linux though?

  Fedora doesn't have that version available currently.
=20=20
>
> There *was* a change since 25.1 (although supposedly that only
> affected python 3). Do you have "set colored-stats on" in your
> ~/.inputrc? There was a report in #24401 of that causing trouble.

  I don't have a ~/.input file.

  I did, however, look into the Python modules having to do with
  "readline"(completion).

  I discovered that if I used the "readline" from "pyrepl.py"instead
  of the standard default one, then even though that warning still
  occured in a *Warning* buffer in Emacs, I never saw it -- I just
  saw   the *Python* buffer and my source buffer, as expected.

  I haven't looked deeper as to why "pyrepl"'s readline is able to
  not display the *Warning* buffer while Python's standard default
  readline displays the *Warning* buffer until it is dismissed.

  Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 19 Feb 2017 15:26:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 19 10:26:53 2017
Received: from localhost ([127.0.0.1]:46359 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cfTO0-0003g5-VI
	for submit <at> debbugs.gnu.org; Sun, 19 Feb 2017 10:26:53 -0500
Received: from mail-oi0-f66.google.com ([209.85.218.66]:36250)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1cfTO0-0003fu-23
 for 25753 <at> debbugs.gnu.org; Sun, 19 Feb 2017 10:26:52 -0500
Received: by mail-oi0-f66.google.com with SMTP id u143so3159871oif.3
 for <25753 <at> debbugs.gnu.org>; Sun, 19 Feb 2017 07:26:52 -0800 (PST)
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:content-transfer-encoding;
 bh=GPi1Cmck9GR7JxvF8LKVo8USQ+H1mylFwNGoDvYT3D0=;
 b=Pb37FEsfZvF694qoPWDAwVthBv3ZVoUCpePYskwdF5jGT5/czgjSD9pI1HzB9H2Klu
 fKjgc1IdtbAPC6sTonkiIQ/ll81TvpISwypEEXWkdHppChHFwJLIZNiFfVxkUisqd4w7
 Cr6AHoJ3QXPvegQv+hFJTmODEdIrppmY9MSi5sACV7XpbTNkDOas7oc3mN7UHVCxbQGr
 5HFXDn/mg2twZ+9ZcDKmBi9RKX9y6F+714ntvYDxHeGebGHzhRZl6XjoP1JLwKv12cth
 xTQ4gjoCZXzO6CoTYaIKeOa82fDDPTTQeBA1P7wB3F+/6DbFmJtY2Un2rpBG5X+brwRo
 emDw==
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:content-transfer-encoding;
 bh=GPi1Cmck9GR7JxvF8LKVo8USQ+H1mylFwNGoDvYT3D0=;
 b=pZLko5RuKZWurN/p0PVMa5or77bLaSfH1h8kyxSC9evECE8gEHv1G2OaYgYzMHdjKd
 vb9LmUzBHi16nmcDCusel923PEJWAELvL0ppTacN0R4klGSCeDq37i3h5YYjR1VZgebY
 eGBsPX1kJSIP/iYhDhOv0NwTa/jusG92ofWga5dpw65Kk9JkVVDUo4H10kllH5H4vjyZ
 LUSUuIDCT61sb7ByY07XoL6N6DAqNoA94RZ1jqmAb3L2a69kLnbRm1C8QZfwIBFZSbDV
 +TCBLHx7kZnd5Kndk6Vdh5dPXDgbAjiKokydepC8bM/j17Emfjk/h3/MFB/uRftedEx3
 TOIg==
X-Gm-Message-State: AMke39ml+ViU7cajCV3F80lak6Lhf5xn1w/4cpsIS2JY38qoWPREPMOXaQ70/f3RfkT1p4nJgKdmbZ8b8TwguQ==
X-Received: by 10.202.89.139 with SMTP id n133mr766530oib.70.1487518006242;
 Sun, 19 Feb 2017 07:26:46 -0800 (PST)
MIME-Version: 1.0
Received: by 10.157.35.87 with HTTP; Sun, 19 Feb 2017 07:26:45 -0800 (PST)
In-Reply-To: <87lgt2rz4j.fsf@HIDDEN>
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
 <87poifjsw2.fsf@HIDDEN> <87lgt2rz4j.fsf@HIDDEN>
From: Noam Postavsky <npostavs@HIDDEN>
Date: Sun, 19 Feb 2017 10:26:45 -0500
X-Google-Sender-Auth: v0BTb-AImQ2b37gBVy4_7fLu4xI
Message-ID: <CAM-tV--CV5jfJS3S0J6toHFjfB7suEhx0ASVKOpBc8ONknjfGQ@HIDDEN>
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
To: Live System User <nyc4bos@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: 25753
Cc: 25753 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 "Charles A. Roelli" <charles@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.7 (/)

On Sun, Feb 19, 2017 at 10:14 AM, Live System User <nyc4bos@HIDDEN> wrote:
>>
>> It might be something macOS specific, because I don't see any problems
>> on Arch GNU/Linux with python 2.7.13.
>
>   I see the problem on GNU/Linux (Fedora):
>
> Warning (python): Your =E2=80=98python-shell-interpreter=E2=80=99 doesn=
=E2=80=99t seem to
[...]
> In GNU Emacs 25.1.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.20.9)
>  of 2016-10-13 built on buildvm-05.phx2.fedoraproject.org
> Windowing system distributor 'Fedora Project', version 11.0.11803000

Do you see this with 25.2-rc1 on GNU/Linux though?

There *was* a change since 25.1 (although supposedly that only
affected python 3). Do you have "set colored-stats on" in your
~/.inputrc? There was a report in #24401 of that causing trouble.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 19 Feb 2017 15:15:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 19 10:15:19 2017
Received: from localhost ([127.0.0.1]:46355 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cfTCo-0003PP-Qu
	for submit <at> debbugs.gnu.org; Sun, 19 Feb 2017 10:15:19 -0500
Received: from omr-a012e.mx.aol.com ([204.29.186.61]:37674)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <nyc4bos@HIDDEN>) id 1cfTCn-0003PC-FQ
 for 25753 <at> debbugs.gnu.org; Sun, 19 Feb 2017 10:15:18 -0500
Received: from mtaout-mbb01.mx.aol.com (mtaout-mbb01.mx.aol.com
 [172.26.254.109])
 by omr-a012e.mx.aol.com (Outbound Mail Relay) with ESMTP id DBBB638000AB;
 Sun, 19 Feb 2017 10:15:11 -0500 (EST)
Received: from localhost.localdomain (c-50-163-97-64.hsd1.ma.comcast.net
 [50.163.97.64]) (using TLSv1 with cipher AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mtaout-mbb01.mx.aol.com (MUA/Third Party Client Interface) with ESMTPSA id
 F282A3800008C; Sun, 19 Feb 2017 10:15:10 -0500 (EST)
From: Live System User <nyc4bos@HIDDEN>
To: npostavs@HIDDEN
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
In-Reply-To: <87poifjsw2.fsf@HIDDEN>
 (npostavs@HIDDEN's message of "Sat, 18 Feb 2017
 12:44:29 -0500")
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
 <87poifjsw2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
Date: Sun, 19 Feb 2017 10:14:52 -0500
Message-ID: <87lgt2rz4j.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
x-aol-global-disposition: G
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mx.aol.com;
 s=20150623; t=1487517311;
 bh=gsyBnkyv4CYcPfzBQKCPBBOt2hojUItT5V5jw1ECG2o=;
 h=From:To:Subject:Message-ID:Date:MIME-Version:Content-Type;
 b=b6aDp5SmOHYZfN4szFeM5hUIm6AhBnqKkN+J5bHFX7nfiBYmxPwlI0i6CeSKOkQZd
 KWfbIpl7D0kNS/CGeBkhdadCs86Awm7V/99nd7CvhueqkGvZTvxUPawmL7PyGSWRv4
 zmGaqbfb91WJ7Q12MyC5rZUEmHbBIqhKNY4XMDms=
x-aol-sid: 3039ac1afe6d58a9b67e28fb
X-AOL-IP: 50.163.97.64
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 25753
Cc: 25753 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 "Charles A. Roelli" <charles@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)

npostavs@HIDDEN writes:

> Eli Zaretskii <eliz@HIDDEN> writes:
>
>>> From: charles@HIDDEN (Charles A. Roelli)
>>> Date: Thu, 16 Feb 2017 17:07:48 +0100
>>>=20
>>> In emacs 25.2 (rc1) and 25.1, interaction with the Python shell does not
>>> seem to be working fully.  Python version is '2.7.12 (v2.7.12:d33e0cf91=
556,
>>> Jun 26 2016, 12:10:39) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]', and
>>> this is on Snow Leopard.
>>
>> Please try the next RC (should be out in a few days), I think we fixed
>> that there.
>
> AFAIK, the only change since rc1 is to add "ipython" to
> python-shell-completion-native-disabled-interpreters.  And that should
> not affect the problem reported here, which does not seem to involve
> ipython.
>
> It might be something macOS specific, because I don't see any problems
> on Arch GNU/Linux with python 2.7.13.

  I see the problem on GNU/Linux (Fedora):

Warning (python): Your =E2=80=98python-shell-interpreter=E2=80=99 doesn=E2=
=80=99t seem to
support readline, yet =E2=80=98python-shell-completion-native=E2=80=99 was =
t and
"python" is not part of the
=E2=80=98python-shell-completion-native-disabled-interpreters=E2=80=99 list=
.  Native
completions have been disabled locally.

Python 2.7.13 (default, Jan 13 2017, 10:15:16)=20
[GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> python.el: native completion setup loaded

>>> q<TAB>qu<TAB>
Click on a completion to select it.
In this buffer, type RET to select the completion near point.

Possible completions are:
quit
quopri


In GNU Emacs 25.1.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.20.9)
 of 2016-10-13 built on buildvm-05.phx2.fedoraproject.org
Windowing system distributor 'Fedora Project', version 11.0.11803000

  Thanks.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 18 Feb 2017 17:43:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 18 12:43:26 2017
Received: from localhost ([127.0.0.1]:45251 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cf92c-0002C6-3z
	for submit <at> debbugs.gnu.org; Sat, 18 Feb 2017 12:43:26 -0500
Received: from mail-it0-f65.google.com ([209.85.214.65]:34604)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1cf92a-0002Bt-F2
 for 25753 <at> debbugs.gnu.org; Sat, 18 Feb 2017 12:43:24 -0500
Received: by mail-it0-f65.google.com with SMTP id r141so6680273ita.1
 for <25753 <at> debbugs.gnu.org>; Sat, 18 Feb 2017 09:43:24 -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=hvd1ERlkxW3qsjjGhgcXMPGYKrzdhya34Vbt0Fvfa3A=;
 b=gEC+6x1e05P4LUQucQNM+1wSa9mHri/jWN8jQ4CVBTlqOjyL2bj11Wpi8o/qNMH0Tv
 UyJifqHPMvjBRsDgdig1p41W4RvT7hWphAFA/9EMxft77jUITyDAmZBuLPQDo6wWYsLk
 VstZpaPcgeAo1hxNsIKrO1RLkO7REdweLvpkn77/P054206fcaRDxHJd2DhbGFRZnXRu
 EEsQsURYmS1EOStE3EPLEVI0swdzh18DmEAhGdJsOwAKPMd3Igj5WKBKFSvEYh2ARSJ+
 KSTEw9CCkxgdDhOiaqMYMRaVgk9NdrDFoCm7pzrB16oENJUNOIrrq2cfqmnv4W62Xee6
 tsIg==
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=hvd1ERlkxW3qsjjGhgcXMPGYKrzdhya34Vbt0Fvfa3A=;
 b=VRxOV2A4DxylHJZhRg1j9bqOFmoN72aSZRLVVPKi0eDG3Fxm4C49dWqCm1vQ3UsQ7r
 uavUlGi0P0sPoGCTpZL3XWOCw7ZlqfG8R+ix48Dt2GDDesrQY3KWUxD7q4f/svZXue+D
 OgNN7WdRaSFTCUzL3OHU9w8e+8cvJm8QpFmrUMdxy4+D668/X2bAKYWVNNnDBOfkPiMF
 s5hWAx6oUo2oMu5OQp8N2TYIVztAPmKQB64Frk16n1t8q2+9YU0Hq+5YnMz/SBKAOf9W
 UrFuabot6iTZdu4UdvfskX+YLCE+X2CiRsRYMBqruooF/TR3ppM9mTreE28r9vODySaU
 dZWA==
X-Gm-Message-State: AMke39kjXoYBOA8OkAho3djaRLQfaYzZ+GWXYH9hzUbU6obplfdUKhhkskYjgya5bYjJyg==
X-Received: by 10.36.74.131 with SMTP id k125mr11144066itb.53.1487439798776;
 Sat, 18 Feb 2017 09:43:18 -0800 (PST)
Received: from zony ([45.2.7.65])
 by smtp.googlemail.com with ESMTPSA id f127sm2585222ite.26.2017.02.18.09.43.17
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sat, 18 Feb 2017 09:43:17 -0800 (PST)
From: npostavs@HIDDEN
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
References: <m27f4qyv8r.fsf@HIDDEN> <83lgt6xbr0.fsf@HIDDEN>
Date: Sat, 18 Feb 2017 12:44:29 -0500
In-Reply-To: <83lgt6xbr0.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 16 Feb
 2017 19:54:11 +0200")
Message-ID: <87poifjsw2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: 25753
Cc: 25753 <at> debbugs.gnu.org, "Charles A. Roelli" <charles@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.7 (/)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: charles@HIDDEN (Charles A. Roelli)
>> Date: Thu, 16 Feb 2017 17:07:48 +0100
>> 
>> In emacs 25.2 (rc1) and 25.1, interaction with the Python shell does not
>> seem to be working fully.  Python version is '2.7.12 (v2.7.12:d33e0cf91556,
>> Jun 26 2016, 12:10:39) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]', and
>> this is on Snow Leopard.
>
> Please try the next RC (should be out in a few days), I think we fixed
> that there.

AFAIK, the only change since rc1 is to add "ipython" to
python-shell-completion-native-disabled-interpreters.  And that should
not affect the problem reported here, which does not seem to involve
ipython.

It might be something macOS specific, because I don't see any problems
on Arch GNU/Linux with python 2.7.13.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at 25753 <at> debbugs.gnu.org:


Received: (at 25753) by debbugs.gnu.org; 16 Feb 2017 17:53:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 16 12:53:59 2017
Received: from localhost ([127.0.0.1]:42512 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ceQFi-0005qA-Nq
	for submit <at> debbugs.gnu.org; Thu, 16 Feb 2017 12:53:58 -0500
Received: from eggs.gnu.org ([208.118.235.92]:36678)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ceQFg-0005pv-CY
 for 25753 <at> debbugs.gnu.org; Thu, 16 Feb 2017 12:53:56 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1ceQFW-0007zJ-FI
 for 25753 <at> debbugs.gnu.org; Thu, 16 Feb 2017 12:53:51 -0500
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,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56819)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1ceQFW-0007zF-CS; Thu, 16 Feb 2017 12:53:46 -0500
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2477
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1ceQFV-0002f6-SX; Thu, 16 Feb 2017 12:53:46 -0500
Date: Thu, 16 Feb 2017 19:54:11 +0200
Message-Id: <83lgt6xbr0.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: charles@HIDDEN (Charles A. Roelli)
In-reply-to: <m27f4qyv8r.fsf@HIDDEN> (charles@HIDDEN)
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
References: <m27f4qyv8r.fsf@HIDDEN>
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: 25753
Cc: 25753 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: charles@HIDDEN (Charles A. Roelli)
> Date: Thu, 16 Feb 2017 17:07:48 +0100
> 
> In emacs 25.2 (rc1) and 25.1, interaction with the Python shell does not
> seem to be working fully.  Python version is '2.7.12 (v2.7.12:d33e0cf91556,
> Jun 26 2016, 12:10:39) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]', and
> this is on Snow Leopard.

Please try the next RC (should be out in a few days), I think we fixed
that there.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 16 Feb 2017 16:08:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 16 11:08:19 2017
Received: from localhost ([127.0.0.1]:42392 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ceObS-0003FF-T1
	for submit <at> debbugs.gnu.org; Thu, 16 Feb 2017 11:08:19 -0500
Received: from eggs.gnu.org ([208.118.235.92]:56609)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <charles@HIDDEN>) id 1ceObR-0003F3-1Q
 for submit <at> debbugs.gnu.org; Thu, 16 Feb 2017 11:08:17 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <charles@HIDDEN>) id 1ceObK-0004H6-QT
 for submit <at> debbugs.gnu.org; Thu, 16 Feb 2017 11:08:11 -0500
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]:42337)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <charles@HIDDEN>) id 1ceObK-0004H2-Ml
 for submit <at> debbugs.gnu.org; Thu, 16 Feb 2017 11:08:10 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:47551)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <charles@HIDDEN>) id 1ceObH-0004ue-Eh
 for bug-gnu-emacs@HIDDEN; Thu, 16 Feb 2017 11:08:10 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <charles@HIDDEN>) id 1ceObD-0004E5-Bx
 for bug-gnu-emacs@HIDDEN; Thu, 16 Feb 2017 11:08:07 -0500
Received: from sinyavsky.aurox.ch ([37.35.109.145]:49901)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <charles@HIDDEN>) id 1ceObD-000497-1o
 for bug-gnu-emacs@HIDDEN; Thu, 16 Feb 2017 11:08:03 -0500
Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1])
 by sinyavsky.aurox.ch (Postfix) with ESMTP id CCA0D22363
 for <bug-gnu-emacs@HIDDEN>; Thu, 16 Feb 2017 16:04:53 +0000 (UTC)
Authentication-Results: sinyavsky.aurox.ch (amavisd-new);
 dkim=pass (1024-bit key) reason="pass (just generated, assumed good)"
 header.d=aurox.ch
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h=
 content-transfer-encoding:content-type:content-type:mime-version
 :message-id:date:date:subject:subject:to:from:from; s=dkim; t=
 1487261093; x=1488125094; bh=xq2dVbOf/GP8vuJVdjrrCf9h5rWhmdiTrQ7
 xRv40VQk=; b=AkTzrDp8qvxZqzF4gajg84mAqs0LsWg31IGPgChEpnRE5K3dULn
 FeAvYRS2Yzsnm9jdBR3rGA128E0b/giLNyg06j72LHruNsHpP+oYl3K3tJngDsAG
 FOHaQLPHSEjw9gTgji2+WMZ6JlEqfAVmVlkyL6Q/0HGfIa9Ws5+eathg=
X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com
Received: from sinyavsky.aurox.ch ([127.0.0.1])
 by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new,
 port 10026) with ESMTP id noOm1J_-Cx4U for <bug-gnu-emacs@HIDDEN>;
 Thu, 16 Feb 2017 16:04:53 +0000 (UTC)
Received: from gray (54.4.4.85.dynamic.wline.res.cust.swisscom.ch [85.4.4.54])
 by sinyavsky.aurox.ch (Postfix) with ESMTPSA id E108D2233E
 for <bug-gnu-emacs@HIDDEN>; Thu, 16 Feb 2017 16:04:52 +0000 (UTC)
From: charles@HIDDEN (Charles A. Roelli)
To: bug-gnu-emacs@HIDDEN
Subject: 25.2; Python mode shell interaction not working 100%
Date: Thu, 16 Feb 2017 17:07:48 +0100
Message-ID: <m27f4qyv8r.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.1 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.1 (----)

In emacs 25.2 (rc1) and 25.1, interaction with the Python shell does not
seem to be working fully.  Python version is '2.7.12 (v2.7.12:d33e0cf91556,
Jun 26 2016, 12:10:39) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]', and
this is on Snow Leopard.

- emacs -Q
- open any Python file
- M-x run-python, and this pops up:

  Warning (python): Your =E2=80=98python-shell-interpreter=E2=80=99 doesn=
=E2=80=99t seem to
  support readline, yet =E2=80=98python-shell-completion-native=E2=80=99 wa=
s t and
  "python" is not part of the
  =E2=80=98python-shell-completion-native-disabled-interpreters=E2=80=99 li=
st.  Native
  completions have been disabled locally.
=20=20
  [and yet `import readline, rlcompleter' works fine for me]

- quit that warning, and the *Python* shell states "python.el: native
  completion setup loaded".
- test out completion in the shell, it seems to be working okay
  (`import sys RET sys . TAB' shows the attributes of `sys').  Not sure
  if this is `native' completion though.
- switch to the Python file.  Place point over a module, global
  variable, function, or function definition, and this pops up in the
  echo area (meant to be eldoc documentation, I think):

  import codecs, os;
  __pyfile =3D codecs.open('''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-=
Tmp-/py1883fcQ''',encoding=3D'''utf-8''');
  __code =3D __pyfile.read().encode('''utf-8''');
  __pyfile.close();
  os.remove('''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py1883fcQ'=
'');
  exec(compile(__code,'''/path/to/python/buffer/here''','exec'));
=20=20
  [some line breaks included for readability]

  The same sort of thing is returned by calling, say,
  `(python-ffap-module-path "twisted")'.  Any pointers on fixing this?




In GNU Emacs 25.2.1 (x86_64-apple-darwin10.8.0, NS appkit-1038.36 Version 1=
0.6.8 (Build 10K549))
 of 2017-02-07 built on gray
Windowing system distributor 'Apple', version 10.3.1038
Configured using:
 'configure --with-modules'

Configured features:
JPEG RSVG NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES




Acknowledgement sent to charles@HIDDEN (Charles A. Roelli):
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#25753; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 11 Jul 2018 00:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.