{"id":21206,"library":"eight","title":"eight - Python 2/3 porting helper","description":"A lightweight porting helper library for writing Python 2/3 compatible code. Current version 1.0.1, stable and maintained as needed.","status":"maintenance","version":"1.0.1","language":"python","source_language":"en","source_url":"https://github.com/kislyuk/eight","tags":["porting","python2","python3","compatibility"],"install":[{"cmd":"pip install eight","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for Python 2/3 compatibility utilities","package":"future","optional":false}],"imports":[{"note":"eight provides its own str from builtins via future","wrong":"from six import text_type","symbol":"str","correct":"from builtins import str"},{"note":"","wrong":"","symbol":"int","correct":"from builtins import int"},{"note":"Prefer using str for both versions","wrong":"","symbol":"unicode","correct":"for Python 2 compatibility: from builtins import str (eight unicode is str)"}],"quickstart":{"code":"from future.builtins import *\nfrom eight import *\n# Now you can write Python 3 code that works on Python 2\nprint(str('hello'))","lang":"python","description":"Import future and eight for Python 2/3 compatible builtins."},"warnings":[{"fix":"Use 'from future.utils import with_metaclass' or import dummy_thread directly if needed.","message":"eight v1.0.1 removed the deprecated 'dummy_thread' symbol from Python 2's dummy_thread module.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Run: pip install 'future>=0.16'","message":"eight relies on the 'future' library. Ensure future is installed and up-to-date (>=0.16) to avoid import errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Stick to one compatibility library.","message":"Do not mix 'six' and 'eight' imports. They may conflict.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'1.0.1':19 '2/3':3,14 'code':16 'compat':15,28 'current':17 'eight':1 'helper':5,9 'librari':10 'lightweight':7 'maintain':22 'need':24 'port':4,8,25 'python':2,13 'python2':26 'python3':27 'stabl':20 'version':18 'write':12","created_at":"2026-04-27T16:58:38.639428+00:00","updated_at":"2026-04-27T16:58:38.639428+00:00","problems":[{"fix":"pip install future","cause":"future package not installed or not in path.","error":"ImportError: No module named builtins"},{"fix":"Use: from eight import str","cause":"Incorrect import of future.builtins instead of using eight's imports.","error":"AttributeError: module 'future.builtins' has no attribute 'str'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.0.1","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/kislyuk/eight","docs":null,"changelog":null,"pypi":"https://pypi.org/project/eight/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["http-networking"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-28","install_tag":null}}