File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ hooks. The context-manager form works like this::
136136 from itertools import filterfalse
137137 import html.parser
138138 import queue
139+ from urllib.request import urlopen
139140
140141
141142Automatic conversion to Py2/3-compatible code
Original file line number Diff line number Diff line change @@ -34,9 +34,9 @@ Direct interface
3434The second interface avoids import hooks. It may therefore be more
3535robust, at the cost of less idiomatic code. Use it as follows::
3636
37- from future.standard_library import queue
38- from future.standard_library import socketserver
39- from future.standard_library .http.client import HTTPConnection
37+ from future.moves import queue
38+ from future.moves import socketserver
39+ from future.moves .http.client import HTTPConnection
4040 # etc.
4141
4242If you wish to achieve the effect of a two-level import such as this::
@@ -46,12 +46,12 @@ If you wish to achieve the effect of a two-level import such as this::
4646portably on both Python 2 and Python 3, note that Python currently does not
4747support syntax like this::
4848
49- from future.standard_library import http.client
49+ from future.moves import http.client
5050
5151One workaround (which ``six.moves `` also requires) is to replace the dot with
5252an underscore::
5353
54- import future.standard_library .http.client as http_client
54+ import future.moves .http.client as http_client
5555
5656``import_ `` and from_import functions
5757-----------------------------------------
You can’t perform that action at this time.
0 commit comments