revert: DataFrame display uses IPython's _repr_mimebundle_#2316
Merged
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
_repr_mimebundle_
tswast
approved these changes
Dec 9, 2025
Collaborator
|
Approving to unblock the release. We should try to restore this soon. There are a few small fixes that we lose with this revert, such as swallowing ValueError and such. |
tswast
reviewed
Dec 9, 2025
Comment on lines
-861
to
-865
| # Handle both tuple (data, metadata) and dict returns | ||
| if isinstance(widget_repr_result, tuple): | ||
| widget_repr = dict(widget_repr_result[0]) # Extract data dict from tuple | ||
| for col in blob_cols: | ||
| # TODO(garrettwu): Not necessary to get access urls for all the rows. Update when having a to get URLs from local data. | ||
| df[col] = df[col].blob._get_runtime(mode="R", with_metadata=True) | ||
| else: | ||
| widget_repr = dict(widget_repr_result) |
Collaborator
There was a problem hiding this comment.
I believe this is where the bug was. We should not discard the metadata. We should save it and return it.
Contributor
Author
There was a problem hiding this comment.
Thanks for the suggestion, I will take a closer look at it after lunch.
This was referenced Dec 10, 2025
tswast
pushed a commit
that referenced
this pull request
Dec 11, 2025
PR created by the Librarian CLI to initialize a release. Merging this PR will auto trigger a release. Librarian Version: v0.7.0 Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:c8612d3fffb3f6a32353b2d1abd16b61e87811866f7ec9d65b59b02eb452a620 <details><summary>bigframes: 2.31.0</summary> ## [2.31.0](v2.30.0...v2.31.0) (2025-12-10) ### Features * add `bigframes.bigquery.ml` methods (#2300) ([719b278](719b278c)) * add 'weekday' property to DatatimeMethod (#2304) ([fafd7c7](fafd7c73)) ### Bug Fixes * cache DataFrames to temp tables in bigframes.bigquery.ml methods to avoid time travel (#2318) ([d993831](d9938319)) ### Reverts * DataFrame display uses IPython's `_repr_mimebundle_` (#2316) ([e4e3ec8](e4e3ec85)) </details>
tswast
pushed a commit
that referenced
this pull request
Dec 11, 2025
PR created by the Librarian CLI to initialize a release. Merging this PR will auto trigger a release. Librarian Version: v0.7.0 Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:c8612d3fffb3f6a32353b2d1abd16b61e87811866f7ec9d65b59b02eb452a620 <details><summary>bigframes: 2.31.0</summary> ## [2.31.0](v2.30.0...v2.31.0) (2025-12-10) ### Features * add `bigframes.bigquery.ml` methods (#2300) ([719b278](719b278c)) * add 'weekday' property to DatatimeMethod (#2304) ([fafd7c7](fafd7c73)) ### Bug Fixes * cache DataFrames to temp tables in bigframes.bigquery.ml methods to avoid time travel (#2318) ([d993831](d9938319)) ### Reverts * DataFrame display uses IPython's `_repr_mimebundle_` (#2316) ([e4e3ec8](e4e3ec85)) </details>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
revert "refactor: Migrate DataFrame display to use IPython's repr_mimebundle() protocol for anywidget mode (#2271)"
This reverts commit 41630b5 for bug 466155761.
Verified at Colab: screen/AjTEQC8SrSfMqhN
Fixes #< 466155761 > 🦕