IDLE RPC Proxy for standard IO streams lacks 'errors' attribute #57176
Copy link
Copy link
Closed
Labels
Description
| BPO | 12967 |
|---|---|
| Nosy | @terryjreedy, @ned-deily, @ezio-melotti, @serwy, @takluyver, @serhiy-storchaka |
| Superseder |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = 'https://github.com/ned-deily'
closed_at = <Date 2012-11-17.17:19:11.494>
created_at = <Date 2011-09-13.04:38:10.330>
labels = ['expert-IDLE', 'type-bug']
title = "IDLE RPC Proxy for standard IO streams lacks 'errors' attribute"
updated_at = <Date 2012-11-17.17:19:22.784>
user = 'https://bugs.python.org/Benthelen'bugs.python.org fields:
activity = <Date 2012-11-17.17:19:22.784>
actor = 'terry.reedy'
assignee = 'ned.deily'
closed = True
closed_date = <Date 2012-11-17.17:19:11.494>
closer = 'terry.reedy'
components = ['IDLE']
creation = <Date 2011-09-13.04:38:10.330>
creator = 'Ben.thelen'
dependencies = []
files = []
hgrepos = []
issue_num = 12967
keywords = []
message_count = 17.0
messages = ['143949', '143963', '144002', '144081', '144114', '144158', '144187', '144190', '145204', '145215', '145565', '164623', '165193', '172596', '175733', '175777', '175781']
nosy_count = 8.0
nosy_names = ['terry.reedy', 'ned.deily', 'ezio.melotti', 'roger.serwy', 'v+python', 'takluyver', 'Ben.thelen', 'serhiy.storchaka']
pr_nums = []
priority = 'normal'
resolution = 'duplicate'
stage = 'resolved'
status = 'closed'
superseder = '9290'
type = 'behavior'
url = 'https://bugs.python.org/issue12967'
versions = ['Python 2.7', 'Python 3.2', 'Python 3.3']Reactions are currently unavailable
Activity
Benthelen commentedon Sep 13, 2011
AttributeErrors on log.py in the distutils directory
merwok commentedon Sep 13, 2011
When will it raise an AttributeError?
Benthelen commentedon Sep 14, 2011
Error had been raised when installing the distribute package, but it could be raised on any other usage as sys.stdout does not have an 'error' attribute.
From: Éric Araujo <report@bugs.python.org>
To: thelen_ben@yahoo.com
Sent: Tuesday, 13 September 2011 8:54 PM
Subject: [bpo-12967] AttributeError distutils\log.py
Éric Araujo <merwok@netwok.org> added the comment:
When will it raise an AttributeError?
----------
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue12967\>
merwok commentedon Sep 15, 2011
Benthelen commentedon Sep 16, 2011
Hi Eric,
I'm not suggesting that python does not test the applications. just reporting what I experience.
The python version installed is r32:88445
What I did, I opened the setup file (in IDLE) from the distribute 0.6.21 and run this.
On my python 3.2 version (clean without extentions). when I type in (on the command line)
From: Éric Araujo <report@bugs.python.org>
To: thelen_ben@yahoo.com
Sent: Thursday, 15 September 2011 10:54 PM
Subject: [bpo-12967] AttributeError distutils\log.py
Éric Araujo <merwok@netwok.org> added the comment:
How? Please tell exactly what command you ran with what Python version.
It does, in 3.x. Do you think Python has no tests or no users? :)
----------
assignee: tarek -> eric.araujo
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue12967\>
ned-deily commentedon Sep 16, 2011
That won't work in IDLE because IDLE replaces the standard sys.stdout file object with a special proxy object to capture stdout across its processes and the proxy object does not currently support all of the attributes of a io.TextTIOWrapper object, like errors.
If that is the only problem, perhaps this issue should be reassigned to IDLE to support errors and any other relevant new attributes.
Benthelen commentedon Sep 17, 2011
Hi Ned,
Not sure if I fully understand the IDLE issue, I'm still learning Python (abt. 6 months). Nevertheless I've installed the distributes through the command line.
if you want to reassign this issue to IDLE, please do so.
Best regards,
Ben Thelen
From: Ned Deily <report@bugs.python.org>
To: thelen_ben@yahoo.com
Sent: Saturday, 17 September 2011 4:43 AM
Subject: [bpo-12967] AttributeError distutils\log.py
Ned Deily <nad@acm.org> added the comment:
That won't work in IDLE because IDLE replaces the standard sys.stdout file object with a special proxy object to capture stdout across its processes and the proxy object does not currently support all of the attributes of a io.TextTIOWrapper object, like errors.
<idlelib.rpc.RPCProxy object at 0x1282b30>
If that is the only problem, perhaps this issue should be reassigned to IDLE to support errors and any other relevant new attributes.
----------
nosy: +ned.deily
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue12967\>
merwok commentedon Sep 17, 2011
(A note about this bug tracker: please do not send HTML email, it gets transformed into an unhelpful attachment, and also don’t include whole messages after your reply when you send email. Thanks in advance!)
merwok commentedon Oct 9, 2011
I stand by my opinion that running setup.py from IDLE is not supported.
3 remaining items
[-]AttributeError distutils\log.py[/-][+]IDLE RPC Proxy for standard IO streams lacks 'errors' attribute[/+]terryjreedy commentedon Oct 14, 2011
Thank you for redirecting this issue. The goal should be to make the proxies completely transparent. They mostly are, but occasional issues arise when they are not. Sometimes the source of a problem is not clear. I wonder, for instance, whether the non-function in IDLE of
has anything to do with the bidirectional communication or is entirely internal to IDLE.
vpython commentedon Jul 3, 2012
So this looks like it might be a simple fix... in bpo-1602, there was a patch for Windows console for 3.1... sadly not applied then, or 3.2, or 3.3 (yet). But in 3.2, the fix sprouted a failure just like this one: the console output class would get reported to not have an "errors" attribute when doing an input. A fix there was to add an attribute errors='strict' to the console output class.
Here it seems the same symptom sprouted in the same time frame, for a similar situation where the output class has been replaced by one that doesn't have an errors attribute... so it should grow one...
serwy commentedon Jul 10, 2012
bpo-13532 has an applied patch (422242dbce30) for the subprocess that makes the stdout, stderr, and stdin inherit from io.TextIOBase. This includes the "errors" attribute, albeit set to ''.
The fix does not apply when running IDLE without a subprocess, so the .errors attribute will still be missing.
serhiy-storchaka commentedon Oct 10, 2012
If this issue only about 'errors' attribute of IDLE RPC Proxy for standard IO streams, then it should be closed as outdated. If this issue about 'errors' attribute of IDLE standard IO streams (even when running IDLE without a subprocess), then the patches for bpo-9290 will solve this issue.
takluyver commentedon Nov 17, 2012
It seems pretty arbitrary and newcomer-unfriendly to decide that Python doesn't support running setup.py inside IDLE.
Exhibit A: confused newcomer trying to install distribute, getting unhelpful error message.
http://stackoverflow.com/questions/13368040/ipython-installation-on-3-3-x64-errors
terryjreedy commentedon Nov 17, 2012
Thomas, please re-read the messages starting msg145215 where it was decided that this is not an issue about setup.py in particular. There appears to now only be a problem if IDLE is run without a subprocess, and that option may disappear in 3.4 as unneeded.
terryjreedy commentedon Nov 17, 2012
Even though the title of bpo-9290 says stdin, the patches are for all std** streams, so should cover this.