Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7c5ba51

Browse files
committed
#14494: Document that absolute imports became default in 3.0 instead of 2.7.
2 parents ed1183d + 079bfc9 commit 7c5ba51

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

Doc/library/__future__.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ language using this mechanism:
7575
| division | 2.2.0a2 | 3.0 | :pep:`238`: |
7676
| | | | *Changing the Division Operator* |
7777
+------------------+-------------+--------------+---------------------------------------------+
78-
| absolute_import | 2.5.0a1 | 2.7 | :pep:`328`: |
78+
| absolute_import | 2.5.0a1 | 3.0 | :pep:`328`: |
7979
| | | | *Imports: Multi-Line and Absolute/Relative* |
8080
+------------------+-------------+--------------+---------------------------------------------+
8181
| with_statement | 2.5.0a1 | 2.6 | :pep:`343`: |

Lib/__future__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def __repr__(self):
114114
CO_FUTURE_DIVISION)
115115

116116
absolute_import = _Feature((2, 5, 0, "alpha", 1),
117-
(2, 7, 0, "alpha", 0),
117+
(3, 0, 0, "alpha", 0),
118118
CO_FUTURE_ABSOLUTE_IMPORT)
119119

120120
with_statement = _Feature((2, 5, 0, "alpha", 1),

Misc/NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ What's New in Python 3.3.0 Alpha 4?
1010
Core and Builtins
1111
-----------------
1212

13+
- Issue #14494: Fix __future__.py and its documentation to note that
14+
absolute imports are the default behavior in 3.0 instead of 2.7.
15+
Patch by Sven Marnach.
16+
1317
- Issue #9260: A finer-grained import lock. Most of the import sequence
1418
now uses per-module locks rather than the global import lock, eliminating
1519
well-known issues with threads and imports.

0 commit comments

Comments
 (0)