This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Wrong stacklevel in warning for contextlib.nested
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.1, Python 2.7
process
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 2022-04-11 14:56 by admin. This issue is now closed.

Files
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/contextlib.py:17: 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
History
Date User Action Args
2022-04-11 14:56:49adminsetgithub: 50505
2009-06-10 16:15:46rhettingersetstatus: open -> closed

nosy: + rhettinger
messages: + msg89211

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