Title: Wrong stacklevel in warning for contextlib.nested
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.1, Python 2.7
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: hagen, rhettinger
Priority: normal Keywords: patch

Created on 2009-06-10 16:08 by hagen, last changed 2009-06-10 16:15 by rhettinger. This issue is now closed.

File name Uploaded Description Edit
warning_stacklevel.patch hagen, 2009-06-10 16:08
Messages (2)
msg89209 - (view) Author: Hagen F├╝rstenau (hagen) Date: 2009-06-10 16:08
This leads to unhelpful warnings:

>>> with contextlib.nested(open("x", "w")) as f: pass
/usr/local/lib/python3.1/ DeprecationWarning:
With-statements now directly support multiple context managers
  return next(self.gen)

Patch is attached.
msg89211 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2009-06-10 16:15
Fixed.  r73333 and r73334
Date User Action Args
2009-06-10 16:15:46rhettingersetstatus: open -> closed

nosy: + rhettinger
messages: + msg89211

assignee: rhettinger
resolution: accepted
2009-06-10 16:08:09hagencreate