【发布时间】:2015-05-25 15:42:44
【问题描述】:
我有一组 Python 3 单元测试,当使用此命令行执行时:
python3 -m unittest discover -f -v
...正在生成 PendingDeprecationWarning:
/usr/local/Cellar/python3/3.4.2/Frameworks/Python.framework/Versions/3.4/lib/python3.4/imp.py:32:
PendingDeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
是否有一种简单的方法可以让我跟踪哪段代码最终使用imp.py,也许是通过打开某种形式的堆栈跟踪?我已经缩小了一些范围;它似乎只在我使用freezegun 时触发。但是,freezegun 本身似乎并没有使用 imp。
【问题讨论】:
标签: python-3.x deprecated freezegun