Skip to content

fix(python-sdk): export matched cluster filter params#1164

Open
realfishsam wants to merge 1 commit into
mainfrom
fix/python-filter-param-drift-1155-1157
Open

fix(python-sdk): export matched cluster filter params#1164
realfishsam wants to merge 1 commit into
mainfrom
fix/python-filter-param-drift-1155-1157

Conversation

@realfishsam

Copy link
Copy Markdown
Contributor

Summary

  • Add a shared MatchedClusterFilterParams TypedDict to the Python SDK.
  • Make market/event cluster params inherit that shared filter base and export it from package root.

Fixes #1157

Test Plan

  • python3 -m py_compile sdks/python/pmxt/models.py sdks/python/pmxt/__init__.py
  • Static AST/export check for MatchedClusterFilterParams inheritance and package-root export
  • git diff --check

@realfishsam

Copy link
Copy Markdown
Contributor Author

Local scoped validation passed for this PR:

  • python3 -m py_compile sdks/python/pmxt/models.py sdks/python/pmxt/__init__.py
  • Static AST/export check confirming MatchedClusterFilterParams is defined, exported, and used as the base for market/event cluster params
  • git diff --check

Current required generated-sync checks are red, but the failed diffs are broad pre-existing generated drift outside this focused Python type export (client generators would remove hosted-mode client helpers; API reference generation also changes unrelated sourceExchange/exchange docs and removes a TypeScript question doc line). I did not fold that unrelated drift into this focused PR.

@realfishsam

Copy link
Copy Markdown
Contributor Author

PR Review: PASS (NOT VERIFIED)

What This Does

Exports a shared Python MatchedClusterFilterParams TypedDict and refactors the market/event matched-cluster params to inherit the shared filter fields. This matters to Python SDK consumers who want to type reusable matched-cluster filter objects rather than only the market/event-specific aliases.

Blast Radius

Python SDK model/export surface only: sdks/python/pmxt/models.py and sdks/python/pmxt/__init__.py. No sidecar, OpenAPI schema, venue normalizer, router, or TypeScript SDK behavior is changed.

Consumer Verification

Before (base branch):
MatchedClusterFilterParams is not exported from pmxt.__init__.

Evidence:

base export name in file: False

After (PR branch):
MatchedClusterFilterParams is imported into the package root and listed in __all__; the market/event params inherit the shared filter annotations.

Evidence:

pr export name in file: True
has MatchedClusterFilterParams True
market has query True
event has query True

Full import pmxt could not be executed in this review environment because the generated Python client package (pmxt_internal) is not present, so this is source/AST-level verification rather than an installed-wheel import check.

Test Results

  • Build: N/A (Python type/export-only change)
  • Unit tests: PASS (Python AST parse and targeted models.py import)
  • Server starts: N/A
  • E2E smoke: N/A (not sidecar/API-visible)

Findings

No blocking findings.

PMXT Pipeline Check

  • Field propagation (3-layer): N/A
  • OpenAPI sync: N/A
  • Financial precision: N/A
  • Type safety: OK
  • Auth safety: N/A

Semver Impact

patch -- Python SDK export/type-alias compatibility fix.

Risk

Not verified from an installed Python package because generated SDK artifacts are unavailable in this checkout; CI/wheel build should still confirm from pmxt import MatchedClusterFilterParams works end-to-end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SDK drift: MatchedClusterFilterParams base interface exported in TypeScript has no Python equivalent

1 participant