Python Package

Statischer Lifecycle-Scan

Pro+ AST-Leak-Scan (Thread/Timer/Logger/QThread). Nicht Teil von check --extended, kein RSS-Beweis.

Früher Zugriff: Bis 2026-12-31

check-lifecycle ist ein eigener Pro+-Qualitaetstest (lifecycle_scan). Er findet AST-Leak-Muster an file:line. Er misst kein RSS und keine OS-Threads — das bleibt Gist Factor.

Kernpunkte

  • CLI: Unter Windows zeigen die Beispiele den empfohlenen Aufruf via py -3.12 -m <modul> ... (z.B. py -3.12 -m manifestguard ...). Auf Linux/macOS entspricht das in der Regel python3.12 -m ....
  • Community kann diesen Guide und manifestguard list-tests lesen. Der Scan selbst braucht Trial/Pro oder hoeher.
  • Detektoren: List-Bloat, Sync-I/O, Context Manager, Thread ohne join, Timer ohne cancel, Logger-addHandler ohne handlers-Guard, optional PyQt/PySide-QThread.
  • Nicht Teil von check --extended. Als eigenes CI-Gate hinzufuegen, wenn ihr ihn wollt.
  • Standard-Konfidenz ist high. --min-confidence medium nimmt QThread dazu. --all-findings zeigt schwache LIST_BLOAT-Collector.

Empfohlener MG-Python-Workflow

  1. py -3.12 -m manifestguard check-lifecycle
  2. Thread-Teardown joinen/tracken, Timer beim Stop canceln, addHandler mit if not logger.handlers schuetzen.
  3. Bei PyQt/PySide quit()/wait() in derselben Klasse wie QThread.start.
  4. Quality-CI bleibt check --extended --refactor --verbose als eigener Befehl.

Schnellstart

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

Voraussetzungen

Spalten
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.