Skip to content

Commit

Permalink
remove deprecated (#61)
Browse files Browse the repository at this point in the history
remove deprecated kwargs that were only present during the alpha release cycle while Session was being introduced

these need removing before the first stable released including Session
  • Loading branch information
JarbasAl authored Oct 24, 2023
1 parent 45521eb commit 678eed7
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions ovos_bus_client/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,24 +263,18 @@ def get_context(self, max_frames: int = None,
class Session:
def __init__(self, session_id: str = None, expiration_seconds: int = None,
active_skills: List[List[Union[str, float]]] = None,
history=None, max_time=None, max_messages=None,
utterance_states: dict = None, lang: str = None,
context: IntentContextManager = None,
valid_langs: List[str] = None,
site_id: str = "unknown",
pipeline: List[str] = None):
"""
Construct a session identifier
@param session_id: string UUID for the session
@param expiration_seconds: TTL for session (-1 for no expiration)
@param active_skills: List of list skill_id, last reference
@param history: DEPRECATED
@param max_time: DEPRECATED
@param max_messages: DEPRECATED
@param utterance_states: dict of skill_id to UtteranceState
@param lang: language associated with this Session
@param context: IntentContextManager for this Session
@param valid_langs: DEPRECATED
"""
self.session_id = session_id or str(uuid4())
self.lang = lang or get_default_lang()
Expand All @@ -305,15 +299,6 @@ def __init__(self, session_id: str = None, expiration_seconds: int = None,
]
self.context = context or IntentContextManager()

# deprecated - TODO remove 0.0.8
if history is not None or max_time is not None or max_messages is not None:
LOG.warning("valid_langs , history, max_time and max_messages have been deprecated")
self.history = [] # (Message , timestamp)
self.max_time = 5 # minutes
self.max_messages = 5
self.valid_languages = list(set([get_default_lang()] +
Configuration().get("secondary_langs", [])))

@property
def active(self) -> bool:
"""
Expand Down

0 comments on commit 678eed7

Please sign in to comment.