[issue20500] assertion failed when passing an exception object to sys.exit

2014-02-08 Thread Nick Coghlan

Nick Coghlan added the comment:

Above commits added notes for the other two currently documented public APIs 
directly affected by the change (PyEval_CallObjectWithKeywords isn't currently 
documented, despite the public name), and also updated the porting note to 
clarify that these operations may be invoked indirectly via other public APIs.

--

___
Python tracker 

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



[issue20500] assertion failed when passing an exception object to sys.exit

2014-02-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9e7594d65178 by Nick Coghlan in branch 'default':
Issue #20500: clarify that invocation may be indirect
http://hg.python.org/cpython/rev/9e7594d65178

--

___
Python tracker 

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



[issue20500] assertion failed when passing an exception object to sys.exit

2014-02-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 41023a501c7b by Nick Coghlan in branch 'default':
Issue #20500: Note other public APIs with the new assertion
http://hg.python.org/cpython/rev/41023a501c7b

--

___
Python tracker 

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



[issue20500] assertion failed when passing an exception object to sys.exit

2014-02-08 Thread STINNER Victor

STINNER Victor added the comment:

"I also added a versionchanged to PyObject_Str and a note in the Porting 
section of What's New, as third party extensions could also be affected by this 
change - it elevates "may silently discard an active exception" to "debug build 
assertion failure"."

Hi, I added this check in many other functions: PyEval_EvalFrameEx(), 
PyEval_CallObjectWithKeywords(), PyObject_Repr(), PyObject_Str(). And also 
private methods like type_call().

I added these assertions when I worked on #18408 to ensure that MemoryError 
exceptions are no more ignored.

--

___
Python tracker 

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



[issue20500] assertion failed when passing an exception object to sys.exit

2014-02-08 Thread Nick Coghlan

Nick Coghlan added the comment:

I also added a versionchanged to PyObject_Str and a note in the Porting section 
of What's New, as third party extensions could also be affected by this change 
- it elevates "may silently discard an active exception" to "debug build 
assertion failure".

--

___
Python tracker 

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



[issue20500] assertion failed when passing an exception object to sys.exit

2014-02-08 Thread Nick Coghlan

Nick Coghlan added the comment:

Thanks for the report Xavier - 3.4 is a bit fussier about not losing that 
exception state silently, so the shutdown code simply needed to clear it 
explicitly after saving it on the local stack.

--

___
Python tracker 

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



[issue20500] assertion failed when passing an exception object to sys.exit

2014-02-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e7708864a8d5 by Nick Coghlan in branch 'default':
Close #20500: Don't trigger PyObject_Str assertion at shutdown
http://hg.python.org/cpython/rev/e7708864a8d5

--
nosy: +python-dev
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue20500] assertion failed when passing an exception object to sys.exit

2014-02-08 Thread Nick Coghlan

Changes by Nick Coghlan :


--
assignee:  -> ncoghlan
nosy: +ncoghlan

___
Python tracker 

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



[issue20500] assertion failed when passing an exception object to sys.exit

2014-02-03 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +haypo, larry
priority: normal -> release blocker
stage:  -> needs patch
versions:  -Python 3.5

___
Python tracker 

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



[issue20500] assertion failed when passing an exception object to sys.exit

2014-02-03 Thread Xavier de Gaye

New submission from Xavier de Gaye:

The following code crashes python with:

python: Objects/object.c:512: PyObject_Str: Assertion `!PyErr_Occurred()' 
failed.

on the tip of the default branch, but not on python 3.3.3.


import sys

error = None
try:
raise ValueError('some text')
except ValueError as err:
error = err

if error:
sys.exit(error)

--
components: Interpreter Core
messages: 210123
nosy: xdegaye
priority: normal
severity: normal
status: open
title: assertion failed when passing an exception object to sys.exit
type: crash
versions: Python 3.4, Python 3.5

___
Python tracker 

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