Skip to content

Commit

Permalink
Rel 1931 (#1140)
Browse files Browse the repository at this point in the history
* add assert error messages

* add changelog entry and bump version
  • Loading branch information
oberstet committed Mar 18, 2019
1 parent c7b7fc4 commit c934105
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion autobahn/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
#
###############################################################################

__version__ = u'19.2.1'
__version__ = u'19.3.1'
13 changes: 8 additions & 5 deletions autobahn/wamp/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,13 +789,16 @@ def __init__(self,
assert(eligible_authrole is None or type(eligible_authrole) == six.text_type or (type(eligible_authrole) == list and all(type(x) == six.text_type for x in eligible_authrole)))
assert(retain is None or type(retain) == bool)

assert(forward_for is None or type(forward_for) == list)
assert(forward_for is None or type(forward_for) == list), 'forward_for, when present, must have list type - was {}'.format(type(forward_for))
if forward_for:
for ff in forward_for:
assert type(ff) == dict
assert 'session' in ff and type(ff['session']) in six.integer_types
assert 'authid' in ff and type(ff['authid']) == six.text_type
assert 'authrole' in ff and type(ff['authrole']) == six.text_type
assert type(ff) == dict, 'forward_for must be type dict - was {}'.format(type(ff))
assert 'session' in ff, 'forward_for must have session attribute'
assert type(ff['session']) in six.integer_types, 'forward_for.session must have integer type - was {}'.format(type(ff['session']))
assert 'authid' in ff, 'forward_for must have authid attributed'
assert type(ff['authid']) == six.text_type, 'forward_for.authid must have str type - was {}'.format(type(ff['authid']))
assert 'authrole' in ff, 'forward_for must have authrole attribute'
assert type(ff['authrole']) == six.text_type, 'forward_for.authrole must have str type - was {}'.format(type(ff['authrole']))

self.acknowledge = acknowledge
self.exclude_me = exclude_me
Expand Down
11 changes: 11 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@
Changelog
=========

19.3.1
------

* new: add experimental support for WAMP-FlatBuffers serializer: EVENT and PUBLISH messages for now only
* new: add FlatBuffers schema for WAMP messages
* fix: improve serializer package preference behavior depending on CPy vs PyPy
* fix: relax protocol violations: ignore unknown INTERRUPT and GOODBYE already sent; reduce log noise
* fix: skipping Yield message if transport gets closed before success callback is called (#1119)
* fix: integer division in logging in py3 (#1120)
* fix: Await tasks after they've been cancelled in `autobahn.asycio.component.nicely_exit` (#1116)

19.2.1
------

Expand Down

0 comments on commit c934105

Please sign in to comment.