Skip to content

Fix --import-mode=importlib when root contains __init__.py file #11420

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

Merged
merged 1 commit into from
Sep 10, 2023

Conversation

nicoddemus
Copy link
Member

We cannot have an empty module name when importing a __init__.py file that is at the rootdir.

Fixes #11417

We cannot have an empty module name when importing a `__init__.py` file that
is at the rootdir.

Fixes pytest-dev#11417
@nicoddemus nicoddemus added the needs backport applied to PRs, indicates that it should be ported to the current bug-fix branch label Sep 9, 2023
@nicoddemus nicoddemus merged commit e2acc1a into pytest-dev:main Sep 10, 2023
@nicoddemus nicoddemus deleted the 11417-root-as-package branch September 10, 2023 12:57
@nicoddemus nicoddemus added backport 7.4.x and removed needs backport applied to PRs, indicates that it should be ported to the current bug-fix branch labels Sep 10, 2023
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.

ValueError: PurePosixPath('.') has an empty name
2 participants