Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop importing from py #462

Merged
merged 1 commit into from
Oct 25, 2022
Merged

Conversation

The-Compiler
Copy link
Member

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: pytest-dev/pytest#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.

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:
pytest-dev/pytest#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
Copy link
Member

Thanks!

@nicoddemus nicoddemus merged commit f7ec128 into pytest-dev:master Oct 25, 2022
@The-Compiler
Copy link
Member Author

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

@nicoddemus
Copy link
Member

Yep!

@vkbo
Copy link

vkbo commented Oct 25, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants