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 <rep...@bugs.python.org> <http://bugs.python.org/issue19379> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com