[New-bugs-announce] [issue19379] Don't import linecache at warnings toplevel

Antoine Pitrou report at bugs.python.org
Thu Oct 24 22:09:10 CEST 2013


New submission from Antoine Pitrou:

Importing warnings pulls linecache at the top-level, while it's only necessary when printing warnings. The reason why it wasn't done lazily is obsolete, since Python now has per-module import locks. Attached patch makes the linecache imports lazy.

This is desirable for issue #19375.

----------
components: Library (Lib)
files: warnings_lazy.patch
keywords: patch
messages: 201174
nosy: brett.cannon, christian.heimes, pitrou
priority: normal
severity: normal
stage: patch review
status: open
title: Don't import linecache at warnings toplevel
type: resource usage
versions: Python 3.4
Added file: http://bugs.python.org/file32340/warnings_lazy.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19379>
_______________________________________


More information about the New-bugs-announce mailing list