Skip to content

fix(deps): make uamqp optional on ARM macOS#1

Open
marcodalessandro wants to merge 11 commits intomainfrom
fix/uamqp-macos-compatibility
Open

fix(deps): make uamqp optional on ARM macOS#1
marcodalessandro wants to merge 11 commits intomainfrom
fix/uamqp-macos-compatibility

Conversation

@marcodalessandro
Copy link
Owner

Test PR to trigger CI workflow

marcodalessandro and others added 11 commits March 5, 2026 14:49
uamqp fails to build on Apple Silicon due to stricter clang type
checking. Exclude it from install_requires on ARM macOS via PEP 508
marker while keeping it for Windows, Linux, and Intel Mac. Add [amqp]
extra for opt-in. Gracefully handle missing uamqp at runtime so all
non-C2D functionality works without it.
- Replace bare except ImportError with explicit HAS_UAMQP check
- Use IntEnum for fallback TransportType for better API compatibility
- Remove unused imports in test_no_uamqp.py
- Strengthen test_delete_device assertion with exact call args
six is a Python 2 compatibility library that is not reliably available
as a transitive dependency on all Python versions, causing CI failures.
The existing test file imported TransportType directly from uamqp,
which fails on ARM macOS where uamqp is not installed. Import from
the registry manager module which has a fallback enum.
- Deduplicate ImportError message using shared _UAMQP_MISSING_ERROR constant
- Fix mutable default argument properties={} in send_c2d_message
- Improve fallback IntEnum test to exercise actual runtime fallback via reload
Revert six.moves.urllib back to maintain Python 2 compatibility
declared in setup.py metadata. Add six as explicit install_requires
since it is used directly. Trim CI matrix to match classifiers (3.9-3.10).
Co-Authored-By: Claude <noreply@anthropic.com>
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