Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Commit

Permalink
Remove intent-service backwards compatibility
Browse files Browse the repository at this point in the history
- Remove unused ContextManager import from mycroft.skills.intent_service
- Remove Old 'intent_failure' -> fallback handler
- Remove handling of fallback messages without the fallback_range
parameter
  • Loading branch information
forslund committed Mar 7, 2021
1 parent 17dbaa2 commit 203e1fc
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
2 changes: 0 additions & 2 deletions mycroft/skills/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,6 @@ def _register_intent_services(bus):
'mycroft.skills.fallback',
FallbackSkill.make_intent_failure_handler(bus)
)
# Backwards compatibility TODO: remove in 20.08
bus.on('intent_failure', FallbackSkill.make_intent_failure_handler(bus))
return service


Expand Down
5 changes: 0 additions & 5 deletions mycroft/skills/fallback_skill.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,6 @@ def handler(message):
bus.emit(message.forward('mycroft.skill.handler.complete',
data={'handler': "fallback",
'exception': warning}))
if 'fallback_range' not in message.data:
# Old system TODO: Remove in 20.08
# No fallback could handle the utterance
bus.emit(message.forward('complete_intent_failure'))
LOG.warning(warning)

# return if the utterance was handled to the caller
bus.emit(message.response(data={'handled': status}))
Expand Down
3 changes: 0 additions & 3 deletions mycroft/skills/intent_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
)
from .intent_service_interface import open_intent_envelope

# TODO: Remove in 20.08 (Backwards compatibility)
from .intent_services.adapt_service import ContextManager


def _get_message_lang(message):
"""Get the language from the message or the default language.
Expand Down
5 changes: 3 additions & 2 deletions test/unittests/skills/test_intent_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@

from mycroft.configuration import Configuration
from mycroft.messagebus import Message
from mycroft.skills.intent_service import (ContextManager, IntentService,
_get_message_lang, AdaptIntent)
from mycroft.skills.intent_service import IntentService, _get_message_lang
from mycroft.skills.intent_services.adapt_service import (ContextManager,
AdaptIntent)

from test.util import base_config

Expand Down

0 comments on commit 203e1fc

Please sign in to comment.