feat!: complete deprecation and cleanup of multimodal blob APIs#16618
feat!: complete deprecation and cleanup of multimodal blob APIs#16618
Conversation
There was a problem hiding this comment.
Code Review
This pull request transitions the blob accessor to an internal implementation (_blob) and removes or deprecates several public blob-related functions, including image and PDF processing utilities, in favor of bigframes.bigquery.obj functions. It also includes reformatting of various overloaded methods across the codebase. Feedback was provided to improve an error message in strings.py by making it dynamically reflect the method name to avoid confusion between public and internal methods.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Any reason still keeping this file?
There was a problem hiding this comment.
I have removed this file since TransformFuction was not used outside of it.
There was a problem hiding this comment.
We may want to remove this function too.
There was a problem hiding this comment.
Done. I've removed from_glob_path from Session, pandas/io/api.py, and pandas/init.py.
| connection = session._create_bq_connection(connection=connection) | ||
| return self._data._apply_binary_op(connection, ops.obj_make_ref_op) | ||
|
|
||
| def to_blob(self, connection: Optional[str] = None) -> T: |
There was a problem hiding this comment.
Done. I've removed to_blob and _to_blob from StringMethods.
There was a problem hiding this comment.
Done. I've removed read_gbq_object_table from Session, pandas/io/api.py, and pandas/init.py.
| @@ -0,0 +1 @@ | |||
| 3.14.2 | |||
There was a problem hiding this comment.
Where does this come from?
There was a problem hiding this comment.
I'm not sure where it came from, likely added by mistake by some tool as it contained an invalid version (3.14.2). I've removed it.
| @@ -1 +1 @@ | |||
| # Copyright 2025 Google LLC | |||
There was a problem hiding this comment.
I don't quite get the file name and the test names in this file. Looks like they don't match.
We should rewrite those.
There was a problem hiding this comment.
I have rewritten the tests in test_blob_ops.py to use the blob prefix (e.g., test_blob_get_access_url) to match the file name. I also updated them to use the new bigframes.bigquery.obj.make_ref API instead of the deprecated str._to_blob, and updated the snapshots accordingly.
|
The title should be feat! instead of refactor!, as it is a user-facing change. |
This PR completes the deprecation and cleanup of the public multimodal blob APIs in BigFrames. These APIs were not intended for general public use and are being internalized or removed to clean up the public API surface.
Key Changes:
API Internalization:
Deprecations:
Deprecated Session.from_glob_path. It will now emit a warning suggesting users use read_gbq with a reference column instead.
Cleanup:
Fixes #<478952827> 🦕