Skip to content

Conversation

@tswast
Copy link
Collaborator

@tswast tswast commented Dec 8, 2025

Pandas 3.0 is currently broken. See: b/467009644 and #2314 for context.

@tswast tswast requested review from a team as code owners December 8, 2025 16:47
@tswast tswast requested a review from GarrettWu December 8, 2025 16:47
@product-auto-label product-auto-label bot added the size: xs Pull request size is extra small. label Dec 8, 2025
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. label Dec 8, 2025
@tswast tswast changed the title chore: temporarily disable prerelease tests from e2e kokoro session deps: bigframes is incompatible with pandas 3.0 (for now) Dec 8, 2025
@tswast
Copy link
Collaborator Author

tswast commented Dec 8, 2025

_____________________ test_string_astype_json_in_safe_mode _____________________
[gw8] linux -- Python 3.12.7 /tmpfs/src/github/python-bigquery-dataframes/.nox/system-3-12/bin/python

    def test_string_astype_json_in_safe_mode():
        data = ["this is not a valid json string"]
        bf_series = series.Series(data, dtype=dtypes.STRING_DTYPE)
        bf_result = bf_series.astype(dtypes.JSON_DTYPE, errors="null")
        assert bf_result.dtype == dtypes.JSON_DTYPE
    
        expected = pd.Series([None], dtype=dtypes.JSON_DTYPE)
        expected.index = expected.index.astype("Int64")
>       pd.testing.assert_series_equal(bf_result.to_pandas(), expected)

tests/system/small/test_series.py:4034: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.nox/system-3-12/lib/python3.12/site-packages/pandas/_testing/asserters.py:810: in assert_extension_array_equal
    assert_numpy_array_equal(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

left = array([False]), right = array([ True]), err_msg = None

    def _raise(left, right, err_msg) -> NoReturn:
        if err_msg is None:
            if left.shape != right.shape:
                raise_assert_detail(
                    obj, f"{obj} shapes are different", left.shape, right.shape
                )
    
            diff = 0
            for left_arr, right_arr in zip(left, right):
                # count up differences
                if not array_equivalent(left_arr, right_arr, strict_nan=strict_nan):
                    diff += 1
    
            diff = diff * 100.0 / left.size
            msg = f"{obj} values are different ({np.round(diff, 5)} %)"
>           raise_assert_detail(obj, msg, left, right, index_values=index_values)
E           AssertionError: Series NA mask are different
E           
E           Series NA mask values are different (100.0 %)
E           [index]: [0]
E           [left]:  [False]
E           [right]: [True]

.nox/system-3-12/lib/python3.12/site-packages/pandas/_testing/asserters.py:690: AssertionError
_____________________ test_string_astype_json_raise_error ______________________
[gw8] linux -- Python 3.12.7 /tmpfs/src/github/python-bigquery-dataframes/.nox/system-3-12/bin/python

    def test_string_astype_json_raise_error():
        data = ["this is not a valid json string"]
        bf_series = series.Series(data, dtype=dtypes.STRING_DTYPE)
>       with pytest.raises(
            google.api_core.exceptions.BadRequest,
            match="syntax error while parsing value",
        ):
E       Failed: DID NOT RAISE <class 'google.api_core.exceptions.BadRequest'>

tests/system/small/test_series.py:4040: Failed

This looks like some server-side changes relating to JSON.

@tswast tswast requested a review from TrevorBergeron December 8, 2025 20:44
@tswast tswast changed the title deps: bigframes is incompatible with pandas 3.0 (for now) fix(deps): bigframes is incompatible with pandas 3.0 (for now) Dec 9, 2025
@tswast tswast closed this Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: xs Pull request size is extra small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants