Commit 4514e3e
authored
Fix 1849 (#1855)
* add new dev branch with audit file
* Switch WAMP ubjson serializer from py-ubjson to bjdata (#1849)
Fixes #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).
* Docs: correct ubjson/bjdata packaging notes (sdist-only); drop py-ubjson refs (#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 #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).
* Make bjdata (ubjson serializer) CPython-only; PyPy can't build it (#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).
* test: bump .proto submodule to wamp-proto master (#557 merged)
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: #1849.
Note: This work was completed with AI assistance (Claude Code).
* test: re-enable ubjson in serdes conformance suite against bjdata vectors
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: #1849.
Note: This work was completed with AI assistance (Claude Code).1 parent f1ac1c3 commit 4514e3e
36 files changed
Lines changed: 211 additions & 74 deletions
File tree
- .audit
- docs
- examples/serdes/tests
- src/autobahn/wamp
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
- .ai+1-1
- .cicd+1-1
- .github/ISSUE_TEMPLATE/bug_report.md+62
- .github/ISSUE_TEMPLATE/config.yml+11
- .github/ISSUE_TEMPLATE/feature_request.md+80
- .github/PULL_REQUEST_TEMPLATE/pull_request_template.md+139
- .github/workflows/build-and-test.yml+8
- docs/_graphics/favicon.svg+22-19
- docs/_graphics/wamp_logo.svg-181
- docs/_static/img/appcode.svg+2
- docs/_static/img/computer-associates.svg+2
- docs/_static/img/crossbar_icon.svg+2-9
- docs/_static/img/favicon.ico
- docs/_static/img/favicon.svg+2
- docs/_static/img/goodbye.svg+2
- docs/_static/img/hello.svg+2
- docs/_static/img/hello_authenticated.svg+2
- docs/_static/img/hello_denied.svg+2
- docs/_static/img/kitware.svg+19
- docs/_static/img/li_edge.svg+2
- docs/_static/img/logo_genesi_wampws_site.svg+2
- docs/_static/img/mds_lab_messina.svg+2
- docs/_static/img/pubsub_publish1.svg+2
- docs/_static/img/pubsub_publish2.svg+2
- docs/_static/img/pubsub_subscribe1.svg+2
- docs/_static/img/pubsub_subscribe2.svg+2
- docs/_static/img/record-evolution.svg+6
- docs/_static/img/rpc_call1.svg+2
- docs/_static/img/rpc_call2.svg+2
- docs/_static/img/rpc_cancel1.svg+2
- docs/_static/img/rpc_cancel2.svg+2
- docs/_static/img/rpc_progress1.svg+2
- docs/_static/img/rpc_register1.svg+2
- docs/_static/img/rpc_register2.svg+2
- docs/_static/img/sessions.svg+2
- docs/_static/img/sessions2.svg+2
- docs/_static/img/sessions3.svg+2
- docs/_static/img/sessions4.svg+2
- docs/_static/img/tavendo.svg+30
- docs/_static/img/unified_routing_broker_dealer.svg+2
- docs/_static/img/unified_routing_pubsub_broker.svg+2
- docs/_static/img/unified_routing_rpc_client_server.svg+2
- docs/_static/img/unified_routing_rpc_dealer.svg+2
- docs/_static/img/unified_routing_wamp_iot.svg+2
- docs/_static/img/wamp-favicon.svg+2
- docs/_static/img/wamp-logo-design.svg+2
- docs/_static/img/wamp-logo.svg+2
- docs/_static/img/wamp_logo_old.svg+2
- docs/_static/img/wamp_logo_old_design.svg+2
- docs/_static/img/wamp_logo_old_tiny.svg+2
- docs/_static/img/wamp_logo_old_tiny_white.svg+2
- docs/conf.py+80-153
- docs/routing.rst+5-5
- justfile+33-6
- requirements.txt+5-1
- testsuite/README.md+37-7
- testsuite/SCHEMA.json+167-80
- testsuite/regen_ubjson_vectors.py+122
- testsuite/singlemessage/advanced/cancel.json+6-1
- testsuite/singlemessage/advanced/eventreceived.json+6-1
- testsuite/singlemessage/advanced/interrupt.json+6-1
- testsuite/singlemessage/advanced/publish_with_publisher_exclusion_disabled.json+56-40
- testsuite/singlemessage/basic/abort.json+6-1
- testsuite/singlemessage/basic/authenticate.json+6-1
- testsuite/singlemessage/basic/call.json+6-1
- testsuite/singlemessage/basic/challenge.json+6-1
- testsuite/singlemessage/basic/error.json+6-1
- testsuite/singlemessage/basic/event.json+24-4
- testsuite/singlemessage/basic/goodbye.json+6-1
- testsuite/singlemessage/basic/hello.json+6-1
- testsuite/singlemessage/basic/invocation.json+6-1
- testsuite/singlemessage/basic/publish.json+42-7
- testsuite/singlemessage/basic/published.json+6-1
- testsuite/singlemessage/basic/register.json+6-1
- testsuite/singlemessage/basic/registered.json+6-1
- testsuite/singlemessage/basic/result.json+6-1
- testsuite/singlemessage/basic/subscribe.json+6-1
- testsuite/singlemessage/basic/subscribed.json+6-1
- testsuite/singlemessage/basic/unregister.json+6-1
- testsuite/singlemessage/basic/unregistered.json+6-1
- testsuite/singlemessage/basic/unsubscribe.json+6-1
- testsuite/singlemessage/basic/unsubscribed.json+6-1
- testsuite/singlemessage/basic/welcome.json+6-1
- testsuite/singlemessage/basic/yield.json+6-1
- testsuite/validate_vectors.py+59
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
| 346 | + | |
347 | 347 | | |
348 | | - | |
| 348 | + | |
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
353 | | - | |
| 353 | + | |
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
366 | | - | |
| 366 | + | |
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
371 | | - | |
| 371 | + | |
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
| |||
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
432 | | - | |
| 432 | + | |
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
440 | | - | |
| 440 | + | |
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
11 | 18 | | |
12 | 19 | | |
13 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
15 | 29 | | |
16 | 30 | | |
17 | 31 | | |
| |||
48 | 62 | | |
49 | 63 | | |
50 | 64 | | |
51 | | - | |
| 65 | + | |
52 | 66 | | |
53 | 67 | | |
54 | 68 | | |
55 | 69 | | |
56 | | - | |
| 70 | + | |
57 | 71 | | |
58 | 72 | | |
59 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
65 | | - | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
132 | | - | |
| 133 | + | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | | - | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
136 | | - | |
| 137 | + | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
65 | | - | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
152 | | - | |
| 153 | + | |
153 | 154 | | |
154 | 155 | | |
155 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | | - | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
134 | | - | |
| 135 | + | |
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
| |||
0 commit comments