Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove CompositionView (#10590) #10762

Merged
merged 2 commits into from
Jan 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/10590.removal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Removed CompositionView.
11 changes: 1 addition & 10 deletions rasa/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from rasa.core.lock_store import LockStore, RedisLockStore, InMemoryLockStore
from rasa.utils.endpoints import EndpointConfig, read_endpoint_config
from sanic import Sanic
from sanic.views import CompositionView
from socket import SOCK_DGRAM, SOCK_STREAM
import rasa.cli.utils as cli_utils

Expand Down Expand Up @@ -118,15 +117,7 @@ def find_route(suffix: Text, path: Text) -> Optional[Text]:
for arg in route._params:
options[arg] = f"[{arg}]"

if not isinstance(route.handler, CompositionView):
handlers = [
(list(route.methods)[0], route.name.replace("rasa.server.", ""))
]
else:
handlers = [
(method, find_route(v.__name__, endpoint) or v.__name__)
for method, v in route.handler.handlers.items()
]
handlers = [(list(route.methods)[0], route.name.replace("rasa.server.", ""))]

for method, name in handlers:
full_endpoint = "/" + "/".join(endpoint)
Expand Down