New submission from Markus Gerstel:
Running 'import logging' causes at minimum 46 failing 'open' and 12 failing
'stat' calls because python looks for packages inside python/Lib/logging which
will never be there, in particular: sys, os, time, cStringIO, traceback,
warnings, weakref, collections, codecs, thread, threading, atexit.
The impact of this is limited when python is installed locally, but noticeable
when run on a networked file system.
How to reproduce:
run
$ strace python -c "import logging;" 2>&1 | grep ENOENT | grep "\/logging\/"
How to fix:
Add 'from __future__ import absolute_import' to all files in the logging
directory.
A relevant patch is attached.
--
components: Library (Lib)
files: 0001-absolute-import.patch
keywords: patch
messages: 286083
nosy: mgerstel
priority: normal
severity: normal
status: open
title: absolute imports for logging
type: resource usage
versions: Python 2.7
Added file: http://bugs.python.org/file46390/0001-absolute-import.patch
___
Python tracker
<http://bugs.python.org/issue29351>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com