PyroConfigMixin.update_pyro_config, pyrolab/configure.py:202-211:
pyroset = {}
for key, value in values.items():
key = key.upper()
if key in Pyro5.config.__slots__:
setattr(Pyro5.config, key, value)
pyroset[key] = value
return pyroset
Any model field whose uppercased name is not a Pyro5 config slot is dropped with no log line and no error. Some of those are intentional (module, classname, nameservers are consumed elsewhere); some are silent data loss. port and unixsocket on DaemonConfiguration fall in the second category and are the subject of a separate issue -- this issue is about the mechanism that hides it.
The design has two further consequences worth documenting or changing:
- It writes to Pyro5 process globals. Per-daemon settings only work because each daemon runs in its own process (
DaemonRunner). Nothing states this, and it silently stops being true for anything that runs two configurations in one process -- including tests. Daemon accepts host/port/nathost/natport as constructor arguments; passing them explicitly would remove the dependency on global state.
- A typo in a config file is invisible.
servertyp: multiplex is accepted by pydantic (extra fields are ignored by default in v1) and then ignored here, so the daemon silently runs with the default server type.
Suggested fixes:
- Log at DEBUG which keys were applied and at WARNING which were skipped for an unrecognized name.
- Set
class Config: extra = "forbid" on the settings models so unknown YAML keys are rejected at load with a clear message.
- Maintain an explicit allowlist of "fields intentionally not Pyro options" so the skip-warning does not fire for
module/classname/nameservers.
Found in a full-codebase audit at v0.4.0 (commit 1ce3146).
PyroConfigMixin.update_pyro_config,pyrolab/configure.py:202-211:Any model field whose uppercased name is not a Pyro5 config slot is dropped with no log line and no error. Some of those are intentional (
module,classname,nameserversare consumed elsewhere); some are silent data loss.portandunixsocketonDaemonConfigurationfall in the second category and are the subject of a separate issue -- this issue is about the mechanism that hides it.The design has two further consequences worth documenting or changing:
DaemonRunner). Nothing states this, and it silently stops being true for anything that runs two configurations in one process -- including tests.Daemonacceptshost/port/nathost/natportas constructor arguments; passing them explicitly would remove the dependency on global state.servertyp: multiplexis accepted by pydantic (extra fields are ignored by default in v1) and then ignored here, so the daemon silently runs with the default server type.Suggested fixes:
class Config: extra = "forbid"on the settings models so unknown YAML keys are rejected at load with a clear message.module/classname/nameservers.Found in a full-codebase audit at v0.4.0 (commit 1ce3146).