github m3trik/pythontk v0.18.0
pythontk v0.18.0

2 hours ago
  • 2026-10-26 -- A namespace alias builds without a module __getattr__, and a build that raises keeps its real error (core_utils/module_resolver.py). Since aliases build on first read, bootstrap_package(..., allow_getattr=False) (no __getattr__ to build one) left an alias in __all__ that every read refused; such a package now builds them at import. A fused module that raised anything but an ImportError surfaced once, then every read raised ModuleNotFoundError for the alias's internal placeholder; the alias now stays pending and each read raises the real error, and a module reading the alias mid-build gets AttributeError, so it stays in the alias.
    • Test(s): test_module_resolver.py +4 (LazyNamespaceAliasTests, one pinning that an explicit class list still resolves through the registry when its module fails), red first.
  • 2026-10-26 -- Remove the aliases whose deprecation window has ended (core_utils/app_handoff.py, core_utils/script_template.py, core_utils/scene_records.py, core_utils/export_profile.py, core_utils/hierarchy_baseline.py, file_utils/mesh_convert/glb_fades.py). The one-release stubs left by the 2026-09-26 moves (remove_in="0.13.0") are deleted; no caller in any repo imports them. Old path -> new home: pythontk.core_utils.app_handoff -> pythontk.core_utils.handoff.app_handoff; core_utils.script_template -> core_utils.handoff.script_template; core_utils.scene_records -> core_utils.engines.scene_export.scene_records (Scope, Kind, Merge, Record, RecordSpec, SceneRecords), .scene_store (SceneStoreBase), .export_snapshot (ExportContext, ExportSnapshot, Producer) and .record_transfer (TransferContext, RecordTransfer); core_utils.export_profile -> core_utils.engines.scene_export.export_profile; core_utils.hierarchy_baseline -> core_utils.engines.scene_export.hierarchy_baseline; file_utils.mesh_convert.glb_fades -> file_utils.mesh_convert.glb.fades (GlbFades, GlbFades.CHANNELS, PointerChannel). Every name except PointerChannel and Producer (a type alias, at core_utils.engines.scene_export.export_snapshot.Producer) is also on the root (from pythontk import HandoffBridge, SceneRecords, GlbFades). Two docstrings and a viewer comment that named glb_fades. now name glb.fades. (file_utils/mesh_convert/_visibility.py, _fbx2gltf.py, net_utils/preview/kernel/animation.js).
    • Test(s): the alias-only tests go with them: test_scene_records.py -TestMovedPaths; test_mesh_convert.py -test_old_glb_fades_path_is_a_deprecated_alias (and one docstring's glb_fades. -> glb.fades.).
  • 2026-10-25 -- A flat name two classes define is reported, and a retired alias never owns one (core_utils/module_resolver.py). A "*" include publishes every public method flat, and when two classes defined one name, module order picked the owner silently. ModuleAttributeResolver.flat_collisions now lists each such name with its owners, and the package tests pin it empty. A Deprecation.symbol door takes a flat name only while no live method claims it, so a moved method's flat name keeps reaching the method, never the warning.
    • Test(s): test_module_resolver.py +FlatCollisionTests (3).
  • 2026-10-25 -- import pythontk loads declarations only, and a "module->Alias" namespace alias is built on first use (__init__.py; core_utils/module_resolver.py; img_utils/_img_utils.py). Since 2026-06-10 the OPENCV_IO_ENABLE_OPENEXR call at the top of img_utils/_img_utils.py made the resolver judge that module unsafe to load lazily, so every import pythontk -- and so every uitk, mayatk, blendertk, tentacle and extapps import -- loaded ImgUtils, its seven mixin modules, PIL and numpy. The flag is now set once, by the package root, before anything can import cv2; the copies in exposure_equalizer, image_curator, frame_extractor and light_predictor are gone. ImageFormat is a NamedTuple class, so the lazy scan still publishes it. A namespace alias fuses every class of the modules it names, so building one imports them all: an alias is now declared at import (the registry and __all__ list it as before) and fused on first read, which takes mayatk's Diagnostics and Mash and blendertk's Diagnostics out of every import. A class only an alias build publishes (mtk.UvDiagnostics) still resolves, a reload rebuilds the alias from the reloaded modules, and an alias that cannot build is withdrawn as before. Measured in plain Python, median of 5 fresh processes: import pythontk 341 -> 116 ms, uitk 357 -> 138, tentacle 338 -> 138, mayatk 637 -> 334, blendertk ~590 -> 397. New import_footprint(package) (core_utils/module_resolver.py) reports what a fresh interpreter loads to import a package beyond its declarations; the tests of pythontk, uitk, mayatk, blendertk and tentacle pin theirs at nothing.
    • Test(s): test_module_resolver.py +LazyNamespaceAliasTests (7) and +ImportFootprintTests (2; pythontk's is red on HEAD: 16 modules, PIL, defusedxml, numpy); test_img.py OpenExrFlagTest rewritten for the one root setting (3), +ImageFormatSurfaceTest. The unused ModuleResolverValidator / validate_package CLI is removed from test_module_resolver.py (528 lines, no caller).

Don't miss a new pythontk release

NewReleases is sending notifications on new releases.