Fix BlockContext import bug in utils.py (#3424)

* Fix import bug

* CHANGELOG
This commit is contained in:
Freddy Boulton 2023-03-09 08:59:10 -07:00 committed by GitHub
parent 12fb005ac8
commit 909b94f452
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -5,9 +5,10 @@
No changes to highlight.
## Bug Fixes:
- Use `huggingface_hub` to send telemetry on `interface` and `blocks`; eventaully to replace segment by [@dawoodkhan82](https://github.com/dawoodkhan82) in [PR 3342](https://github.com/gradio-app/gradio/pull/3342)
- Use `huggingface_hub` to send telemetry on `interface` and `blocks`; eventually to replace segment by [@dawoodkhan82](https://github.com/dawoodkhan82) in [PR 3342](https://github.com/gradio-app/gradio/pull/3342)
- Ensure load events created by components (randomize for slider, callable values) are never queued unless every is passed by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 3391](https://github.com/gradio-app/gradio/pull/3391)
- Prevent in-place updates of `generic_update` by shallow copying by [@gitgithan](https://github.com/gitgithan) in [PR 3405](https://github.com/gradio-app/gradio/pull/3405) to fix [#3282](https://github.com/gradio-app/gradio/issues/3282)
- Fix bug caused by not importing `BlockContext` in `utils.py` by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 3424](https://github.com/gradio-app/gradio/pull/3424)
## Documentation Changes:
- Added a section on security and access when sharing Gradio apps by [@abidlabs](https://github.com/abidlabs) in [PR 3408](https://github.com/gradio-app/gradio/pull/3408)

View File

@ -154,6 +154,8 @@ def launched_telemetry(blocks: gradio.Blocks, data: Dict[str, Any]) -> None:
[],
)
from gradio.blocks import BlockContext
for x in list(blocks.blocks.values()):
blocks_telemetry.append(x.get_block_name()) if isinstance(
x, BlockContext