[issue26627] IDLE incorrectly labeling error as internal

2017-06-22 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
resolution:  -> duplicate
stage: test needed -> resolved
status: open -> closed
superseder:  -> IDLE removes elements from tracebacks.

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26627] IDLE incorrectly labeling error as internal

2016-04-17 Thread ppperry

ppperry added the comment:

Duplicate issue24252, although the consequences are slightly different.

--
nosy: +ppperry

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26627] IDLE incorrectly labeling error as internal

2016-03-25 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The goal is to match the traceback that Python itself produces with the same 
code, but it is perhaps an impossible process. The current list goes back to 
2003 without tracker issue numbers, so I don't know the reason for each.  I 
worry a bit about the suppression of lines from threading and queue.

I wondered why the idlelib.run lines were here until I read this (3.5.2, 
run.py, line 233-236.

if len(tb) == 0:
# exception was in IDLE internals, don't prune!
tb[:] = orig_tb[:]
print("** IDLE Internal Exception: ", file=sys.stderr)

So both lines were deleted and then restored.

Prepending idlelib as appropriate, seems like a good idea.

exclude = ['bdb.py', 'queue.py', 'threading.py']
for name in ('RemoteDebugger.py', 'rpc.py', 'run.py'):
exclude.append(os.path.join('idlelib', name))

--
stage:  -> test needed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26627] IDLE incorrectly labeling error as internal

2016-03-23 Thread Tadhg McDonald-Jensen

Tadhg McDonald-Jensen added the comment:

other then bdb.py all of the excluded modules are imported into idlelib.run so 
that line could be replaced with:

import bdb
exclude = (__file__, rpc.__file__, threading.__file__, 
   queue.__file__, RemoteDebugger.__file__, bdb.__file__)

although it is really only necessary for run, rpc and RemoteDebugger since they 
are imported through `idlelib.__` so it could also use a notation like this:


exclude = ("idlelib/run.py", "idlelib/rpc.py", "threading.py", "queue.py",
   "idlelib/RemoteDebugger.py", "bdb.py")

although this would need to make use of os.path.join or equivalent to be cross 
compatible.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26627] IDLE incorrectly labeling error as internal

2016-03-23 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +kbk, roger.serwy, terry.reedy
versions: +Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26627] IDLE incorrectly labeling error as internal

2016-03-23 Thread Tadhg McDonald-Jensen

New submission from Tadhg McDonald-Jensen:

(I apologize if I'm doing something wrong)

When using a file named run.py in idle, any errors raised from the module makes 
IDLE show a traceback like this:

Traceback (most recent call last):
** IDLE Internal Exception: 
  File 
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/idlelib/run.py",
 line 351, in runcode
exec(code, self.locals)
  File "/Users/Tadhg/Documents/run.py", line 1, in 
raise ValueError
ValueError

I looked into idlelib.run and think the culprit is the way print_exception 
tries to exclude internal files, specifically line 180 in vs 2.7 and line 206 
in vs3.5

exclude = ("run.py", "rpc.py", "threading.py", "queue.py",
   "RemoteDebugger.py", "bdb.py")

this excludes paths with these names anywhere in the path (later in 
cleanup_traceback) instead of getting the absolute paths of these modules.

--
components: IDLE
files: run.py
messages: 262293
nosy: Tadhg McDonald-Jensen
priority: normal
severity: normal
status: open
title: IDLE incorrectly labeling error as internal
type: behavior
versions: Python 2.7, Python 3.5
Added file: http://bugs.python.org/file42261/run.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com