Skip to content

docs: signature defaults render by value, so sys.byteorder shows the build host's 'little' #1859

Closed

Description

@JarryShaw

Every byteorder=sys.byteorder default renders as 'little', the build host's value. Sites:

  • protocols/link/loopback.py:218
  • dumpkit/pcap.py:115,163
  • interface/core.py:81,230, interface/misc.py:78
  • protocols/misc/pcap/header.py:176,348, protocols/misc/pcapng.py:4364
  • foundation/extraction.py:1117, foundation/traceflow/traceflow.py:407

The same mechanism prints default=<pcapkit.corekit.sentinels.NoValueType object> and callback=<function NumberField.<lambda>> on the corekit/fields pages.

Root cause: autodoc renders a default's repr() unless autodoc_preserve_defaults is on, and docs/source/conf.py leaves it off.

Fix: set autodoc_preserve_defaults = True. A trial build added no warnings, and each changed default became its source text (sys.byteorder, NO_VALUE, NULL, io.DEFAULT_BUFFER_SIZE, the lambda). It also exposes private import aliases as default text (Enum_LinkType.NULL, Enum_Frame.DATA), which should be reviewed in the build diff. Verify after #1856, which changes signature rendering.

Activity

  1. added
    docsPull requests that change documentation only (docs: subject prefix)
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 16, 2026
  2. JarryShaw commented on Oct 16, 2026

    @JarryShaw
    OwnerAuthor

    Blocked until #1856 merges. That PR bumps sphinx-autodoc-typehints, which changes how signatures render, and it edits docs/source/conf.py, which this fix also edits.

  3. added
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    and removed
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 16, 2026
  4. moved this to Blocked in PyPCAPKiton Oct 16, 2026
  5. JarryShaw commented on Oct 17, 2026

    @JarryShaw
    OwnerAuthor

    Started on top of #1877, the PR for #1856, so the conf.py edits don't conflict. One worker is taking #1858–#1863 together, since every fix goes through conf.py.

  6. added
    wipWork in flight - a covering PR is open or an agent is actively on it
    and removed
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    on Oct 17, 2026
  7. moved this from Blocked to WIP in PyPCAPKiton Oct 17, 2026
  8. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 17, 2026
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

    docsPull requests that change documentation only (docs: subject prefix)

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions