src/ has 8 warnings.warn calls and no convention: SignalSchemaWarning ×3,
UserWarning, RuntimeWarning, DeprecationWarning (DataChain.print_schema),
FutureWarning (legacy _type_tag, #1824), and one call with no category at all
(llm/spec.py:46). No helper, no removal policy, no changelog convention.
Do: add one helper — e.g. warn_deprecated(what, *, instead=None, removal=None, once=False) — that fixes the category, keeps messages to one line in a single shape
("X is deprecated; use Y instead."), and supports once-per-process for hot paths such
as row readers. Migrate the existing sites.
Decide: the category rule. DeprecationWarning is hidden by default outside
__main__, so anything a user must act on (data formats, public API) needs
FutureWarning; internal/dev-facing deprecations can stay DeprecationWarning.
Then document when a deprecation may be removed.
src/has 8warnings.warncalls and no convention:SignalSchemaWarning×3,UserWarning,RuntimeWarning,DeprecationWarning(DataChain.print_schema),FutureWarning(legacy_type_tag, #1824), and one call with no category at all(
llm/spec.py:46). No helper, no removal policy, no changelog convention.Do: add one helper — e.g.
warn_deprecated(what, *, instead=None, removal=None, once=False)— that fixes the category, keeps messages to one line in a single shape("X is deprecated; use Y instead."), and supports once-per-process for hot paths such
as row readers. Migrate the existing sites.
Decide: the category rule.
DeprecationWarningis hidden by default outside__main__, so anything a user must act on (data formats, public API) needsFutureWarning; internal/dev-facing deprecations can stayDeprecationWarning.Then document when a deprecation may be removed.