crossbario / crossbario/autobahn-python
Allow loose/strict URI checking levels also for decorators and component API
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.5k
- Forks
- 768
- PR merge metrics
- No merged PRs in 30d
Description
Capital letters are not allowed in registered URIs. For example, @register('example.camelCaseFails') fails:
#!/usr/bin/env python3.6
# -*- coding: utf-8 -*-
from autobahn.wamp import register
from autobahn.twisted.wamp import ApplicationRunner, ApplicationSession
class Example(ApplicationSession):
@register('example.snake_case_succeeds')
def foo(self):
pass
@register('example.camelCaseFails')
def blah(self):
pass
ApplicationRunner(None, None).run(WampServices)
Raises
Traceback (most recent call last):
File "./autobahn-register-camel-case.py", line 7, in <module>
class Example(ApplicationSession):
File "./autobahn-register-camel-case.py", line 12, in Example
@register('warden.camelCaseFails')
File "/usr/local/lib/python3.6/dist-packages/autobahn/wamp/uri.py", line 343, in decorate
f._wampuris.append(Pattern(real_uri, Pattern.URI_TARGET_ENDPOINT, options))
File "/usr/local/lib/python3.6/dist-packages/autobahn/wamp/uri.py", line 215, in __init__
raise Exception("invalid URI")
Exception: invalid URI
Googling, the only related discussion I found was
https://groups.google.com/forum/#!topic/autobahnws/mkjF21Fb8ow
Why, by default, are capital letters (e.g. for camelCase) not allowed in registered URIs?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in autobahn/wamp/uri.py at the register decorator and Pattern validation, then trace how ApplicationRunner and ApplicationSession expose component registration. Determine how loose and strict URI checking levels should be passed through decorators and the component API, and verify that the default behavior remains defined and covered by the relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100