This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Python 3 Module doc still sounds like __init__.py is required
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.7, Python 3.6, Python 3.3, Python 3.4, Python 3.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: James O, brett.cannon, docs@python, marco.buttu, methane
Priority: normal Keywords:

Created on 2017-03-03 21:26 by James O, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (5)
msg288932 - (view) Author: James O (James O) Date: 2017-03-03 21:26
PEP 420 says "Allowing implicit namespace packages means that the requirement to provide an __init__.py file can be dropped completely..."
(as described here:  http://stackoverflow.com/questions/37139786/is-init-py-not-required-for-packages-in-python-3)

The documentation for modules <https://docs.python.org/3/tutorial/modules.html> doesn't seem to reflect this change. 

My "enhancement suggestion" is that a sentence (and perhaps an example) be added that explicitly states or shows an import from another directory.

(P.S. This is my first Python bug submission, so if it's silly, let me know. Thanks!)
msg288951 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2017-03-04 04:45
namespace package is very advanced topic.
I don't think tutorial should mention it.
Putting __init__.py always in normal package is highly recommended.
Otherwise, many tools can't distinguish normal directory and python package.

2017/03/04 午前6:26 "James O" <report@bugs.python.org>:

New submission from James O:

PEP 420 says "Allowing implicit namespace packages means that the
requirement to provide an __init__.py file can be dropped completely..."
(as described here:  http://stackoverflow.com/questions/37139786/is-init-py-
not-required-for-packages-in-python-3)

The documentation for modules <https://docs.python.org/3/
tutorial/modules.html> doesn't seem to reflect this change.

My "enhancement suggestion" is that a sentence (and perhaps an example) be
added that explicitly states or shows an import from another directory.

(P.S. This is my first Python bug submission, so if it's silly, let me
know. Thanks!)

----------
assignee: docs@python
components: Documentation
messages: 288932
nosy: James O, docs@python
priority: normal
severity: normal
status: open
title: Python 3 Module doc still sounds like __init__.py is required
type: enhancement
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue29716>
_______________________________________
_______________________________________________
docs mailing list
docs@python.org
https://mail.python.org/mailman/listinfo/docs
msg288953 - (view) Author: James O (James O) Date: 2017-03-04 04:52
Ah, I didn't realize some tools depended on it. Should I set the status to closed? (like I said, I'm new to this)
msg288960 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2017-03-04 05:20
I think so.
namespace package is topic for packaging ecosystem developers, like
setuptools and pip.
Normal python programmer shouldn't omit __init__.py.
Python tutorial is for people who want to be normal python programmer.

2017/03/04 午後1:53 "James O" <report@bugs.python.org>:

>
> James O added the comment:
>
> Ah, I didn't realize some tools depended on it. Should I set the status to
> closed? (like I said, I'm new to this)
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue29716>
> _______________________________________
>
msg289123 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2017-03-06 18:44
I've gone ahead and closed this. Thanks for taking the time to check in on this, James!
History
Date User Action Args
2022-04-11 14:58:43adminsetgithub: 73902
2017-03-06 18:44:11brett.cannonsetstatus: open -> closed

nosy: + brett.cannon
messages: + msg289123

resolution: not a bug
stage: resolved
2017-03-04 16:35:48marco.buttusetnosy: + marco.buttu
2017-03-04 05:20:37methanesetmessages: + msg288960
2017-03-04 04:52:59James Osetmessages: + msg288953
2017-03-04 04:45:15methanesetnosy: + methane
messages: + msg288951
2017-03-03 21:26:26James Ocreate