--- id: future version: "1.0.0" license: MIT license_treatment: permissive maintenance: active --- # future — Clean single-source support for Python 3 and 2 License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install future uv add future poetry add future ## Description 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... ## AI interpretation — verify before relying Provides Python 3 compatibility shims and backported builtins to write single-source code that runs on both Python 2 and Python 3, plus a conversion tool (futurize) to aid migration. Verdict: Stable, actively maintained compatibility layer with zero security vulnerabilities and no install friction. Suitable for projects needing to support both Python 2 and 3 from a single codebase, though Python 2 itself is end-of-life and this package is primarily valuable for legacy codebases or gradual migration scenarios. [View on SkillFed](https://skillfed.io/packages/future) · [View on PyPI](https://pypi.org/project/future/)