Skip to content

_HFSymlinksInfoFilter is dead code; demote-to-INFO log filters relabel but don't suppress #909

@timenick

Description

@timenick

Summary

_warnings.py has "demote WARNINGINFO" logging filters that, given how the CLI gates logging, relabel records but don't actually hide them. One of them — _HFSymlinksInfoFilter (added in #647) — is now fully dead code, shadowed by a hard filterwarnings("ignore") added later in #709.

Details

1. _HFSymlinksInfoFilter never runs.

2. Demote-to-INFO doesn't suppress — it only relabels.

The CLI uses the root logger level as the sole gate (handler is NOTSET, see utils/logging.py). That gate is evaluated at emit time on the record's original level; a filter that later rewrites levelno WARNINGINFO runs after the gate has passed, and the NOTSET handler doesn't re-filter — so the record still prints, just labeled INFO. Empirically, _TasksManagerFilter ("TasksManager returned …") still prints in default verbosity as an INFO line; it is not hidden.

Impact

Cosmetic / low — no functional bug. But _HFSymlinksInfoFilter is misleading dead code, and _TasksManagerFilter doesn't hide what it appears to.

Suggested cleanup

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — minor bug or non-critical improvementbugSomething isn't workinginfrastructureCI/CD and infrastructurequalityUse for quality control related issuestriagedIssue has been triaged

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions