Skip to content

Commit

Permalink
fix: COMPOSIO_DISABLE_VERSION_CHECK not being respected (#981)
Browse files Browse the repository at this point in the history
  • Loading branch information
tushar-composio authored Dec 12, 2024
1 parent f3bd53d commit e0cf0f4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions python/composio/utils/warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,14 @@ def _fetch_latest_version():


def create_latest_version_warning_hook(version: str):
if os.environ.get("COMPOSIO_DISABLE_VERSION_CHECK", "false").lower() != "false":
return lambda: None

version_thread = threading.Thread(target=_fetch_latest_version, daemon=True)
version_thread.start()

def latest_version_warning() -> None:
try:
if (
os.environ.get("COMPOSIO_DISABLE_VERSION_CHECK", "false").lower()
== "true"
):
return

version_thread.join(timeout=0.1)
if _latest_version is None:
return
Expand Down

0 comments on commit e0cf0f4

Please sign in to comment.