SDK Drift: Bare Router stub in _exchanges.py
Location
- Python:
sdks/python/pmxt/_exchanges.py lines ~533–555
- Python:
sdks/python/pmxt/__init__.py
Description
_exchanges.py (the auto-generated exchange registry) defines a Router class that is a bare Exchange subclass — it has none of the matching/arbitrage methods that the real Router in router.py provides:
# In _exchanges.py (stub — NO routing methods)
class Router(Exchange):
...
__init__.py imports Router from _exchanges first, then re-imports and overwrites it with the real Router from .router:
from ._exchanges import Router # stub — immediately discarded
from .router import Router # real Router wins
The top-level pmxt.Router therefore correctly exposes the full API, but anyone who does from pmxt._exchanges import Router directly gets a broken object that only has the base Exchange methods.
The TypeScript SDK has no such ambiguity — the single Router class in router.ts has the full API and is the only export.
Impact
- Direct
_exchanges.py importers (e.g. users inspecting internals, generated client code, test helpers) silently receive a stripped-down Router.
- The auto-generation pipeline that produces
_exchanges.py should either omit the Router entry or generate it as a proper re-export of router.Router.
SDK Drift: Bare
Routerstub in_exchanges.pyLocation
sdks/python/pmxt/_exchanges.pylines ~533–555sdks/python/pmxt/__init__.pyDescription
_exchanges.py(the auto-generated exchange registry) defines aRouterclass that is a bareExchangesubclass — it has none of the matching/arbitrage methods that the realRouterinrouter.pyprovides:__init__.pyimportsRouterfrom_exchangesfirst, then re-imports and overwrites it with the realRouterfrom.router:The top-level
pmxt.Routertherefore correctly exposes the full API, but anyone who doesfrom pmxt._exchanges import Routerdirectly gets a broken object that only has the baseExchangemethods.The TypeScript SDK has no such ambiguity — the single
Routerclass inrouter.tshas the full API and is the only export.Impact
_exchanges.pyimporters (e.g. users inspecting internals, generated client code, test helpers) silently receive a stripped-downRouter._exchanges.pyshould either omit theRouterentry or generate it as a proper re-export ofrouter.Router.