skillfed

mo-future

More future! Make Python 2/3 compatibility a bit easier

mo-future v7.685.25166 342.9K downloads/30d#7,391 on PyPI2
Copyleft license MPL 2.0 AGING released

What it is and what it does

mo-future is a Python 2/3 compatibility shim designed to simplify migration of legacy Python 2 code to Python 3. Rather than hunting through sub-modules of larger compatibility libraries like `future` or `six`, it flattens all commonly needed compatibility imports into a single top-level `mo_future` namespace. This eliminates the need for conditional imports or try-except blocks when accessing types like StringIO or text across Python versions.

The package targets codebases that still carry Python 2 logic but need to run on modern Python 3 versions. It has been marked Production/Stable and supports Python 3.8 through 3.13, though it no longer points to Python 2 modules as of December 2022. With no runtime dependencies, it adds minimal friction to any project.

Use it for:

  • Migrating legacy Python 2 codebases to Python 3 without rewriting all compatibility imports at once
  • Simplifying StringIO imports that differ between Python 2 and 3 standard libraries
  • Centralizing text type handling across Python versions in a single import statement
  • Reducing boilerplate in projects that still contain Python 2-era code patterns

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a flat-namespace compatibility layer for Python 2/3 code migration, consolidating commonly needed imports into a single `mo_future` module to avoid discovering them across multiple sub-modules.

Yes, if you are actively maintaining Python 2 legacy code that needs to run on Python 3. The flat namespace genuinely simplifies compatibility imports compared to larger libraries. However, the aging maintenance status (425 days since last release) and small user base (2 GitHub stars) suggest this is a niche tool—if you are starting a new project or have already fully migrated to Python 3, it offers no value.

Install

mo-future on PyPI

pip

pip install mo-future

uv

uv add mo-future

poetry

poetry add mo-future

Installing mo-future

Before you install

Low install friction with no runtime dependencies. Maintenance status is aging—last release was 425 days ago, though the repository remains active with a recent commit on 2025-06-15.

License in practice

Licensed under MPL 2.0 (copyleft). Users must comply with copyleft obligations if they modify and distribute the package; proprietary projects using it unmodified face no additional restrictions.

Quickstart

pip install mo-future

from mo_future import StringIO, text

# Use StringIO and text type directly without version checks
output = StringIO()
output.write(text("hello"))

Verify before relying

  • Whether the package still actively maintains Python 2 compatibility code or has fully migrated to Python 3-only internals as of December 2022
  • Specific list of all compatibility types and utilities exposed in the mo_future namespace beyond StringIO and text

Package facts

License MPL 2.0 (copyleft)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance aging — 425 days since the last release
Last repo commit
First released
Downloads 342,902/month — #7,391 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: mo_future-7.685.25166-py3-none-any.whl

Development Status :: 5 - Production/StableLicense :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules

Tags

python 2 to 3 compatibilitypython 2 3 migration helpersunified compatibility importsstringio and text type importsfuture library alternativesimplified python compatibility
python2-migrationcompatibility-shim

More Libraries packages