pyinvoke / invocations

Reusable Invoke tasks
http://invocations.readthedocs.io
BSD 2-Clause "Simplified" License
163 stars 28 forks source link

Test suite failure: "Direct construction of SpecModule has been deprecated, please use SpecModule.from_parent." #29

Open samuela opened 2 years ago

samuela commented 2 years ago

When running the test suite with inv test I'm getting the following error:

============================= test session starts ==============================
platform darwin -- Python 3.9.10, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 -- /nix/store/mqdppmn4n37dkqwx71g88a8pa5h676gj-python3-3.9.10/bin/python3.9
cachedir: .pytest_cache
rootdir: /private/tmp/nix-build-python3.9-invocations-2.6.0.drv-0/source, configfile: pytest.ini, testpaths: tests
plugins: relaxed-1.1.5
collected 0 items / 1 error                                                    

==================================== ERRORS ====================================
________________________ ERROR collecting test session _________________________
Direct construction of SpecModule has been deprecated, please use SpecModule.from_parent.
See https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent for more details.
=============================== warnings summary ===============================
../../../../nix/store/mq15vnx91rm5vzdkf1qnixs5p9k5py2g-python3.9-pytest-6.2.5/lib/python3.9/site-packages/_pytest/assertion/rewrite.py:170
  /nix/store/mq15vnx91rm5vzdkf1qnixs5p9k5py2g-python3.9-pytest-6.2.5/lib/python3.9/site-packages/_pytest/assertion/rewrite.py:170: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    exec(co, module.__dict__)

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
ERROR 
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
========================= 1 warning, 1 error in 0.17s ==========================

What am I doing wrong? What versions of pytest are supported?