Skip to content

Correct the architecture guide’s description of lazy imports #201

Done

Description

@tony

Summary

The architecture guide says importing libvt loads emulation, input, and formatting. The package resolves its root exports lazily. Readers assessing import cost see conflicting statements in the architecture guide and the public API reference.

Motivation

An application can import the package or discover its pytest plugin without loading the terminal engine. The guide should name the point at which the engine actually loads.

Evidence

Cold interpreter check
uv run python -c 'import sys, libvt; print("libvt.terminal" in sys.modules); _ = libvt.Terminal; print("libvt.terminal" in sys.modules)'

The output is False followed by True.

References

The architecture paragraph predates #51, which introduced lazy root exports. The public API reference already describes the behavior.

Activity

  1. added
    documentation
    p3
    area:core
    topic:api
    python
    on Dec 5, 2026
  2. added a commit that references this issue on Dec 5, 2026
    11e76c7
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

    area:coredocumentationp3pythontopic:api

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions