Skip to content

Immutable Reference Implementation #61

@mjp41

Description

@mjp41

This is the top-level issue for tracking progress for making the reference implementation in line with the in progress draft PEP.

The following task should be expanded into issues.

  • Add self contained check to freeze (After meeting decided against this approach.)
  • Add SCC and atomic RC to allow cross interpreter object management
  • Add support to interpreter communication to allow frozen objects to be transferred without pickling.
  • Separate immutable module into _immutable for C components of immutable module, and immutable for the parts that can be written in Python.
  • Add a pre-freeze hook.
  • Expose a tp_references that walks the object graph without avoiding objects that cannot participate in cycles. tp_traverse has some optimisations that mean it doesn't walk all the reachable objects.
  • Provide register_shallow_freezable to allow C modules to specify that the types are immutable by construction.
  • Correctly handle getting the module state from a type to access the state associated with the current interpreter
  • Correctly handle subclasses access with locks and copying
  • Escape hatch for thread-local/interpreter-local
  • Escape hatch for shared cell that contains only immutable data

This issue should be update and sub-issues created to track the outstanding work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions