Commit graph jw-python/src/python/jwutils
Author SHA1 Message Date
8681317e8c
jw.util.Cmds, .Cmd, .App: Use jw.pkg.lib.App + .Cmd
This commit does a couple of things in one go:

- Move the implementations from jw.util.Cmds and jw.util.Cmd back to
  jwutils where they came from to remain backwards compatible for
  code still using jwutils.

- No code uses jw.util.Cmds and jw.util.Cmd yet, so remove them.

- Add new jw.util.App and jw.util.Cmd classes instead, which are
  re-exported modules from jw.pkg.lib. These implementations are very
  similar, but not identical to jwutils.Cmds and jwutils.App.

Originally, Cmds and Cmd had been copied from jw-python to jw-pkg App
and Cmd, respectively, because an App class proved indispensible in
jw-pkg.  The two classes have subsequently evolved in jw-pkg, and
re-using them here ends the fork and removes the redundancy.

This makes jw-python expose the same App / Cmd pair as jw.pkg does
for as long as Cmds is still in use. In the future, it might be a
good idea to remove Cmds, Cmd and App from jw-python entirely.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-12 23:10:11 +00:00
d781cbfdd2
jwutils: Add missing types
Add types missing from the jwutils compatibility shim, because
software using it complains:

  from .Cmd import Cmd as Cmd
  from jw.util.ldap import Config as Config

This will probably not be the last time this happens.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-14 11:36:34 +02:00
a2684dd601
jwutils: Move to jwutils -> jw.util
Move all implementation source code from the jwutils module to
jw.util. For compatibility with existing Python modules, keep a thin,
autogenerated compatibility shim under jwutils.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-11 23:10:25 +00:00