pyinvoke / invoke

Pythonic task management & command execution.
http://pyinvoke.org
BSD 2-Clause "Simplified" License
4.38k stars 367 forks source link

DeprecationWarning: inspect.getargspec() is deprecated #859

Closed MarcSkovMadsen closed 2 years ago

MarcSkovMadsen commented 2 years ago

When I run my pytest I see

.venv\lib\site-packages\invoke\tasks.py:153: 11 warnings
  c:\repos\trading_analytics\data-cli-invoke\product\mt-devops-cli\.venv\lib\site-packages\invoke\tasks.py:153: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
    spec = inspect.getargspec(func)

Versions

invoke==1.7.1 pytest==7.1.2

neozenith commented 2 years ago

Hi thanks for rasising this issue, this is actually part of #357 where we need to migrate the usage of getargspec to getfullargspec.

I'd encourage following that issue instead as that is where we are curating discussions.

Currently there are efforts to remove Python2 which will make addressing the backlog of issues easier once we drop 7 supported versions of python down to 4-5 versions