pytest-dev / pytest-qt

pytest plugin for Qt (PyQt5/PyQt6 and PySide2/PySide6) application testing
https://pytest-qt.readthedocs.io
MIT License
409 stars 70 forks source link

Stop importing from py #462

Closed The-Compiler closed 2 years ago

The-Compiler commented 2 years ago

py._code has been moved to _pytest._code with pytest 2.9.0: https://docs.pytest.org/en/latest/changelog.html#id395

We still imported from py._code without actually depending from py. While this happened to work, it now breaks due to pytest dropping py: https://github.com/pytest-dev/pytest/pull/10396

Resulting in:

File ".../src/pytestqt/logging.py", line 5, in <module>
    from py._code.code import TerminalRepr, ReprFileLocation
ModuleNotFoundError: No module named 'py._code'; 'py' is not a package

with the latest pytest main.

nicoddemus commented 2 years ago

Thanks!

The-Compiler commented 2 years ago

Thank you for the quick merge! I assume you're planning to cut a new release after the currently open PRs are in?

nicoddemus commented 2 years ago

Yep!

vkbo commented 2 years ago

Thanks for the quick fix! I just discovered this error now and was investigating. And thanks for making the release so fast.