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

Update packaging-projects.rst: rephrase first explanation of __init__.py #1538

Merged
merged 2 commits into from
May 20, 2024

Conversation

wyattscarpenter
Copy link
Contributor

@wyattscarpenter wyattscarpenter commented May 3, 2024

I thought the explanation of init.py was kind of confusing, so I have improved it somewhat.


📚 Documentation preview 📚: https://python-packaging-user-guide--1538.org.readthedocs.build/en/1538/

@abravalheri
Copy link
Contributor

abravalheri commented May 3, 2024

To be honest, that is still a weak reasoning1.

Users can import a directory even if it does not have an __init__.py. Sure, it will not be a "regular" package, it will be a "namespace" package, but the text does not explain what is so great about regular packages and why they are recommended over namespaces.

Footnotes

  1. The original text had weak reasoning. This is not a problem this PR is introducing. In that respect things are more or less the same.

@wyattscarpenter
Copy link
Contributor Author

This is true.

On the other hand, I guess most users do want a regular package, and if so then there's some virtue in glossing over the exceptions in this very early guide. (There is at least a footnote to explain what is being glossed over.)

@chrysle chrysle added this pull request to the merge queue May 20, 2024
Merged via the queue into pypa:main with commit 9d2e58f May 20, 2024
5 checks passed
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.

None yet

3 participants