Skip to content

[BUG] autobahn flatbuffers support requires nonexisting autobahn.flatbuffers #1817

@mgorny

Description

@mgorny

Bug Description

Summary: autobahn flatbuffers serializer expects autobahn.flatbuffers which doesn't exist

Expected Behavior:
Working flatbuffers serializer. Or tests passing.

Actual Behavior:

_HAS_FLATBUFFERS = False
try:
from autobahn import flatbuffers # noqa
from autobahn.wamp import message_fbs
except ImportError:
pass
else:
_HAS_FLATBUFFERS = True

expects autobahn.flatbuffers. However, there is no such module. There is autobahn.wamp.flatbuffers package but it isn't installed correctly either (it only installs .fbs files). As a result, the test suite is failing:

===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/usr/lib/python3.11/unittest/case.py", line 57, in testPartExecutor
    yield
  File "/usr/lib/python3.11/unittest/case.py", line 623, in run
    self._callTestMethod(testMethod)
  File "/usr/lib/python3.11/unittest/case.py", line 579, in _callTestMethod
    if method() is not None:
  File "/tmp/portage/dev-python/autobahn-25.12.1/work/autobahn-25.12.1-python3_11/install/usr/lib/python3.11/site-packages/autobahn/wam
p/test/test_wamp_serializer.py", line 264, in test_basic
    ser = serializer.FlatBuffersSerializer()
builtins.AttributeError: module 'autobahn.wamp.serializer' has no attribute 'FlatBuffersSerializer'

autobahn.wamp.test.test_wamp_serializer.TestFlatBuffersSerializer.test_basic

Reproduction Steps

  1. pip install autobahn
  2. python -c 'import autobahn.wamp.serializer; print(autobahn.wamp.serializer._HAS_FLATBUFFERS)'

Environment

  • Package: autobahn-python
  • Version: 25.12.1
  • Python Version: n/a
  • Operating System: n/a
  • Framework: n/a

Additional Context

n/a

Checklist

  • I have searched existing issues to avoid duplicates
  • I have provided a minimal reproducible example
  • I have included version information
  • I have included error messages/logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions