Python Package

Static Lifecycle Scan

Pro+ AST leak scan (Thread/Timer/logger/QThread). Not part of check --extended and not RSS proof.

Early Access: Until 2026-12-31

check-lifecycle is a dedicated Pro+ quality test (lifecycle_scan). It finds AST leak patterns at file:line. It does not measure RSS or OS threads — that stays Gist Factor.

Key points

  • CLI: On Windows the examples use the recommended py -3.12 -m <module> ... form (for example py -3.12 -m manifestguard ...). On Linux/macOS this usually maps to python3.12 -m ....
  • Community can read this guide and manifestguard list-tests. Running the scan requires Trial/Pro or higher.
  • Detectors: list bloat, sync I/O, context managers, Thread without join, Timer without cancel, logger addHandler without a handlers guard, optional PyQt/PySide QThread.
  • Not part of check --extended. Add check-lifecycle as its own CI gate when you want it.
  • Default confidence is high. --min-confidence medium includes QThread. --all-findings shows weak LIST_BLOAT collectors.

Recommended mgpy workflow

  1. py -3.12 -m manifestguard check-lifecycle
  2. Join/track Thread teardown, cancel Timer on stop, guard addHandler with if not logger.handlers.
  3. For PyQt/PySide, call quit()/wait() in the same class as QThread.start.
  4. Keep quality CI on check --extended --refactor --verbose as a separate command.

Quick start

py -3.12 -m manifestguard list-tests
py -3.12 -m manifestguard check-lifecycle
py -3.12 -m manifestguard check-lifecycle --min-confidence medium
py -3.12 -m manifestguard check --extended --refactor --verbose

Requirements

Columns
Installation interpreter
Python 3.12 + pip
Recommended default path for installation and CLI calls.
Project target versions
Python 3.8 to 3.12
These are the project/runtime targets mgpy can analyze.
mgpy runtime
Validated on Python 3.10 to 3.13
The tool runtime itself is covered for this range.
CLI invocation
Windows: py -3.12 -m manifestguard
Linux/macOS usually maps to python3.12 -m manifestguard.
Runtime packages
tomlkit, click, pydantic, packaging, watchdog, PyNaCl, rfc8785
tomli is only added for Python below 3.11.
Offline / wheel install
Optional via pip --no-index or wheel
Useful for air-gapped or approved bundle distribution paths.