raulcd opened a new issue, #50579: URL: https://github.com/apache/arrow/issues/50579
### Describe the bug, including details regarding any error messages, version, and platform. Several nightly wheels: - [wheel-macos-monterey-cp311-cp311-amd64](https://github.com/ursacomputing/crossbow/actions/runs/29822856714/job/88609293748) -[wheel-macos-monterey-cp311-cp311-arm64](https://github.com/ursacomputing/crossbow/actions/runs/29822857514/job/88609296151) - [wheel-macos-monterey-cp312-cp312-amd64](https://github.com/ursacomputing/crossbow/actions/runs/29822855441/job/88609289725) - [wheel-macos-monterey-cp314-cp314t-amd64](https://github.com/ursacomputing/crossbow/actions/runs/29822855264/job/88609288693) - [wheel-manylinux-2-28-cp311-cp311-amd64](https://github.com/ursacomputing/crossbow/actions/runs/29822859253/job/88609302100) - [wheel-manylinux-2-28-cp311-cp311-arm64](https://github.com/ursacomputing/crossbow/actions/runs/29822855448/job/88609289471) - [wheel-manylinux-2-28-cp312-cp312-amd64](https://github.com/ursacomputing/crossbow/actions/runs/29822857579/job/88609296299) - [wheel-manylinux-2-28-cp312-cp312-arm64](https://github.com/ursacomputing/crossbow/actions/runs/29822859066/job/88609301274) - [wheel-musllinux-1-2-cp311-cp311-arm64](https://github.com/ursacomputing/crossbow/actions/runs/29822856752/job/88609293794) - [wheel-windows-cp311-cp311-amd64](https://github.com/ursacomputing/crossbow/actions/runs/29822857681/job/88609296806) - [wheel-windows-cp312-cp312-amd64](https://github.com/ursacomputing/crossbow/actions/runs/29822856319/job/88609292532) - [wheel-windows-cp313-cp313-amd64](https://github.com/ursacomputing/crossbow/actions/runs/29822857221/job/88609295425) - [wheel-windows-cp314-cp314-amd64](https://github.com/ursacomputing/crossbow/actions/runs/29822858855/job/88609300613) - [wheel-windows-cp314-cp314t-amd64](https://github.com/ursacomputing/crossbow/actions/runs/29822856757/job/88609293918) Have failed during the last nightlies with: ```python __________________ test_categorical_order_survives_roundtrip ___________________ @pytest.mark.pandas def test_categorical_order_survives_roundtrip(): # ARROW-6302 > df = pd.DataFrame({"a": pd.Categorical( ["a", "b", "c", "a"], categories=["b", "c", "d"], ordered=True)}) /tmp/arrow-HEAD.ZW7lN/venv-wheel-3.12-manylinux_2_28_x86_64/lib64/python3.12/site-packages/pyarrow/tests/parquet/test_pandas.py:474: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /tmp/arrow-HEAD.ZW7lN/venv-wheel-3.12-manylinux_2_28_x86_64/lib64/python3.12/site-packages/pandas/core/arrays/categorical.py:504: in __init__ codes = _get_codes_for_values(values, dtype.categories) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ values = <ArrowStringArray> ['a', 'b', 'c', 'a'] Length: 4, dtype: str categories = Index(['b', 'c', 'd'], dtype='str') def _get_codes_for_values( values: Index | Series | ExtensionArray | np.ndarray, categories: Index, ) -> np.ndarray: """ utility routine to turn values into codes given the specified categories If `values` is known to be a Categorical, use recode_for_categories instead. """ codes = categories.get_indexer_for(values) wrong = (codes == -1) & ~isna(values) if wrong.any(): > warnings.warn( "Constructing a Categorical with a dtype and values containing " "non-null entries not in that dtype's categories is deprecated " "and will raise in a future version.", Pandas4Warning, stacklevel=find_stack_level(), ) E pandas.errors.Pandas4Warning: Constructing a Categorical with a dtype and values containing non-null entries not in that dtype's categories is deprecated and will raise in a future version. /tmp/arrow-HEAD.ZW7lN/venv-wheel-3.12-manylinux_2_28_x86_64/lib64/python3.12/site-packages/pandas/core/arrays/categorical.py:3045: Pandas4Warning ``` The one investigated seems to be using: > Downloading pandas-3.0.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (10.9 MB) ### Component(s) Python -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
