Skip to content

fix(python-sdk): export feed client support types#1172

Open
realfishsam wants to merge 1 commit into
mainfrom
fix/issue-1170-python-feed-types
Open

fix(python-sdk): export feed client support types#1172
realfishsam wants to merge 1 commit into
mainfrom
fix/issue-1170-python-feed-types

Conversation

@realfishsam

Copy link
Copy Markdown
Contributor

Summary

  • Export Python FeedClient support types at the package root: Ticker, Tickers, OHLCV, Market, FeedMarket, and OracleRound.
  • Add a public-export regression test for the feed support types.

Fixes #1170

Test Plan

  • python3 -m py_compile sdks/python/pmxt/feed_client.py sdks/python/pmxt/__init__.py sdks/python/tests/test_public_exports.py
  • AST regression check that the feed support types are imported from feed_client and present in __all__
  • git diff --check

Notes

  • python3 -m pytest was not available in this cron image (No module named pip / no pytest command), so I ran the equivalent targeted AST assertions directly.
  • npm run generate:docs --workspace=pmxt-core produced broad unrelated API reference/config drift, so those generated files were reverted to keep this PR scoped.

@realfishsam

Copy link
Copy Markdown
Contributor Author

CI is currently red on generated-sync checks that are unrelated to this focused export fix:

  • Verify COMPLIANCE.md is up-to-date
  • Verify client.py methods are up-to-date
  • Verify client.ts methods are up-to-date
  • Verify API_REFERENCE.md files are up-to-date

I reproduced the generator path on a fresh origin/main worktree after #1150 and it wants broad generated drift: remove core/COMPLIANCE.md Hunch rows and strip large hosted client overrides in both SDK clients, plus API reference timestamp/source drift. I am intentionally keeping this PR scoped to #1170 instead of folding that unrelated generated drift into it.

Focused validation passed:

  • python3 -m py_compile sdks/python/pmxt/feed_client.py sdks/python/pmxt/__init__.py sdks/python/tests/test_public_exports.py
  • direct AST regression check for FeedClient, Ticker, Tickers, OHLCV, Market, FeedMarket, and OracleRound imports + __all__
  • git diff --check

@realfishsam

Copy link
Copy Markdown
Contributor Author

PR Review: PASS (NOT VERIFIED)

What This Does

Exports feed-client support types (Ticker, Tickers, OHLCV, Market, FeedMarket, OracleRound) from the Python SDK package root and adds the missing aliases in feed_client.py. This matters to Python SDK consumers who want the same top-level typed imports they already get for FeedClient.

Blast Radius

Python SDK package-root exports and feed-client type aliases only: sdks/python/pmxt/__init__.py, sdks/python/pmxt/feed_client.py, and a public-exports test. No core sidecar route, exchange normalizer, OpenAPI schema, TypeScript SDK, or generated SDK code is affected.

Consumer Verification

Before (base branch):
Static consumer-path check on origin/main showed __init__.py did not import/export the support types, and feed_client.py did not define Tickers or FeedMarket.

# origin/main
from pmxt import FeedClient  # available
from pmxt import Ticker, Tickers, FeedMarket  # not available at package root

After (PR branch):
Static consumer-path check on pr-1172 showed __init__.py imports the support types from feed_client and includes them in __all__; feed_client.py defines the new aliases.

from .feed_client import FeedClient, FeedMarket, Market, OHLCV, OracleRound, Ticker, Tickers

Tickers = Dict[str, Ticker]
FeedMarket = Market

Test Results

  • Build: N/A — Python export-only source change; python3 -m py_compile sdks/python/pmxt/__init__.py sdks/python/pmxt/feed_client.py passed.
  • Unit tests: NOT VERIFIED — repository-level Python pytest is unavailable in this review environment (/usr/bin/python3: No module named pytest observed during the daily verification run), and importing pmxt directly is blocked by absent generated package dependency pmxt_internal in this checkout.
  • Server starts: N/A — no sidecar API behavior changed.
  • E2E smoke: N/A — no HTTP consumer path changed.

Findings

No blocking findings.

PMXT Pipeline Check

  • Field propagation (3-layer): N/A
  • OpenAPI sync: N/A
  • Financial precision: N/A
  • Type safety: OK — aliases point at the existing dataclass/tuple/dict types without changing runtime behavior.
  • Auth safety: N/A

Semver Impact

patch -- backward-compatible public export/type-alias fix.

Risk

I could not execute the Python public-export test suite end-to-end because the local review checkout lacks pytest/generated pmxt_internal; verification is based on source inspection plus Python syntax compilation.

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: FeedClient supporting types (Ticker, Tickers, OHLCV, Market, OracleRound) not publicly exported from the Python package

1 participant