Skip to content

TypedPython: ownership inference, memory and minimal interpreter footprint in the design (D1-D8) #194

Closed

Description

@b-re-w

What

Record in docs/design/typedpython.md (new §4.3.5) the ownership inference plan, the memory plan against Rust and the minimal-interpreter plan, with the maintainer's decisions of 2026-10-05:

  • D1 yes: identity (is, id) of exact int/float values read from slots is outside the equivalence guarantee (the language leaves identity of immutable values to the implementation).
  • D2 yes, conditional: for @compiled classes the compiler may create the type (PyType_FromSpec); differential tests prove __module__, __qualname__, __slots__, MRO, pickle and inspect match the class statement.
  • D3 yes, conditional: stores into slots of @compiled classes enforce the annotated type (TypeError at the store).
  • D4 no: no non-GC classes for now (saves 0 B on 3.15t), so no final restriction.
  • D5: defect, N-12 borrowed field reads are unsound on free-threaded 3.15t #193.
  • D6 yes for release app builds only: site off; pypackpack sets sys.path; dev mode keeps it.
  • D7 yes: patch our own FT CPython builds to return mimalloc memory on platform memory pressure, minimal patch, proposed upstream.
  • D8 no for now: no C-init-code for class/function definitions.
  • No decision needed: PEP 810 lazy import in pythonx and generated code; memory (physical footprint) added to the benchmarks.

The investigation goes to docs/investigations/typedpython-ownership-memory.md.

Done when

§4.3.5 added, §4.3.4 FT statements corrected per #193, §7 and §8 updated, investigation recorded, no em-dash. Docs only.

Activity

  1. added a commit that references this issue on Oct 4, 2026
  2. b-re-w commented on Oct 4, 2026

    @b-re-w
    MemberAuthor

    Landed in develop via #195

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions