crossbario / crossbario/autobahn-python

register/subscribe decorators support different URI syntax from what session.register and session.subscribe support

Open
#836 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.5k
Forks
768
PR merge metrics
No merged PRs in 30d

Description

I'm not sure how this happened but it seems like the pattern-based URI syntax supported by the register/subscribe decorators and the underlying Pattern object that supports them is not actually supported by the register/subscribe methods on the ApplicationSession class.

Example:

@wamp.register('a.b.c.<something>.e.f', options=RegisterOptions(match='wildcard', details_arg='details'))
def my_endpoint(details):
    pass

You would expect to be able to call that using:

session.call('a.b.c.blahblahblah.e.f')

but doing so will yield a No Callee error.

However:

session.call('a.b.c.<something>.e.f')

works when it probably shouldn't.

Additionally:

@wamp.register('a.b.c..e.f', options=RegisterOptions(match='wildcard', details_arg='details'))

raises an exception

It seems like the support for this is only half-implemented at the moment or did some commits get lost in the woodwork?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the register/subscribe decorators and their Pattern object with the register/subscribe methods on ApplicationSession, using the URI examples in the issue to reproduce each discrepancy. Done means the supported pattern syntax behaves consistently across decorators and session methods, including the wildcard call and the invalid double-dot pattern.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.