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

gh-113208: Mention namespace packages don't require __init__.py #113209

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news awaiting review labels Dec 16, 2023
@Unique-Usman Unique-Usman changed the title Added case where __init__.py is not required to make a package gh-113208: Added case where __init__.py is not required to make a package Dec 16, 2023
@CAM-Gerlach CAM-Gerlach changed the title gh-113208: Added case where __init__.py is not required to make a package gh-113208: Mention namespace packages don't require __init__.py Dec 16, 2023
@Unique-Usman
Copy link
Contributor Author

@hugovk @CAM-Gerlach check this out.

@CAM-Gerlach CAM-Gerlach added needs backport to 3.11 only security fixes needs backport to 3.12 bug and security fixes labels Dec 16, 2023
Copy link
Member

@CAM-Gerlach CAM-Gerlach left a comment

Choose a reason for hiding this comment

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

Thanks, @Unique-Usman . I added one suggestion to fix a typo; apply it by clicking Commit Suggestion, or together with others by going to the Files changed tab, clicking Add suggestion to batch for each suggestion, and then Commit. Otherwise, LGTM as far as my input goes

Doc/tutorial/modules.rst Outdated Show resolved Hide resolved
Co-authored-by: C.A.M. Gerlach <[email protected]>
Copy link
Member

@CAM-Gerlach CAM-Gerlach left a comment

Choose a reason for hiding this comment

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

LGTM! @hugovk ?

@hugovk hugovk merged commit d71fcde into python:main Dec 19, 2023
20 checks passed
@hugovk
Copy link
Member

hugovk commented Dec 19, 2023

Thanks!

@miss-islington-app
Copy link

Thanks @Unique-Usman for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@bedevere-app
Copy link

bedevere-app bot commented Dec 19, 2023

GH-113276 is a backport of this pull request to the 3.12 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 19, 2023
…pythonGH-113209)

(cherry picked from commit d71fcde)

Co-authored-by: Unique-Usman <[email protected]>
Co-authored-by: C.A.M. Gerlach <[email protected]>
@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Dec 19, 2023
@bedevere-app
Copy link

bedevere-app bot commented Dec 19, 2023

GH-113277 is a backport of this pull request to the 3.11 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 19, 2023
…pythonGH-113209)

(cherry picked from commit d71fcde)

Co-authored-by: Unique-Usman <[email protected]>
Co-authored-by: C.A.M. Gerlach <[email protected]>
@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Dec 19, 2023
hugovk pushed a commit that referenced this pull request Dec 19, 2023
hugovk pushed a commit that referenced this pull request Dec 19, 2023
ryan-duve pushed a commit to ryan-duve/cpython that referenced this pull request Dec 26, 2023
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
@@ -437,7 +437,8 @@ When importing the package, Python searches through the directories on
``sys.path`` looking for the package subdirectory.

The :file:`__init__.py` files are required to make Python treat directories
containing the file as packages. This prevents directories with a common name,
containing the file as packages (unless using a :term:`namespace package`, a
relatively advanced feature). This prevents directories with a common name,
such as ``string``, from unintentionally hiding valid modules that occur later
Copy link
Member

Choose a reason for hiding this comment

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

So… this line is not true anymore 😢

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @merwok, could you provide a reference to the updated way, I can open a pr for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants