Skip to content

Commit

Permalink
Only allow messaging update if analytics is enabled (#4236)
Browse files Browse the repository at this point in the history
* Only allow messaging update if analytics are allowed

Follows up on #4194

* Remove duplicate changelog entry

* remove circular import

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
  • Loading branch information
akx and abidlabs authored May 16, 2023
1 parent d6c9322 commit e54e943
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
## Bug Fixes:

- Fix "TypeError: issubclass() arg 1 must be a class" When use Optional[Types] by [@lingfengchencn](https://github.com/lingfengchencn) in [PR 4200](https://github.com/gradio-app/gradio/pull/4200).
- Gradio will no longer send any analytics if analytics are disabled with the GRADIO_ANALYTICS_ENABLED environment variable. By [@akx](https://github.com/akx) in [PR 4194](https://github.com/gradio-app/gradio/pull/4194)
- Gradio will no longer send any analytics or call home if analytics are disabled with the GRADIO_ANALYTICS_ENABLED environment variable. By [@akx](https://github.com/akx) in [PR 4194](https://github.com/gradio-app/gradio/pull/4194) and [PR 4236](https://github.com/gradio-app/gradio/pull/4236)
- The deprecation warnings for kwargs now show the actual stack level for the invocation, by [@akx](https://github.com/akx) in [PR 4203](https://github.com/gradio-app/gradio/pull/4203).
- Fix "TypeError: issubclass() arg 1 must be a class" When use Optional[Types] by [@lingfengchencn](https://github.com/lingfengchencn) in [PR 4200](https://github.com/gradio-app/gradio/pull/4200).
- Fixes a bug with typing.get_type_hints() on Python 3.9 by [@abidlabs](https://github.com/abidlabs) in [PR 4228](https://github.com/gradio-app/gradio/pull/4228).
Expand Down
4 changes: 3 additions & 1 deletion gradio/strings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json
import os
import threading
from typing import Dict

Expand Down Expand Up @@ -45,4 +46,5 @@ def get_updated_messaging(en: Dict):
pass


threading.Thread(target=get_updated_messaging, args=(en,)).start()
if os.getenv("GRADIO_ANALYTICS_ENABLED", "True") == "True":
threading.Thread(target=get_updated_messaging, args=(en,)).start()

0 comments on commit e54e943

Please sign in to comment.