Fix 1849#1855
Merged
Merged
Conversation
Fixes crossbario#1849: py-ubjson is unmaintained and ships no wheels, so `pip install --only-binary :all:` for autobahn failed. The WAMP "ubjson" serializer is now backed by bjdata (Binary JData), a maintained, wheel-shipping successor. - serializer.py / message.py: import bjdata as the "ubjson" backend (serializer id unchanged for transport negotiation). - pyproject.toml: drop the unconditional py-ubjson dependency; bjdata is an OPTIONAL dependency in the `serialization` extra (it pulls in numpy, which we keep out of a minimal install). A minimal `pip install autobahn` now installs cleanly from wheels only. - PyPy: set PYBJDATA_NO_EXTENSION=1 in the test recipes and CI (serdes) to use bjdata's JIT-friendly pure-Python path (also avoids its numpy-ABI-fragile C extension). WIRE-LEVEL CHANGE: bjdata's octet encoding is NOT identical to the prior py-ubjson/UBJSON bytes (unsigned-int markers, little-endian). The wamp-proto UBJSON test vectors will be regenerated in a follow-up wamp-proto PR after the next autobahn-python release; until then the serdes byte-vector conformance suite excludes "ubjson" (round-trip + cross-serializer coverage is retained via test_wamp_serializer.py). See the changelog. Note: This work was completed with AI assistance (Claude Code).
…son refs (crossbario#1849) Follow-up wording/doc fixes for the py-ubjson -> bjdata switch: - README.md / docs/installation.rst: bjdata (like py-ubjson) is published sdist-only with no PyPI wheels and builds an optional C extension; document the optional `autobahn[serialization]` extra, PYBJDATA_NO_EXTENSION=1, and steer wheels-only/cross-arch users to cbor/msgpack. UBJSON is no longer described as "included by default". - docs/changelog.rst: reframe the crossbario#1849 fix as "the binary-JSON dependency is now optional, so a base autobahn install is wheel-clean" (bjdata itself ships no wheels). - serializer.py: drop the inaccurate "wheel-shipping" wording and state the sdist/C-extension reality. Note: This work was completed with AI assistance (Claude Code).
…ossbario#1849) bjdata's sdist build pulls numpy as an unconditional build dependency (`oldest-supported-numpy` in build-system.requires, plus a top-level `from numpy import get_include` in setup.py) even though it skips its C extension on PyPy. On PyPy that numpy pin (1.23.2) has no wheel and fails to compile, so `pip install autobahn[serialization]` cannot be installed on PyPy at all -- this broke the wstest CI jobs. Reported upstream as NeuroJSON/pybj#6. - pyproject.toml: restrict bjdata to CPython (`bjdata>=0.6.0; platform_python_implementation == 'CPython'`). On PyPy the UBJSON serializer is unavailable (graceful try/except ImportError); use cbor/msgpack instead. - Remove the now-moot PyPy PYBJDATA_NO_EXTENSION lines from justfile and CI: the flag can't help, because the numpy build dependency is installed under PEP 517 build isolation before bjdata's setup.py is ever run. - Update README, docs/installation.rst, docs/changelog.rst and the serializer.py comment to document bjdata as CPython-only, linking NeuroJSON/pybj#6. Note: This work was completed with AI assistance (Claude Code).
wamp-proto#557 (the canonical WAMP conformance test-vector suite) was squash-merged to wamp-proto master as d8389b8. Bump the .proto submodule to pick it up. This brings in the BJData (bjdata) UBJSON byte vectors, so the serdes conformance suite can be re-enabled for the "ubjson" serializer (follow-up commit). The serdes suite still passes (446) with "ubjson" currently excluded. Refs: crossbario#1849. Note: This work was completed with AI assistance (Claude Code).
…tors With the wamp-proto vectors now carrying both the legacy py-ubjson and the new bjdata/BJData byte representations for "ubjson" (.proto bumped in the previous commit), re-enable the serializer in the byte-vector conformance suite: - conftest: _VECTOR_EXCLUDED_SERIALIZERS is now empty (no serializer excluded). - utils.require_decodable(): new helper implementing the "at least one must match" rule for the deserialize direction. A serializer's variant list may hold encodings produced by other implementations/versions that this backend cannot decode, or decodes to a valid-but-wrong message (py-ubjson bytes read as little-endian bjdata). It keeps variants whose decode re-serializes to a canonical variant (cosmetic variants + this backend's own encoding), falling back to decode-without-error for serializers whose re-serialization is not byte-canonical (flatbuffers). At least one variant must qualify. - The 25 per-message test files use require_decodable() at their decode sites (deserialize-from-bytes, roundtrip, cross-serializer source) instead of iterating/indexing the raw variant list. Serdes suite: 529 passed (up from 446 with ubjson excluded). On PyPy, bjdata is unavailable so the ubjson serializer is simply not registered and these tests do not run. Refs: crossbario#1849. Note: This work was completed with AI assistance (Claude Code).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
fixes #1849
Related Issue(s)
Closes or relates to #1849
Checklist
the style guidelines of this project
is effective or that my feature works
updated the changelog
in this PR