OpenVoiceOS / OpenVoiceOS/ovos-utils
log_deprecation: no way to keep a deprecation a client cannot act on out of its logs
@openvoiceos-bot is already working on this.
Since Sep 13, 2026.
- Dominant language
- Python
- Stars
- 6
- Forks
- 13
- Avg merge
- 1d 8m
- Merged PRs (30d)
- 8
Description
🤖 Auto-generated by Claude Fable 5.1 (claude-fable-5-1) via Claude Code — NOT human-reviewed. Verify before acting.
ovos_utils.log.log_deprecation names the logger it writes to after the call site:
log_name = f"{LOG.name} - {name}:{func_name or call[3]}:{call[2]}"
LOG.create_logger(log_name).warning(...)
create_logger gives that logger its own StreamHandler and sets propagate = False. So every deprecation lands on a logger such as OVOS - ovos_bus_client.session:_normalize_location_input:87, one per call site, that no client can name in advance, and a filter on the OVOS logger never sees it. There is no configuration or environment switch for deprecations either (checked LOG.init and the logging config keys in ovos-utils 0.8.5).
Why it matters: ovos-bus-client 2.11 logs a deprecation every time it reads a session whose location is in the nested city/coordinate/timezone shape. A hub whose ovos-core still serialises that shape (every stock install: ovos-config's default location is nested) makes every client log it on every message it receives. Measured on a HiveMind satellite: three lines per question, and three hundred in six minutes of connection probes. The client cannot change the hub's shape, so the only honest thing it can do is drop that one record — and the only place to catch it is LOG.create_logger itself, which is what we wrap today (thalovant 0.6.7, transport.py).
Would you take either of these?
- An opt-out:
LOG.init(config={"deprecations": False})/"logging": {"deprecations": false}inmycroft.conf, orOVOS_LOG_DEPRECATIONS=0, under whichlog_deprecationreturns without logging. - A fixed child logger for deprecations (
OVOS.deprecation, with the call site kept in the message as it is now) so a standardlogging.Filteror level can be applied to it.
Either would let a client that has heard the deprecation, and cannot act on it, stop repeating it. Happy to send a PR for whichever you prefer.
Versions: ovos-utils 0.8.5, ovos-bus-client 2.11.7a1, Python 3.12.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.