[issue10756] Error in atexit._run_exitfuncs [...] Exception expected for value, str found

2011-05-15 Thread kai zhu

kai zhu kai...@ugcs.caltech.edu added the comment:

should this bug b closed? it seems fixed in python3.2 for me.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10756
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10756] Error in atexit._run_exitfuncs [...] Exception expected for value, str found

2011-05-15 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Well, Victor still wanted to backport it.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10756
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10756] Error in atexit._run_exitfuncs [...] Exception expected for value, str found

2011-05-15 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 461e37a60187 by Victor Stinner in branch '3.1':
Issue #10756: atexit normalizes the exception before displaying it. Patch by
http://hg.python.org/cpython/rev/461e37a60187

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10756
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10756] Error in atexit._run_exitfuncs [...] Exception expected for value, str found

2011-05-15 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Oh, I forgot the issue. I backported the fix to Python 3.1. Python 2.7 doesn't 
have the bug.

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10756
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10756] Error in atexit._run_exitfuncs [...] Exception expected for value, str found

2011-01-04 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Commited as r87755+r87758. Wait for the buildbot before backporting to other 
versions.

--
nosy: +haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10756
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com




[issue10756] Error in atexit._run_exitfuncs [...] Exception expected for value, str found

2011-01-03 Thread Andreas Stührk

Andreas Stührk andy-pyt...@hammerhartes.de added the comment:

So I guess someone should feel responsible and commit that patch. For 
convenience, I updated the patch to inline the raise.

--
Added file: 
http://bugs.python.org/file20246/issue10756_normalize_exceptions_v2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10756
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10756] Error in atexit._run_exitfuncs [...] Exception expected for value, str found

2011-01-03 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

I think Antoine might be interested.

--
assignee:  - pitrou
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10756
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10756] Error in atexit._run_exitfuncs [...] Exception expected for value, str found

2010-12-26 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Looks good to me.  I’d just move the raising function into the test method (no 
need to update the patch).

--
nosy: +eric.araujo
stage:  - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10756
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10756] Error in atexit._run_exitfuncs [...] Exception expected for value, str found

2010-12-26 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

+1.

--
nosy: +georg.brandl

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10756
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10756] Error in atexit._run_exitfuncs [...] Exception expected for value, str found

2010-12-25 Thread Andreas Stührk

Andreas Stührk andy-pyt...@hammerhartes.de added the comment:

It's because `PyErr_Fetch()` which is used in `atexit_callfuncs()` can return 
an unnormalized exception (e.g. if the exception is set with 
`PyErr_SetString()`. value is then a string). A simple call to 
`PyErr_NormalizeException()` fixes this issue.

Attached is a patch which fixes the issue and adds a test for it. I used 
exactly the same code (1 / 0) to raise the exception, as I don't know if 
there is some clean way to raise an unnormalized exception.

--
keywords: +patch
nosy: +Trundle
Added file: 
http://bugs.python.org/file20163/issue10756_normalize_exceptions.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10756
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10756] Error in atexit._run_exitfuncs [...] Exception expected for value, str found

2010-12-24 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy:  -BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10756
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10756] Error in atexit._run_exitfuncs [...] Exception expected for value, str found

2010-12-21 Thread kai zhu

New submission from kai zhu kaizhu...@gmail.com:

pub...@colinux 3 ~: python3.2
Python 3.2b2 (py3k, Dec 22 2010, 02:38:55) 
[GCC 4.4.5] on linux2
Type help, copyright, credits or license for more information.
 import atexit; atexit.register(lambda:1/0)
function lambda at 0xb7c7e12c
 exit()
Error in atexit._run_exitfuncs:
TypeError: print_exception(): Exception expected for value, str found



might b related to Issue5089, so included those ppl to nosy.  this bug is 
subtle.  unit tests which explicitly 'raise' exceptions will not b caught, e.g. 
this will raise properly:

@exit.register
def foo(): raise ZeroDivisionError()

--
components: Interpreter Core
messages: 124490
nosy: BreamoreBoy, kaizhu, mark.dickinson
priority: normal
severity: normal
status: open
title: Error in atexit._run_exitfuncs [...]  Exception expected for value, str 
found
type: behavior
versions: Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10756
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com