[Python-checkins] cpython (merge 3.2 -> default): #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:53 CEST 2012


http://hg.python.org/cpython/rev/26661d9bbb36
changeset: 77056:26661d9bbb36
parent: 77053:b78c67665a7f
parent: 77055:7cdc1392173f
user: Petri Lehtinen <petri at digip.org>
date: Sat May 19 18:38:27 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/NEWS | 4 ++++
 3 files changed, 6 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
@@ -114,7 +114,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/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,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 #9260: A finer-grained import lock. Most of the import sequence
 now uses per-module locks rather than the global import lock, eliminating
 well-known issues with threads and imports.
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /