Skip to content

fix(corekit): VersionInfo, ModuleDescriptor and the MH timestamp tuples list themselves as their own base #1843

Closed as not planned

Description

@JarryShaw

Several pages show a Bases: line that links to the class itself:

  • Bases: VersionInfo (corekit/version.html);
  • Bases: ModuleDescriptor, Generic (corekit/module.html);
  • Bases: NTPTimestamp and Bases: PMIPv6Timestamp (protocols/internet/mh.html).

Each subclasses an anonymous collections.namedtuple with the same name and module: corekit/version.py:17, corekit/module.py:30 and protocols/internet/mh.py:538,549.

Fix: name each generated base distinctly, e.g. namedtuple('_VersionInfo', …). Probed, the following are unchanged:

  • repr and str;
  • _fields, _asdict, __match_args__ and _make;
  • deepcopy;
  • mypy output;
  • the pickle bytes at protocols 0–5.

Only the names in __mro__ and __bases__ change. The base then renders as an unlinked _VersionInfo, which may be worth hiding as well.

Activity

  1. added
    fixPull requests that fix a defect (fix: subject prefix)
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    wipWork in flight - a covering PR is open or an agent is actively on it
    and removed
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 16, 2026
  2. added
    needs: decisionWaiting on the maintainer to decide — not blocked by other work
    and removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 17, 2026
  3. moved this from WIP to Needs decision in PyPCAPKiton Oct 17, 2026
  4. removed
    needs: decisionWaiting on the maintainer to decide — not blocked by other work
    on Oct 17, 2026
  5. JarryShaw commented on Oct 17, 2026

    @JarryShaw
    OwnerAuthor

    Closed as not planned, per the owner's ruling on #1869: a base class linking back to its own class is fine. The timestamp conversion is tracked separately.

  6. moved this from Needs decision to Done in PyPCAPKiton 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

    fixPull requests that fix a defect (fix: subject prefix)

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions