Skip to content

Commit 4559acb

Browse files
committed
New multi-level urllib import capability
1 parent 063baa1 commit 4559acb

File tree

21 files changed

+74
-7
lines changed

21 files changed

+74
-7
lines changed

docs/standard_library_imports.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ The first interface is via a context-manager called ``hooks``::
2525
from collections import UserList
2626
from itertools import filterfalse, zip_longest
2727
from http.client import HttpConnection
28+
import urllib.request
2829
# and other moved modules and definitions
2930

3031
Direct interface

future/moves/_markupbase.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
if PY3:
55
from _markupbase import *
66
else:
7+
__future_module__ = True
78
from markupbase import *

future/moves/html/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
if PY3:
55
from html import *
66
else:
7+
__future_module__ = True
8+
79
# cgi.escape isn't good enough for the single Py3.3 html test to pass.
810
# Define it inline here instead. From the Py3.3 stdlib
911
"""

future/moves/html/entities.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
if PY3:
55
from html.entities import *
66
else:
7+
__future_module__ = True
78
from htmlentitydefs import *

future/moves/html/parser.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
if PY3:
55
from html.parser import *
66
else:
7+
__future_module__ = True
78
from HTMLParser import *

future/moves/http/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from future.utils import PY3
2+
3+
if not PY3:
4+
__future_module__ = True

future/moves/http/client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
from http.client import *
55
else:
66
from httplib import *
7+
__future_module__ = True

future/moves/http/cookiejar.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
if PY3:
55
from http.cookiejar import *
66
else:
7+
__future_module__ = True
78
from cookielib import *

future/moves/http/cookies.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
if PY3:
55
from http.cookies import *
66
else:
7+
__future_module__ = True
78
from Cookie import *
89
from Cookie import Morsel # left out of __all__ on Py2.7!

future/moves/http/server.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
if PY3:
55
from http.server import *
66
else:
7+
__future_module__ = True
78
from BaseHTTPServer import *
89
from CGIHTTPServer import *
910
from SimpleHTTPServer import *

0 commit comments

Comments
 (0)