Skip to content

Commit 131150d

Browse files
committed
Update docs
1 parent c528b4f commit 131150d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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

141142
Automatic conversion to Py2/3-compatible code

docs/standard_library_imports.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ Direct interface
3434
The second interface avoids import hooks. It may therefore be more
3535
robust, 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

4242
If 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::
4646
portably on both Python 2 and Python 3, note that Python currently does not
4747
support syntax like this::
4848

49-
from future.standard_library import http.client
49+
from future.moves import http.client
5050

5151
One workaround (which ``six.moves`` also requires) is to replace the dot with
5252
an 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
-----------------------------------------

0 commit comments

Comments
 (0)