{"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,"search_vec":"'1.8.0':37 '2025':41 'approxim':47 'cadenc':45 'call':25 'collect':56 'collections.abc.mutablesequence':15 'current':34 'freez':22 'frozenlist':1,2 'immut':55 'implement':14 'librari':6 'like':11 'list':10,17,54 'list-lik':9 'method':23 'modif':29 'mutabl':19 'octob':40 'one':48 'per':52 'provid':7 'python':5,57 'rais':30 'releas':38,44 'remain':18 'runtimeerror':32 'structur':12 'two':50 'updat':51 'version':35 'year':53","created_at":"2026-03-28T08:20:44.241242+00:00","updated_at":"2026-04-16T15:11:41.767604+00:00","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,"quickstart_score":80,"quickstart_tag":"verified","pypi_latest":"1.8.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/aio-libs/frozenlist","docs":null,"changelog":null,"pypi":"https://pypi.org/project/frozenlist/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-08-27","next_check":"2026-07-28","install_tag":"verified"}}