Remove intent-service backwards compatibility

- 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
pull/2849/head
Åke Forslund 2021-03-07 09:03:07 +01:00
parent 17dbaa2b38
commit 203e1fc740
4 changed files with 3 additions and 12 deletions

View File

@ -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

View File

@ -95,11 +95,6 @@ class FallbackSkill(MycroftSkill):
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}))

View File

@ -26,9 +26,6 @@ from .intent_services import (
)
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.

View File

@ -18,8 +18,9 @@ from adapt.intent import IntentBuilder
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