Skip to content

Export Python filter function type aliases from package root - #1546

Merged
realfishsam merged 1 commit into
pmxt-dev:mainfrom
jordansilly77-stack:fix-python-filter-function-exports
Jul 10, 2026
Merged

Export Python filter function type aliases from package root#1546
realfishsam merged 1 commit into
pmxt-dev:mainfrom
jordansilly77-stack:fix-python-filter-function-exports

Conversation

@jordansilly77-stack

Copy link
Copy Markdown
Contributor

Summary

  • export MarketFilterFunction and EventFilterFunction from the Python package root
  • keep __all__ aligned with the imported public model symbols
  • add a public export regression test for the two filter function aliases

Why

Fixes #1464. The TypeScript SDK exposes these filter-function types from the package root, while the Python SDK defines and uses the same aliases internally but does not re-export them from pmxt.

Validation

  • ./sdks/python/.venv/bin/python -m pytest sdks/python/tests/test_public_exports.py -q -> 9 passed
  • ./sdks/python/.venv/bin/python -m pytest sdks/python/tests -q -> 259 passed, 66 deselected

@realfishsam

Copy link
Copy Markdown
Contributor

PR Review: PASS (NOT VERIFIED)

What This Does

Exports Python SDK filter function type aliases (MarketFilterFunction, EventFilterFunction) from the package root and adds AST tests to keep them public.

Blast Radius

Python SDK package root and Python public-export tests only. No sidecar/core behavior changes.

Consumer Verification

Before (base branch):
pmxt.models defined the filter function aliases, but pmxt.__init__ did not import them or include them in __all__, so from pmxt import MarketFilterFunction was not a supported root import.

After (PR branch):
Static trace shows MarketFilterFunction / EventFilterFunction imported from .models and added to __all__; the new test asserts both sets. I could not execute the Python tests because this scheduled environment lacks pytest (/usr/bin/python3: No module named pytest).

Test Results

  • Build: PASS for current main core build during scheduled run
  • Unit tests: NOT VERIFIED for Python (pytest missing in environment); core Jest PASS on current main (699 passed, 3 skipped)
  • Server starts: N/A
  • E2E smoke: PASS by static import/export trace, NOT VERIFIED by runtime import

Findings

No blocking findings.

PMXT Pipeline Check

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

Semver Impact

patch -- restores/expands package-root type exports without changing runtime API behavior.

Risk

Runtime import was not exercised due missing pytest / Python SDK test harness dependencies in this cron environment.

@realfishsam
realfishsam merged commit 2b58bd5 into pmxt-dev:main Jul 10, 2026
4 checks passed
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: MarketFilterFunction/EventFilterFunction exported from TypeScript package root, absent from Python package root

2 participants