Install & Compatibility
Where this runs
tested against v1.0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 23.2MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.2s · import 0.000s · 24MB
21MB installed
● package 21MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
str
✓ from builtins import str
✗ from six import text_type
eight provides its own str from builtins via future
int
✓ from builtins import int
unicode
✓ for Python 2 compatibility: from builtins import str (eight unicode is str)
Prefer using str for both versions
Import future and eight for Python 2/3 compatible builtins.
from future.builtins import *
from eight import *
# Now you can write Python 3 code that works on Python 2
print(str('hello'))
Errors
Common errors & fixes
ImportError: No module named builtins
future package not installed or not in path.
AttributeError: module 'future.builtins' has no attribute 'str'
Incorrect import of future.builtins instead of using eight's imports.
fixUse: from eight import str
Upgrade
Version history
1.0.1latest on PyPI · released Mar 16, 2021
Audit
Dependencies
futurerequiredRequired for Python 2/3 compatibility utilities