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

Remove src/poetry/__init__.py to convert to namespace package #5614

Merged
merged 4 commits into from
May 30, 2022

Conversation

lafrenierejm
Copy link
Contributor

@lafrenierejm lafrenierejm commented May 16, 2022

Pull Request Check List

Resolves: #3735

  • Added tests for changed code. (Not applicable)
  • Updated documentation for changed code. (Not applicable)

The corresponding change was made in python-poetry/poetry-core@fa93845.

@lafrenierejm lafrenierejm changed the title Remove poetry.__init__ to convert to namespace package Remove src/poetry/__init__.py to convert to namespace package May 16, 2022
@lafrenierejm
Copy link
Contributor Author

Any ideas why pre-commit is failing?

@dimbleby
Copy link
Contributor

dimbleby commented May 16, 2022

pre-commit is failing because it explicitly bans implicit-namespace-packages:

- flake8-no-pep420==1.2.0
.

If this MR goes ahead you'll also need to fix things that are broken by implicit namespaces. mypy for instance, I think you'd want to set all of namespace_packages, explicit_package_bases, mypy_path - all as in poetry-core.

However, since poetry-core has already done this - python-poetry/poetry-core#251 - there is already no collision of __init__.py. So perhaps #3735 can simply be closed without further action?

@lafrenierejm
Copy link
Contributor Author

lafrenierejm commented May 29, 2022

If this MR goes ahead you'll also need to fix things that are broken by implicit namespaces. mypy for instance, I think you'd want to set all of namespace_packages, explicit_package_bases, mypy_path - all as in poetry-core.

Thanks for the tip. I have resolved the errors that CI was raising. This PR should now be mergeable if the maintainers so choose.

However, since poetry-core has already done this - python-poetry/poetry-core#251 - there is already no collision of __init__.py. So perhaps #3735 can simply be closed without further action?

AFAIK you are correct that there's no longer any technical reason this PR would be required. My personal preference would still be go ahead and make this package a proper PEP420 namespace package. If a third package is ever added to the poetry namespace, these same errors would arise again.

pyproject.toml Outdated Show resolved Hide resolved
@neersighted neersighted merged commit 31465a4 into python-poetry:master May 30, 2022
@lafrenierejm lafrenierejm deleted the namespace branch May 30, 2022 21:48
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

poetry/__init__.py is provided by both poetry and poetry-core
3 participants