piker/piker
Gud Boi 5a4ce27777 Adjust `tractor.log` API compat
Update logging helpers to use new `tractor.log` API with `pkg_name=`
kwarg and add optional `tractor` "root logger" enabling.

Deats,
- change `piker.log.get_logger()` to use `pkg_name=` vs `_root_name=`.
- add `**tractor_log_kwargs` passthrough to both wrapper fns.
- add `with_tractor_log: bool` toggle to `.get_console_log()`.
- strip `'piker.'` prefix from logger names when present to avoid
  newly added `tractor.get_logger()` warnings.

Surroundingly,
- add `subsys` import to `.clearing._ems` for log name
- update all `get_console_log()` calls to use `level=` kwarg
- add assertion checks for logger names in `_setup_persistent_emsd()`

Additionally,,
- fix all type annotations: `str|None` vs `str | None`.
- add multiline style to conditional in `.cli.services()`.
- drop unused `Optional` import from `._actor_runtime`.
- drop a few "blank lines" in various function sigs.

Warning: this patch will require an equivalent dev-commit at the time of
writing in `tractor` itself, for now the `piker_pin` branch should be
sufficient to avoid breakage 🙏!

(this commit msg was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code

k
2026-02-22 18:42:20 -05:00
..
accounting accounting.calc: `.error()` on bad txn-time fields.. 2026-01-07 14:05:23 -05:00
brokers Adjust binance stale-bar detection to 2x tolerance 2026-02-22 18:40:59 -05:00
clearing Adjust `tractor.log` API compat 2026-02-22 18:42:20 -05:00
cli Adjust `tractor.log` API compat 2026-02-22 18:42:20 -05:00
data Adjust `tractor.log` API compat 2026-02-22 18:42:20 -05:00
fsp Adjust to `trio`'s strict eg nurseries throughout! 2026-01-06 22:27:58 -05:00
service Adjust `tractor.log` API compat 2026-02-22 18:42:20 -05:00
storage Replace assert with warn for no-gaps in `.storage.cli` 2026-02-22 18:40:59 -05:00
testing Pass a config `tmp_dir: Path` to the runtime when testing 2023-03-09 15:37:43 -05:00
toolz Delegate `.toolz.open_crash_handler()` to `tractor.devx` 2024-01-16 10:26:38 -05:00
tsp Flip `.tsp._history` logger to explicit mod-name (again) 2026-02-22 18:40:59 -05:00
ui Guard against `None` chart in `ArrowEditor.remove()` 2026-02-22 18:40:59 -05:00
watchlists Add license headers to pertinent files 2020-11-06 12:23:14 -05:00
__init__.py Start `piker.service` sub-package 2023-03-09 15:37:42 -05:00
_cacheables.py Move `._cacheables.open_cached_client()` into `.brokers` pkg mod 2023-06-27 13:41:47 -04:00
calc.py Lul, adhere to returning `str`s in `humanize()` 2022-01-25 07:57:01 -05:00
config.py `.config.get_app_dir()`: link to `click`'s orig impl on GH 2026-01-06 19:33:23 -05:00
log.py Adjust `tractor.log` API compat 2026-02-22 18:42:20 -05:00
types.py Point `.types.Struct` to `tractor.msg.pretty_struct` 2026-02-22 16:07:53 -05:00