This is a bug-fix release:
This is a bug-fix release:
This is a minor bug-fix release:
This is a major new release that offers a cleaner interface for most imports in Python 2/3 compatible code.
Instead of this interface:
>>> from future.builtins import str, open, range, dict
>>> from future.standard_library import hooks
>>> with hooks():
... import queue
... import configparser
... import tkinter.dialog
... # etc.
you can now use the following interface for much Python 2/3 compatible code:
>>> # Alias for future.builtins on Py2:
>>> from builtins import str, open, range, dict
>>> # Alias for future.moves.* on Py2:
>>> import queue
>>> import configparser
>>> import tkinter.dialog
>>> etc.
Notice that the above code will run on Python 3 even without the presence of the future package. Of the 44 standard library modules that were refactored with PEP 3108, 30 are supported with direct imports in this manner. (These are listed here: List of renamed standard library modules.)
The other 14 standard library modules that kept the same top-level names in Py3.x are not supported with this direct import interface on Py2. These include the 5 modules in the Py3 urllib package. These modules are accessible through the following interface (as well as the interfaces offered in previous versions of python-future):
from future.standard_library import install_aliases
install_aliases()
from collections import UserDict, UserList, UserString
import dbm.gnu
from itertools import filterfalse, zip_longest
from subprocess import getoutput, getstatusoutput
from sys import intern
import test.support
from urllib.request import urlopen
from urllib.parse import urlparse
# etc.
from collections import Counter, OrderedDict # backported to Py2.6
The complete list of packages supported with this interface is here: List of refactored standard library modules.
For more information on these and other interfaces to the standard library, see Standard library imports.
The project folder structure has changed. Top-level packages are now in a src folder and the tests have been moved into a project-level tests folder.
The following deprecated internal modules have been removed (issue #80):
The following internal functions have been deprecated and will be removed in a future release:
See Changes in previous versions for versions prior to v0.14.