Skip to content

SDK drift: fetchMatches/fetch_matches deprecation-warning mechanism differs — unconditional log line (TS) vs catchable/filterable DeprecationWarning (Python) #1703

Description

@realfishsam

Drift

TypeScript's deprecated fetchMatches emits an unconditional console log via the internal logger, with no way for a caller to intercept, filter, or escalate it. Python's fetch_matches uses the standard warnings.warn(..., DeprecationWarning, ...) mechanism, which is filterable, can be escalated to an exception via warnings.filterwarnings("error"), and is subject to Python's default once-per-call-site suppression.

TypeScript SDK

sdks/typescript/pmxt/router.ts:313:

logger.warn('fetchMatches is deprecated, use fetchMarketMatches instead');

Python SDK

sdks/python/pmxt/router.py:221-225:

warnings.warn(
    "fetch_matches is deprecated, use fetch_market_matches instead",
    DeprecationWarning,
    stacklevel=2,
)

Expected

Both SDKs should use an equivalent, similarly-controllable deprecation-signaling mechanism for the same deprecated method, so tooling/CI that wants to catch deprecated-API usage behaves consistently across languages.

Impact

Python callers can programmatically catch, filter, or fail CI on this deprecation warning; TypeScript callers cannot — the warning is just a log line with no structured signal. This is a real semantic difference in how deprecation is surfaced, not just wording, and isn't covered by the existing deprecation-related issues #1567/#702, which are about export naming rather than the warning mechanism itself.


Found by automated SDK cross-language drift audit

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    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