Uh oh!
There was an error while loading. Please reload this page.
fix: suppress JSONDtypeWarning in Anywidget mode and clean up progress output - #2441
Conversation
sycai
left a comment
There was a problem hiding this comment.
Would it be possible to add a test, assuming that it would not be forbiddingly hard?
| elif progress_bar == "terminal": | ||
| if isinstance(event, bigframes.core.events.ExecutionStarted): | ||
| print("Starting execution.") | ||
| pass |
There was a problem hiding this comment.
nit: let's add a comment on why no action is needed.
There was a problem hiding this comment.
Done. I have added a comment explaining that we are skipping it to reduce noise in the terminal.
| with warnings.catch_warnings(): | ||
| warnings.simplefilter("ignore", bigframes.exceptions.JSONDtypeWarning) | ||
| warnings.simplefilter("ignore", category=FutureWarning) | ||
| self.orderable_columns = [ | ||
| str(col_name) | ||
| for col_name, dtype in dataframe.dtypes.items() | ||
| if dtypes.is_orderable(dtype) | ||
| ] |
There was a problem hiding this comment.
(No action needed) It seems this constructor is getting way more complicated than necessary. We may need a refactoring some time in the future. Given the tight timeline we have at the moment, this change can be merged as-is in this PR
There was a problem hiding this comment.
This chunk of code has been refactored for better readability.
…-anywidget-disable-warning # Conflicts: # bigframes/display/anywidget.py # bigframes/formatting_helpers.py
# Conflicts: # tests/system/small/test_series.py
# Conflicts: # bigframes/formatting_helpers.py
Uh oh!
There was an error while loading. Please reload this page.
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:e7cc6823efb073a8a26e7cefdd869f12ec228abfbd2a44aa9a7eacc284023677 <details><summary>bigframes: 2.35.0</summary> ## [2.35.0](v2.34.0...v2.35.0) (2026-02-07) ### Features * Add bigframes.pandas.col with basic operators (#2405) ([1274167](12741677)) * remove redundant "started." messages from progress output (#2440) ([2017cc2](2017cc2f)) * add bigframe.bigquery.load_data function (#2426) ([4b0f13b](4b0f13b2)) * Disable progress bars in Anywidget mode (#2444) ([4e2689a](4e2689a1)) * add bigquery.ai.generate_text function (#2433) ([5bd0029](5bd0029a)) * Disable progress bars in Anywidget mode to reduce notebook clutter (#2437) ([853240d](853240da)) * Add a bigframes cell magic for ipython (#2395) ([e6de52d](e6de52de)) * add `bigframes.bigquery.ai.generate_embedding` (#2343) ([e91536c](e91536c8)) ### Bug Fixes * always display the results in the `%%bqsql` cell magics output (#2439) ([2d973b5](2d973b54)) * exlcude gcsfs 2026.2.0 (#2445) ([311de31](311de31e)) * suppress JSONDtypeWarning in Anywidget mode and clean up progress output (#2441) ([e0d185a](e0d185ad)) ### Documentation * fix cast method shown on public docs (#2436) ([ad0f33c](ad0f33c6)) </details>
This PR improves the user experience when using the interactive anywidget display mode (bpd.options.display.repr_mode = "anywidget") by reducing console noise.
Verified at:
vs code notebook: screen/ACCJRLwyThciMk8
colab notebook: screen/BhNxzpvckYg9Wp8
Fixes #<482120359> 🦕