future


Namefuture JSON
Version 0.16.0 PyPI version JSON
download
home_pagehttps://python-future.org
SummaryClean single-source support for Python 3 and 2
upload_time2016-10-27 20:07:22
maintainerNone
docs_urlhttp://pythonhosted.org/future/
authorEd Schofield
requires_pythonNone
licenseMIT
keywords future past python3 migration futurize backport six 2to3 modernize pasteurize 3to2
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            future: Easy, safe support for Python 2/3 compatibility
=======================================================

``future`` is the missing compatibility layer between Python 2 and Python
3. It allows you to use a single, clean Python 3.x-compatible codebase to
support both Python 2 and Python 3 with minimal overhead.

It is designed to be used as follows::

    from __future__ import (absolute_import, division,
                            print_function, unicode_literals)
    from builtins import (
             bytes, dict, int, list, object, range, str,
             ascii, chr, hex, input, next, oct, open,
             pow, round, super,
             filter, map, zip)

followed by predominantly standard, idiomatic Python 3 code that then runs
similarly on Python 2.6/2.7 and Python 3.3+.

The imports have no effect on Python 3. On Python 2, they shadow the
corresponding builtins, which normally have different semantics on Python 3
versus 2, to provide their Python 3 semantics.


Standard library reorganization
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

``future`` supports the standard library reorganization (PEP 3108) through the
following Py3 interfaces:

    >>> # Top-level packages with Py3 names provided on Py2:
    >>> import html.parser
    >>> import queue
    >>> import tkinter.dialog
    >>> import xmlrpc.client
    >>> # etc.

    >>> # Aliases provided for extensions to existing Py2 module names:
    >>> from future.standard_library import install_aliases
    >>> install_aliases()

    >>> from collections import Counter, OrderedDict   # backported to Py2.6
    >>> from collections import UserDict, UserList, UserString
    >>> import urllib.request
    >>> from itertools import filterfalse, zip_longest
    >>> from subprocess import getoutput, getstatusoutput


Automatic conversion
--------------------

An included script called `futurize
<http://python-future.org/automatic_conversion.html>`_ aids in converting
code (from either Python 2 or Python 3) to code compatible with both
platforms. It is similar to ``python-modernize`` but goes further in
providing Python 3 compatibility through the use of the backported types
and builtin functions in ``future``.


Documentation
-------------

See: http://python-future.org


Credits
-------

:Author:  Ed Schofield
:Sponsor: Python Charmers Pty Ltd, Australia, and Python Charmers Pte
          Ltd, Singapore. http://pythoncharmers.com
:Others:  See docs/credits.rst or http://python-future.org/credits.html


Licensing
---------
Copyright 2013-2016 Python Charmers Pty Ltd, Australia.
The software is distributed under an MIT licence. See LICENSE.txt.
            

Raw data

            {
    "maintainer": null, 
    "docs_url": "http://pythonhosted.org/future/", 
    "requires_python": null, 
    "maintainer_email": null, 
    "cheesecake_code_kwalitee_id": null, 
    "keywords": "future past python3 migration futurize backport six 2to3 modernize pasteurize 3to2", 
    "upload_time": "2016-10-27 20:07:22", 
    "author": "Ed Schofield", 
    "home_page": "https://python-future.org", 
    "download_url": "https://pypi.python.org/packages/00/2b/8d082ddfed935f3608cc61140df6dcbf0edea1bc3ab52fb6c29ae3e81e85/future-0.16.0.tar.gz", 
    "platform": "UNKNOWN", 
    "version": "0.16.0", 
    "cheesecake_documentation_id": null, 
    "description": "future: Easy, safe support for Python 2/3 compatibility\n=======================================================\n\n``future`` is the missing compatibility layer between Python 2 and Python\n3. It allows you to use a single, clean Python 3.x-compatible codebase to\nsupport both Python 2 and Python 3 with minimal overhead.\n\nIt is designed to be used as follows::\n\n    from __future__ import (absolute_import, division,\n                            print_function, unicode_literals)\n    from builtins import (\n             bytes, dict, int, list, object, range, str,\n             ascii, chr, hex, input, next, oct, open,\n             pow, round, super,\n             filter, map, zip)\n\nfollowed by predominantly standard, idiomatic Python 3 code that then runs\nsimilarly on Python 2.6/2.7 and Python 3.3+.\n\nThe imports have no effect on Python 3. On Python 2, they shadow the\ncorresponding builtins, which normally have different semantics on Python 3\nversus 2, to provide their Python 3 semantics.\n\n\nStandard library reorganization\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n``future`` supports the standard library reorganization (PEP 3108) through the\nfollowing Py3 interfaces:\n\n    >>> # Top-level packages with Py3 names provided on Py2:\n    >>> import html.parser\n    >>> import queue\n    >>> import tkinter.dialog\n    >>> import xmlrpc.client\n    >>> # etc.\n\n    >>> # Aliases provided for extensions to existing Py2 module names:\n    >>> from future.standard_library import install_aliases\n    >>> install_aliases()\n\n    >>> from collections import Counter, OrderedDict   # backported to Py2.6\n    >>> from collections import UserDict, UserList, UserString\n    >>> import urllib.request\n    >>> from itertools import filterfalse, zip_longest\n    >>> from subprocess import getoutput, getstatusoutput\n\n\nAutomatic conversion\n--------------------\n\nAn included script called `futurize\n<http://python-future.org/automatic_conversion.html>`_ aids in converting\ncode (from either Python 2 or Python 3) to code compatible with both\nplatforms. It is similar to ``python-modernize`` but goes further in\nproviding Python 3 compatibility through the use of the backported types\nand builtin functions in ``future``.\n\n\nDocumentation\n-------------\n\nSee: http://python-future.org\n\n\nCredits\n-------\n\n:Author:  Ed Schofield\n:Sponsor: Python Charmers Pty Ltd, Australia, and Python Charmers Pte\n          Ltd, Singapore. http://pythoncharmers.com\n:Others:  See docs/credits.rst or http://python-future.org/credits.html\n\n\nLicensing\n---------\nCopyright 2013-2016 Python Charmers Pty Ltd, Australia.\nThe software is distributed under an MIT licence. See LICENSE.txt.", 
    "lcname": "future", 
    "bugtrack_url": "", 
    "github": false, 
    "name": "future", 
    "license": "MIT", 
    "summary": "Clean single-source support for Python 3 and 2", 
    "split_keywords": [
        "future", 
        "past", 
        "python3", 
        "migration", 
        "futurize", 
        "backport", 
        "six", 
        "2to3", 
        "modernize", 
        "pasteurize", 
        "3to2"
    ], 
    "author_email": "ed@pythoncharmers.com", 
    "urls": [
        {
            "has_sig": false, 
            "upload_time": "2016-10-27T20:07:22", 
            "comment_text": "", 
            "python_version": "source", 
            "url": "https://pypi.python.org/packages/00/2b/8d082ddfed935f3608cc61140df6dcbf0edea1bc3ab52fb6c29ae3e81e85/future-0.16.0.tar.gz", 
            "md5_digest": "3e8e88a2bda48d54b1da7634d04760d7", 
            "downloads": 0, 
            "filename": "future-0.16.0.tar.gz", 
            "packagetype": "sdist", 
            "path": "00/2b/8d082ddfed935f3608cc61140df6dcbf0edea1bc3ab52fb6c29ae3e81e85/future-0.16.0.tar.gz", 
            "size": 824484
        }
    ], 
    "_id": null, 
    "cheesecake_installability_id": null
}