fix: restore task() actor kwarg (accept-and-ignore) for caller compatibility

the original task() accepted an actor kwarg and ignored it (task actions are always attributed to SYSTEM/TASK); the rewrite dropped the param, so live callers passing task(..., actor=...) hit a TypeError. added actor=None back, accept-and-ignore, behavior unchanged. bump to v0.1.1. (feed() stays out of the base by design — consumers subclass.)

Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
disqualifier 2026-06-29 03:18:13 -04:00
parent f480a7c077
commit e20c7bbda3
3 changed files with 9 additions and 5 deletions

View File

@ -10,13 +10,13 @@ live from `bot.settings` so it can change at runtime via a command.
`requirements.txt`: `requirements.txt`:
``` ```
dpy_logger @ git+ssh://git@git.rethinkstudios.io/rethink-public/dpy_logger.git@v0.1.0 dpy_logger @ git+ssh://git@git.rethinkstudios.io/rethink-public/dpy_logger.git@v0.1.1
``` ```
Direct: Direct:
```bash ```bash
pip install "dpy_logger @ git+ssh://git@git.rethinkstudios.io/rethink-public/dpy_logger.git@v0.1.0" pip install "dpy_logger @ git+ssh://git@git.rethinkstudios.io/rethink-public/dpy_logger.git@v0.1.1"
``` ```
Requires `discord.py` (pulled transitively). Requires `discord.py` (pulled transitively).

View File

@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project] [project]
name = "dpy_logger" name = "dpy_logger"
version = "0.1.0" version = "0.1.1"
description = "Leveled Discord channel logger for discord.py — config-free, injectable, installable." description = "Leveled Discord channel logger for discord.py — config-free, injectable, installable."
requires-python = ">=3.10" requires-python = ">=3.10"
dependencies = [ dependencies = [

View File

@ -206,8 +206,12 @@ class DPYLogger:
failure = fail failure = fail
async def task(self, log, action=None, guild=None, log_to_file=None): async def task(self, log, action=None, actor=None, guild=None, log_to_file=None):
"""log a task-level message with SYSTEM/TASK as the actor""" """log a task-level message with SYSTEM/TASK as the actor
actor is accepted for caller compatibility and ignored task actions are
always attributed to SYSTEM/TASK regardless of the caller-supplied actor
"""
return await self._send("task", log, action, "SYSTEM/TASK", guild, log_to_file) return await self._send("task", log, action, "SYSTEM/TASK", guild, log_to_file)
async def critical(self, log, action=None, actor=None, guild=None, log_to_file=None): async def critical(self, log, action=None, actor=None, guild=None, log_to_file=None):