classification
Title: __future__.py and its documentation claim absolute imports became mandatory in 2.7, but they didn't
Type: behavior Stage: resolved
Components: Documentation, Library (Lib) Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, eric.snow, petri.lehtinen, python-dev, smarnach
Priority: normal Keywords: patch

Created on 2012-04-04 12:53 by smarnach, last changed 2012-05-19 15:47 by petri.lehtinen. This issue is now closed.

Files
File name Uploaded Description Edit
absolute_import.patch smarnach, 2012-04-04 12:53 review
Messages (3)
msg157474 - (view) Author: Sven Marnach (smarnach) Date: 2012-04-04 12:53
As has been pointed out before on python-dev [1], the mandatory version of '__future__.absolute_import' does not match reality.  In Python 2.7, absolute imports are not the default.

[1]: http://article.gmane.org/gmane.comp.python.devel/125446

The attached patch should fix the documentation and Lib/__future__.py.  I set the mandatory version to (3, 0, 0, "alpha", 0), in accordance with other features that became mandatory in Py3k, though there never was a 3.0a0 release.  I double-checked that absolute imports already were the default in 3.0a1.

The patch should probably be applied to all branches.
msg161131 - (view) Author: Roundup Robot (python-dev) Date: 2012-05-19 15:41
New changeset cc9e5ddd8220 by Petri Lehtinen in branch '2.7':
#14494: Document that absolute imports became default in 3.0 instead of 2.7.
http://hg.python.org/cpython/rev/cc9e5ddd8220

New changeset 7cdc1392173f by Petri Lehtinen in branch '3.2':
#14494: Document that absolute imports became default in 3.0 instead of 2.7.
http://hg.python.org/cpython/rev/7cdc1392173f

New changeset 26661d9bbb36 by Petri Lehtinen in branch 'default':
#14494: Document that absolute imports became default in 3.0 instead of 2.7.
http://hg.python.org/cpython/rev/26661d9bbb36
msg161133 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2012-05-19 15:47
Fixed, thanks for the patch.

BTW, you should sign the PSF Contributor Agreement. See http://www.python.org/psf/contrib/.
History
Date User Action Args
2012-05-19 15:47:50petri.lehtinensetstatus: open -> closed
resolution: fixed
messages: + msg161133

stage: patch review -> resolved
2012-05-19 15:41:51python-devsetnosy: + python-dev
messages: + msg161131
2012-05-15 13:24:50petri.lehtinensetnosy: + petri.lehtinen
2012-04-05 00:58:11eric.snowsetnosy: + eric.snow
2012-04-04 14:29:12r.david.murraysetstage: patch review
versions: - Python 2.6, Python 3.1
2012-04-04 12:53:05smarnachcreate