{"id":294,"library":"frozenlist","title":"FrozenList","description":"FrozenList is a Python library providing a list-like structure that implements collections.abc.MutableSequence. The list remains mutable until the freeze() method is called, after which any modifications raise a RuntimeError. The current version is 1.8.0, released in October 2025, with a release cadence of approximately one to two updates per year.","status":"active","version":"1.8.0","language":"python","source_language":"en","source_url":"https://github.com/aio-libs/frozenlist","tags":["list","immutable","collections","python"],"install":[{"cmd":"pip install frozenlist","lang":"bash","label":"Install FrozenList"}],"dependencies":[],"imports":[{"symbol":"FrozenList","correct":"from frozenlist import FrozenList"}],"quickstart":{"code":"from frozenlist import FrozenList\n\n# Create a mutable FrozenList\nfl = FrozenList([1, 2, 3])\nfl.append(4)\nprint(fl)  # Output: [1, 2, 3, 4]\n\n# Freeze the list\nfl.freeze()\n\n# Attempting to modify the frozen list raises RuntimeError\ntry:\n    fl.append(5)\nexcept RuntimeError as e:\n    print(e)  # Output: Cannot modify frozen list.","lang":"python","description":"Demonstrates creating a FrozenList, modifying it, freezing it, and handling attempts to modify it after freezing."},"warnings":[{"fix":"Upgrade your Python environment to version 3.8 or newer.","message":"Dropped support for Python 3.7 in version 1.4.0.","severity":"breaking","affected_versions":">=1.4.0"},{"fix":"Upgrade your Python environment to version 3.7 or newer.","message":"Dropped support for Python 3.6 in version 1.3.0.","severity":"breaking","affected_versions":">=1.3.0"},{"fix":"Ensure that all necessary modifications are made before freezing the list.","message":"Attempting to modify a FrozenList after calling freeze() raises a RuntimeError.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Call freeze() before attempting to hash a FrozenList instance.","message":"A FrozenList instance is hashable only when frozen; attempting to hash a non-frozen instance raises a RuntimeError.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-05-12T12:54:02.502Z","next_check":"2026-06-26T00:00:00.000Z","problems":[{"fix":"Install the package using pip: `pip install frozenlist`","cause":"The 'frozenlist' package has not been installed in the Python environment you are using.","error":"ModuleNotFoundError: No module named 'frozenlist'"},{"fix":"Ensure modifications are made before calling `freeze()`, or create a new FrozenList instance if further modifications are required.","cause":"You attempted to modify a FrozenList instance after its `freeze()` method has been called, rendering it immutable.","error":"RuntimeError: Cannot modify frozen list."},{"fix":"Ensure your build tools (like `gcc`) are installed and up-to-date. If using a newer Python version, try upgrading `pip` and `setuptools` (`pip install --upgrade pip setuptools`) or check if a newer 'frozenlist' version with pre-built wheels for your Python version is available.","cause":"This error typically occurs during installation, often when Python cannot compile the underlying C extensions of 'frozenlist', sometimes due to missing build tools (like `gcc`) or compatibility issues with newer Python versions (e.g., Python 3.11, 3.12) that might require a more recent 'frozenlist' version or specific compiler flags.","error":"ERROR: Could not build wheels for frozenlist, which is required to install pyproject.toml-based projects."}],"ecosystem":"pypi","meta_description":null,"install_score":100,"install_tag":"verified","quickstart_score":80,"quickstart_tag":"verified","pypi_latest":null,"install_checks":{"last_tested":"2026-05-12","tag":"verified","tag_description":"installs cleanly on critical runtimes, fast import, recently tested","results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0,"mem_mb":0.2,"disk_size":"18.3M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0,"mem_mb":0.2,"disk_size":"19M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0,"mem_mb":0.2,"disk_size":"20.2M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0,"mem_mb":0.2,"disk_size":"21M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0,"mem_mb":0.2,"disk_size":"12.1M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0,"mem_mb":0.2,"disk_size":"13M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0,"mem_mb":0.4,"disk_size":"11.7M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.2,"disk_size":"12M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0,"mem_mb":0.2,"disk_size":"17.8M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.2,"disk_size":"18M"}]},"quickstart_checks":{"last_tested":"2026-04-23","tag":"verified","tag_description":"quickstart runs on critical runtimes, recently tested","results":[{"runtime":"python:3.10-alpine","exit_code":0},{"runtime":"python:3.10-slim","exit_code":0},{"runtime":"python:3.11-alpine","exit_code":0},{"runtime":"python:3.11-slim","exit_code":0},{"runtime":"python:3.12-alpine","exit_code":0},{"runtime":"python:3.12-slim","exit_code":0},{"runtime":"python:3.13-alpine","exit_code":0},{"runtime":"python:3.13-slim","exit_code":0},{"runtime":"python:3.9-alpine","exit_code":0},{"runtime":"python:3.9-slim","exit_code":0}]}}