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

pytest: bring back direct imports of TempdirFactory, Testdir #9438

Merged
merged 1 commit into from Dec 27, 2021

Conversation

bluetech
Copy link
Member

The monkeypatch approach doesn't work for import pytest; pytest.TempdirFactory.

Fix #9432.

@bluetech bluetech added the needs backport applied to PRs, indicates that it should be ported to the current bug-fix branch label Dec 25, 2021
The monkeypatch approach doesn't work for `import pytest;
pytest.TempdirFactory`.

Fix pytest-dev#9432.
@bluetech
Copy link
Member Author

Adding the imports from _pytest.legacypath to pytest causes an import loop which necessitates all of the changes to the plugin to import from _pytest instead of pytest. This is unfortunate and will need to be undone when moving to a separate package but is required for now.

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Thanks for tackling this!

@bluetech bluetech merged commit 69da199 into pytest-dev:main Dec 27, 2021
bluetech added a commit to bluetech/pytest that referenced this pull request Dec 27, 2021
…ports

pytest: bring back direct imports of TempdirFactory, Testdir
(cherry picked from commit 69da199)
@bluetech bluetech deleted the pytest-legacypath-imports branch December 27, 2021 15:03
@The-Compiler The-Compiler added backported PR has been backported to the current bug-fix branch and removed needs backport applied to PRs, indicates that it should be ported to the current bug-fix branch labels Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported PR has been backported to the current bug-fix branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[prerelease] pytest.TmpdirFactory is not importable anymore
3 participants