PendingDeprecationWarning: the imp module is deprecated in favour of importlib · Issue #305 · nedbat/coveragepy (original) (raw)
Originally reported by hugovk (Bitbucket: hugovk, GitHub: hugovk)
How to reproduce:
import warnings
warnings.simplefilter('default')
import coverage
Actual result on Python 3.4:
/usr/lib/python3.4/imp.py:32: PendingDeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
PendingDeprecationWarning)
No warning on Python 2.6, 2.7, 3.2, 3.3 or PyPy.
Expected result: No warnings.
This happens when running tests for the Pillow project on Python 3.4 on Travis CI. For example: https://travis-ci.org/python-imaging/Pillow/jobs/24084189
(It just so happens that Pillow's tests are set up so warnings cause failures, but we'll ignore them for import coverage
for the time-being.)