[Python-checkins] cpython (2.7): #14494: Document that absolute imports became default in 3.0 instead of 2.7.

petri.lehtinen python-checkins at python.org
Sat May 19 17:41:50 CEST 2012


http://hg.python.org/cpython/rev/cc9e5ddd8220
changeset:   77054:cc9e5ddd8220
branch:      2.7
parent:      77051:ff0fd7b26219
user:        Petri Lehtinen <petri at digip.org>
date:        Sat May 19 18:34:06 2012 +0300
summary:
  #14494: Document that absolute imports became default in 3.0 instead of 2.7.

files:
  Doc/library/__future__.rst |  2 +-
  Lib/__future__.py          |  2 +-
  Misc/ACKS                  |  1 +
  Misc/NEWS                  |  4 ++++
  4 files changed, 7 insertions(+), 2 deletions(-)


diff --git a/Doc/library/__future__.rst b/Doc/library/__future__.rst
--- a/Doc/library/__future__.rst
+++ b/Doc/library/__future__.rst
@@ -75,7 +75,7 @@
 | division         | 2.2.0a2     | 3.0          | :pep:`238`:                                 |
 |                  |             |              | *Changing the Division Operator*            |
 +------------------+-------------+--------------+---------------------------------------------+
-| absolute_import  | 2.5.0a1     | 2.7          | :pep:`328`:                                 |
+| absolute_import  | 2.5.0a1     | 3.0          | :pep:`328`:                                 |
 |                  |             |              | *Imports: Multi-Line and Absolute/Relative* |
 +------------------+-------------+--------------+---------------------------------------------+
 | with_statement   | 2.5.0a1     | 2.6          | :pep:`343`:                                 |
diff --git a/Lib/__future__.py b/Lib/__future__.py
--- a/Lib/__future__.py
+++ b/Lib/__future__.py
@@ -112,7 +112,7 @@
                     CO_FUTURE_DIVISION)
 
 absolute_import = _Feature((2, 5, 0, "alpha", 1),
-                           (2, 7, 0, "alpha", 0),
+                           (3, 0, 0, "alpha", 0),
                            CO_FUTURE_ABSOLUTE_IMPORT)
 
 with_statement = _Feature((2, 5, 0, "alpha", 1),
diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -544,6 +544,7 @@
 Vladimir Marangozov
 David Marek
 Doug Marien
+Sven Marnach
 Alex Martelli
 Anthony Martin
 Sébastien Martini
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -9,6 +9,10 @@
 Core and Builtins
 -----------------
 
+- Issue #14494: Fix __future__.py and its documentation to note that
+  absolute imports are the default behavior in 3.0 instead of 2.7.
+  Patch by Sven Marnach.
+
 - Issue #14761: Fix potential leak on an error case in the import machinery.
 
 - Issue #14699: Fix calling the classmethod descriptor directly.

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list