Skip to content

Conversation

@abidlabs
Copy link
Member

@abidlabs abidlabs commented Dec 9, 2025

Fixes: #12530 and a stray console.trace()

@abidlabs abidlabs changed the title changes Allow custom HTML components to be defined in jupyter notebooks Dec 9, 2025
@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Dec 9, 2025

🪼 branch checks and previews

Name Status URL
Spaces ready! Spaces preview
Website building...
🦄 Changes detected! Details

Install Gradio from this PR

pip install https://gradio-pypi-previews.s3.amazonaws.com/cfca9055e91941f2d1799488a33e8d6323727e4e/gradio-6.0.2-py3-none-any.whl

Install Gradio Python Client from this PR

pip install "gradio-client @ git+https://github.com/gradio-app/gradio@cfca9055e91941f2d1799488a33e8d6323727e4e#subdirectory=client/python"

Install Gradio JS Client from this PR

npm install https://gradio-npm-previews.s3.amazonaws.com/cfca9055e91941f2d1799488a33e8d6323727e4e/gradio-client-2.0.0.tgz

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Dec 9, 2025

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
@gradio/html patch
gradio patch

  • Allow custom HTML components to be defined in jupyter notebooks

✅ Changeset approved by @abidlabs

  • Maintainers can remove approval by unchecking this checkbox.

Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can update the changelog file directly.

and isinstance(expr.test.ops[0], ast.Eq)
and isinstance(expr.test.comparators[0], ast.Constant)
and expr.test.comparators[0].s == "__main__"
and expr.test.comparators[0].value == "__main__"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated fix for reload mode in Python 3.14 (.s has been removed)

gradio/blocks.py Outdated
module_path = sys.modules[module_name].__file__
try:
module_path = inspect.getfile(cls)
except (TypeError, OSError):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs say this only fails with a TypeError: https://docs.python.org/3.10/library/inspect.html

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet will simplify

Copy link
Collaborator

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @abidlabs !

@abidlabs
Copy link
Member Author

abidlabs commented Dec 9, 2025

Thanks for the review @freddyaboulton! Fixed, will merge in

@abidlabs abidlabs merged commit 8aaa209 into main Dec 9, 2025
15 of 16 checks passed
@abidlabs abidlabs deleted the ccfix branch December 9, 2025 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Creating a custom HTML component in a jupyter notebook doesn't work

5 participants