@@ -38,21 +38,22 @@ reorganization), 30 are supported with direct imports. (These are listed here:
3838The other 14 standard library modules that kept the same top-level names in
3939Py3.x are not supported with this direct import interface on Py2. These include
4040the 5 modules in the Py3 ``urllib `` package. (These are listed here:
41- :ref: `_list-standard-library-refactored `.) These are accessible through the usual
42- mechanisms::
43-
44- >>> from future.standard_library import hooks
45- >>> with hooks():
46- ... from collections import UserDict, UserList, UserString
47- ... import dbm.gnu
48- ... from itertools import filterfalse, zip_longest
49- ... from subprocess import getoutput, getstatusoutput
50- ... from sys import intern
51- ... import test.support
52- ... from urllib.request import urlopen
53- ... from urllib.parse import urlparse
54- ... # etc.
55- ... from collections import Counter, OrderedDict # backported to Py2.6
41+ :ref: `_list-standard-library-refactored `.) These are accessible through the following
42+ interface (as well as the previous mechanisms)::
43+
44+ from future.standard_library import install_aliases
45+ install_aliases()
46+
47+ from collections import UserDict, UserList, UserString
48+ import dbm.gnu
49+ from itertools import filterfalse, zip_longest
50+ from subprocess import getoutput, getstatusoutput
51+ from sys import intern
52+ import test.support
53+ from urllib.request import urlopen
54+ from urllib.parse import urlparse
55+ # etc.
56+ from collections import Counter, OrderedDict # backported to Py2.6
5657
5758
5859What's new in version 0.13.2
0 commit comments