Skip to content

Fix BridgeApi package imports and wrapper smoke tests#1

Open
alxdncn wants to merge 1 commit into
mainfrom
bug/bridge-python-sdk-relative-import
Open

Fix BridgeApi package imports and wrapper smoke tests#1
alxdncn wants to merge 1 commit into
mainfrom
bug/bridge-python-sdk-relative-import

Conversation

@alxdncn

@alxdncn alxdncn commented Jun 23, 2026

Copy link
Copy Markdown

Source / Evidence

Customer reported that BridgeApi.py raises ModuleNotFoundError for BridgeDataTypes unless users manually add bridge_python_sdk to sys.path.

Internal testing confirmed the BridgeDataTypes import issue is separate from the native Bridge crash and should be fixed in the Python SDK package import behavior.

Summary

  • Changed BridgeApi.py to use package-relative BridgeDataTypes imports when loaded as bridge_python_sdk.BridgeApi.
  • Preserved legacy direct module import behavior for existing examples/workflows that place src/bridge_python_sdk on sys.path.
  • Fixed related Bridge API wrapper issues:
    • get_display_aspect() now calls the correctly bound native wrapper name.
    • *_for_display scalar wrappers now pass the debug flag expected by _scalar_call.
  • Added focused unittest coverage for package import, legacy import, and the wrapper fixes.

Tests Run

  • python -m unittest tests.test_imports
  • python -m compileall -q src\bridge_python_sdk

Manual Testing Notes

I did not run a full device-backed Bridge initialization test. The change was verified without instantiating BridgeAPI against native Bridge runtime/device behavior.

Docs Impact

None expected. This fixes SDK import/package behavior and related wrappers without changing documented usage.

Risk

Low. Changes are scoped to Python import/package behavior and lightweight wrapper call fixes.

Residual Risk

This does not address the separate native bridge_inproc.dll load/init crash from the same customer thread.

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.

1 participant