【发布时间】:2020-05-21 20:33:46
【问题描述】:
我有使用python3.6 的项目,我使用pytest 进行测试。一切正常,但是当我运行 py.test 时突然收到此警告消息
===============警告总结===========
/usr/local/lib/python3.6/dist-packages/gevent/monkey.py:685
/usr/local/lib/python3.6/dist-packages/gevent/monkey.py:685: 弃用警告:inspect.getargspec() 自 Python 以来已弃用 3.0,使用inspect.signature() 或inspect.getfullargspec() patch_all_args = getargspec(patch_all)[0] # pylint:disable=deprecated-method
首先,我没有改变任何东西。其次,警告是针对monkey.py 中的python3.6。
为什么我应该在我的项目中收到这个警告,我该如何解决这个问题?
【问题讨论】:
-
它告诉您
monkey.py正在使用已弃用的方法。如果可能,您可以通过升级gevent来解决此问题,或者您可以更新您的pytest配置以忽略DeprecationWarning
标签: python python-3.x pytest