[issue5970] sys.exc_info leaks into a generator

2013-03-28 Thread Georg Brandl

Georg Brandl added the comment:

Out of date now that 2.7 is also in maintenance mode.

--
nosy: +georg.brandl
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue5970] sys.exc_info leaks into a generator

2009-05-08 Thread Jeffrey Yasskin

New submission from Jeffrey Yasskin :

There's an obscure bug in sys.exc_info after a yield statement.

  def test():
  def raising_generator():
  try:
  raise IndexError("inner exception")
  except IndexError:
  yield 3
  # Here, sys.exc_info() ought to refer to the inner
  # exception, but instead it refers to the outer one.
  try:
  raise ValueError("outer exception")
  except ValueError:
  for i in raising_generator(): pass

sys.exc_info gets reset even if there's no outer exception.

The attached (failing) patch highlights this problem, and tests other
sys.exc_info behavior around function calls.

--
components: Interpreter Core
files: exc_info.patch
keywords: patch
messages: 87452
nosy: collinwinter, jyasskin
priority: low
severity: normal
stage: needs patch
status: open
title: sys.exc_info leaks into a generator
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1
Added file: http://bugs.python.org/file13927/exc_info.patch

___
Python tracker 

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



[issue5970] sys.exc_info leaks into a generator

2009-05-08 Thread Jeffrey Yasskin

Jeffrey Yasskin  added the comment:

I think we should _not_ backport any fix for this bug to the 2.6 series,
since any changes to user behavior would be pretty subtle. To prevent
that backport, I'd like to apply exc_info_26.patch to the 2.6 branch,
with Barry's approval.

--
assignee:  -> barry
nosy: +barry
Added file: http://bugs.python.org/file13928/exc_info_26.patch

___
Python tracker 

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



[issue5970] sys.exc_info leaks into a generator

2009-05-10 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Adding some tests to check that a bug is /not/ fixed looks weird to me.
If we did that for every trunk change that we don't want to end up in
the stable branch, there'd be lots of new tests of dubious utility.

Besides, py3k isn't affected ;)

--
nosy: +pitrou
versions:  -Python 3.1

___
Python tracker 

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



[issue5970] sys.exc_info leaks into a generator

2009-05-10 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

I agree with Antoine.

--
versions:  -Python 2.6

___
Python tracker 

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



[issue5970] sys.exc_info leaks into a generator

2009-05-10 Thread Jeffrey Yasskin

Jeffrey Yasskin  added the comment:

Re py3k: oops, thanks for checking.

Re 2.6: Fine with me, second patch removed.

--
assignee: barry -> 

___
Python tracker 

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



[issue5970] sys.exc_info leaks into a generator

2009-05-10 Thread Jeffrey Yasskin

Changes by Jeffrey Yasskin :


Removed file: http://bugs.python.org/file13928/exc_info_26.patch

___
Python tracker 

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