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

Fix compatibility with pytest 7.2 #106

Merged
merged 1 commit into from Oct 26, 2022

Conversation

The-Compiler
Copy link
Contributor

With pytest 7.2, the remaining parts of the "py.path" library got vendored, to get rid of the dependency: pytest-dev/pytest#10396

However, this breaks due to pytest_mypy_plugins importing private API:

File ".../pytest_mypy_plugins/collect.py", line 13, in <module>
    from py._path.local import LocalPath
ModuleNotFoundError: No module named 'py._path'; 'py' is not a package

Use py.path.local instead (the public name of the same type), which is part of the shim included in pytest.

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Can you please run isort to fix imports? (or do it manually)?

With pytest 7.2, the remaining parts of the "py.path" library got vendored, to
get rid of the dependency: pytest-dev/pytest#10396

However, this breaks due to pytest_mypy_plugins importing private API:

    File ".../pytest_mypy_plugins/collect.py", line 13, in <module>
        from py._path.local import LocalPath
    ModuleNotFoundError: No module named 'py._path'; 'py' is not a package

Use py.path.local instead (the public name of the same type), which is part of
the shim included in pytest.
@The-Compiler
Copy link
Contributor Author

just did so! Looks like you need to kick the CI again.

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again! Related: typeddjango/django-stubs#1203

@sobolevn sobolevn merged commit e212be4 into typeddjango:master Oct 26, 2022
@sobolevn
Copy link
Member

I will make a new release today!

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

Successfully merging this pull request may close these issues.

None yet

2 participants