Skip to content

TST: run python-dev CI on 3.14-dev #61950

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 12 commits into from
Closed

Conversation

ngoldbaum
Copy link
Contributor

I'd like to see how widespread the test breakage is due to #61368.

Also 3.14rc1 came out earlier this week so Pandas should probably start thinking about 3.14 support soonish.

@ngoldbaum ngoldbaum requested a review from mroeschke as a code owner July 25, 2025 15:37
@ngoldbaum ngoldbaum force-pushed the 3.14-ci branch 2 times, most recently from f90ca53 to 534e1a9 Compare July 25, 2025 15:42
@mroeschke mroeschke added the CI Continuous Integration label Jul 25, 2025
@ngoldbaum ngoldbaum marked this pull request as draft July 25, 2025 20:19
@ngoldbaum
Copy link
Contributor Author

ngoldbaum commented Jul 25, 2025

After turning off the warning the tests results look much more reasonable. Here's the summary on Linux CI:

=========================== short test summary info ============================
FAILED pandas/tests/copy_view/test_chained_assignment_deprecation.py::test_series_setitem[0] - Failed: DID NOT WARN. No warnings of type (<class 'Warning'>,) were emitted.
 Emitted warnings: [].
FAILED pandas/tests/copy_view/test_chained_assignment_deprecation.py::test_series_setitem[indexer1] - Failed: DID NOT WARN. No warnings of type (<class 'Warning'>,) were emitted.
 Emitted warnings: [].
FAILED pandas/tests/copy_view/test_chained_assignment_deprecation.py::test_series_setitem[indexer2] - Failed: DID NOT WARN. No warnings of type (<class 'Warning'>,) were emitted.
 Emitted warnings: [].
FAILED pandas/tests/copy_view/test_chained_assignment_deprecation.py::test_series_setitem[indexer3] - Failed: DID NOT WARN. No warnings of type (<class 'Warning'>,) were emitted.
 Emitted warnings: [].
FAILED pandas/tests/copy_view/test_chained_assignment_deprecation.py::test_frame_setitem[a] - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/copy_view/test_chained_assignment_deprecation.py::test_frame_setitem[indexer1] - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/copy_view/test_chained_assignment_deprecation.py::test_frame_setitem[indexer2] - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/copy_view/test_chained_assignment_deprecation.py::test_frame_setitem[indexer3] - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/copy_view/test_clip.py::test_clip_chained_inplace - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/copy_view/test_interp_fillna.py::test_fillna_chained_assignment - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/copy_view/test_interp_fillna.py::test_interpolate_chained_assignment[interpolate] - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/copy_view/test_interp_fillna.py::test_interpolate_chained_assignment[ffill] - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/copy_view/test_interp_fillna.py::test_interpolate_chained_assignment[bfill] - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/copy_view/test_methods.py::test_chained_where_mask[mask] - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/copy_view/test_methods.py::test_chained_where_mask[where] - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/copy_view/test_methods.py::test_update_chained_assignment - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/copy_view/test_replace.py::test_replace_chained_assignment - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/reshape/merge/test_merge.py::test_merge_suffix_length_error[a-a-suffixes0-too many values to unpack \\(expected 2\\)] - AssertionError: Regex pattern did not match.
 Regex: 'too many values to unpack \\(expected 2\\)'
 Input: 'too many values to unpack (expected 2, got 3)'
FAILED pandas/tests/scalar/period/test_period.py::TestPeriodConstruction::test_invalid_arguments - AssertionError: Regex pattern did not match.
 Regex: 'day is out of range for month'
 Input: 'day 0 must be in range 1..31 for month 1 in year 1: 0'
FAILED pandas/tests/scalar/timestamp/test_constructors.py::TestTimestampConstructorPositionalAndKeywordSupport::test_constructor_positional - AssertionError: Regex pattern did not match.
 Regex: 'day is out of range for month'
 Input: 'day 0 must be in range 1..31 for month 1 in year 2000'
FAILED pandas/tests/scalar/timestamp/test_constructors.py::TestTimestampConstructorPositionalAndKeywordSupport::test_constructor_keyword - AssertionError: Regex pattern did not match.
 Regex: 'day is out of range for month'
 Input: 'day 0 must be in range 1..31 for month 1 in year 2000'
FAILED pandas/tests/series/accessors/test_dt_accessor.py::TestSeriesDatetimeValues::test_dt_accessor_not_writeable - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/series/indexing/test_indexing.py::test_underlying_data_conversion - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/series/methods/test_update.py::TestUpdate::test_update - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/indexes/test_indexing.py::TestContains::test_contains_requires_hashable_raises[interval] - AssertionError: Regex pattern did not match.
 Regex: "unhashable type: 'dict'|must be real number, not dict|an integer is required|\\{\\}|pandas\\._libs\\.interval\\.IntervalTree' is not iterable"
 Input: "argument of type 'pandas._libs.interval.IntervalTree' is not a container or iterable"
FAILED pandas/tests/indexing/multiindex/test_chaining_and_caching.py::test_detect_chained_assignment - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/indexing/multiindex/test_chaining_and_caching.py::test_cache_updating - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/indexing/multiindex/test_partial.py::TestMultiIndexPartial::test_partial_set - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/indexing/multiindex/test_setitem.py::test_frame_setitem_copy_raises - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/indexing/multiindex/test_setitem.py::test_frame_setitem_copy_no_write - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/indexing/test_chaining_and_caching.py::TestCaching::test_setitem_cache_updating_slices - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/indexing/test_chaining_and_caching.py::TestChaining::test_setitem_chained_setfault - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/indexing/test_chaining_and_caching.py::TestChaining::test_detect_chained_assignment - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/indexing/test_chaining_and_caching.py::TestChaining::test_detect_chained_assignment_raises - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/indexing/test_chaining_and_caching.py::TestChaining::test_detect_chained_assignment_fails - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/indexing/test_chaining_and_caching.py::TestChaining::test_detect_chained_assignment_doc_example - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/indexing/test_chaining_and_caching.py::TestChaining::test_detect_chained_assignment_object_dtype - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/indexing/test_chaining_and_caching.py::TestChaining::test_detect_chained_assignment_undefined_column - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/indexing/test_chaining_and_caching.py::TestChaining::test_detect_chained_assignment_changing_dtype - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/indexing/test_chaining_and_caching.py::TestChaining::test_setting_with_copy_bug - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/indexing/test_chaining_and_caching.py::TestChaining::test_detect_chained_assignment_warnings_errors - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/indexing/test_chaining_and_caching.py::TestChaining::test_iloc_setitem_chained_assignment - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/indexing/test_chaining_and_caching.py::TestChaining::test_getitem_loc_assignment_slice_state - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/tools/test_to_datetime.py::TestToDatetime::test_datetime_invalid_scalar[None-00:01:99] - AssertionError: Regex pattern did not match.
 Regex: '^time data "a" doesn\\\'t match format "%H:%M:%S". You might want to try:\\n    - passing `format` if your strings have a consistent format;\\n    - passing `format=\\\'ISO8601\\\'` if your strings are all ISO8601 but not necessarily in exactly the same format;\\n    - passing `format=\\\'mixed\\\'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.$|^Given date string "a" not likely a datetime$|^unconverted data remains when parsing with format "%H:%M:%S": "9". You might want to try:\\n    - passing `format` if your strings have a consistent format;\\n    - passing `format=\\\'ISO8601\\\'` if your strings are all ISO8601 but not necessarily in exactly the same format;\\n    - passing `format=\\\'mixed\\\'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.$|^second must be in 0..59: 00:01:99$'
 Input: 'second must be in 0..59, not 99: 00:01:99'
FAILED pandas/tests/tools/test_to_datetime.py::TestToDatetime::test_datetime_invalid_index[None-values1] - AssertionError: Regex pattern did not match.
 Regex: '^Given date string "a" not likely a datetime$|^time data "a" doesn\\\'t match format "%H:%M:%S". You might want to try:\\n    - passing `format` if your strings have a consistent format;\\n    - passing `format=\\\'ISO8601\\\'` if your strings are all ISO8601 but not necessarily in exactly the same format;\\n    - passing `format=\\\'mixed\\\'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.$|^unconverted data remains when parsing with format "%H:%M:%S": "9". You might want to try:\\n    - passing `format` if your strings have a consistent format;\\n    - passing `format=\\\'ISO8601\\\'` if your strings are all ISO8601 but not necessarily in exactly the same format;\\n    - passing `format=\\\'mixed\\\'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.$|^second must be in 0..59: 00:01:99$'
 Input: 'second must be in 0..59, not 99: 00:01:99'
FAILED pandas/tests/tools/test_to_datetime.py::TestDaysInMonth::test_day_not_in_month_raise[True] - AssertionError: Regex pattern did not match.
 Regex: 'day is out of range for month: 2015-02-29'
 Input: 'day 29 must be in range 1..28 for month 2 in year 2015: 2015-02-29'
FAILED pandas/tests/tools/test_to_datetime.py::TestDaysInMonth::test_day_not_in_month_raise[False] - AssertionError: Regex pattern did not match.
 Regex: 'day is out of range for month: 2015-02-29'
 Input: 'day 29 must be in range 1..28 for month 2 in year 2015: 2015-02-29'
FAILED pandas/tests/tools/test_to_datetime.py::TestDaysInMonth::test_day_not_in_month_raise_value[True-2015-02-29-%Y-%m-%d-^day is out of range for month. You might want to try:\\n    - passing `format` if your strings have a consistent format;\\n    - passing `format=\\'ISO8601\\'` if your strings are all ISO8601 but not necessarily in exactly the same format;\\n    - passing `format=\\'mixed\\'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.$] - AssertionError: Regex pattern did not match.
 Regex: "^day is out of range for month. You might want to try:\\n    - passing `format` if your strings have a consistent format;\\n    - passing `format=\\'ISO8601\\'` if your strings are all ISO8601 but not necessarily in exactly the same format;\\n    - passing `format=\\'mixed\\'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.$"
 Input: "day 29 must be in range 1..28 for month 2 in year 2015. You might want to try:\n    - passing `format` if your strings have a consistent format;\n    - passing `format='ISO8601'` if your strings are all ISO8601 but not necessarily in exactly the same format;\n    - passing `format='mixed'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this."
FAILED pandas/tests/tools/test_to_datetime.py::TestDaysInMonth::test_day_not_in_month_raise_value[True-2015-29-02-%Y-%d-%m-^day is out of range for month. You might want to try:\\n    - passing `format` if your strings have a consistent format;\\n    - passing `format=\\'ISO8601\\'` if your strings are all ISO8601 but not necessarily in exactly the same format;\\n    - passing `format=\\'mixed\\'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.$] - AssertionError: Regex pattern did not match.
 Regex: "^day is out of range for month. You might want to try:\\n    - passing `format` if your strings have a consistent format;\\n    - passing `format=\\'ISO8601\\'` if your strings are all ISO8601 but not necessarily in exactly the same format;\\n    - passing `format=\\'mixed\\'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.$"
 Input: "day 29 must be in range 1..28 for month 2 in year 2015. You might want to try:\n    - passing `format` if your strings have a consistent format;\n    - passing `format='ISO8601'` if your strings are all ISO8601 but not necessarily in exactly the same format;\n    - passing `format='mixed'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this."
FAILED pandas/tests/tools/test_to_datetime.py::TestDaysInMonth::test_day_not_in_month_raise_value[True-2015-04-31-%Y-%m-%d-^day is out of range for month. You might want to try:\\n    - passing `format` if your strings have a consistent format;\\n    - passing `format=\\'ISO8601\\'` if your strings are all ISO8601 but not necessarily in exactly the same format;\\n    - passing `format=\\'mixed\\'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.$] - AssertionError: Regex pattern did not match.
 Regex: "^day is out of range for month. You might want to try:\\n    - passing `format` if your strings have a consistent format;\\n    - passing `format=\\'ISO8601\\'` if your strings are all ISO8601 but not necessarily in exactly the same format;\\n    - passing `format=\\'mixed\\'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.$"
 Input: "day 31 must be in range 1..30 for month 4 in year 2015. You might want to try:\n    - passing `format` if your strings have a consistent format;\n    - passing `format='ISO8601'` if your strings are all ISO8601 but not necessarily in exactly the same format;\n    - passing `format='mixed'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this."
FAILED pandas/tests/tools/test_to_datetime.py::TestDaysInMonth::test_day_not_in_month_raise_value[True-2015-31-04-%Y-%d-%m-^day is out of range for month. You might want to try:\\n    - passing `format` if your strings have a consistent format;\\n    - passing `format=\\'ISO8601\\'` if your strings are all ISO8601 but not necessarily in exactly the same format;\\n    - passing `format=\\'mixed\\'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.$] - AssertionError: Regex pattern did not match.
 Regex: "^day is out of range for month. You might want to try:\\n    - passing `format` if your strings have a consistent format;\\n    - passing `format=\\'ISO8601\\'` if your strings are all ISO8601 but not necessarily in exactly the same format;\\n    - passing `format=\\'mixed\\'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.$"
 Input: "day 31 must be in range 1..30 for month 4 in year 2015. You might want to try:\n    - passing `format` if your strings have a consistent format;\n    - passing `format='ISO8601'` if your strings are all ISO8601 but not necessarily in exactly the same format;\n    - passing `format='mixed'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this."
FAILED pandas/tests/tools/test_to_datetime.py::TestDaysInMonth::test_day_not_in_month_raise_value[False-2015-02-29-%Y-%m-%d-^day is out of range for month. You might want to try:\\n    - passing `format` if your strings have a consistent format;\\n    - passing `format=\\'ISO8601\\'` if your strings are all ISO8601 but not necessarily in exactly the same format;\\n    - passing `format=\\'mixed\\'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.$] - AssertionError: Regex pattern did not match.
 Regex: "^day is out of range for month. You might want to try:\\n    - passing `format` if your strings have a consistent format;\\n    - passing `format=\\'ISO8601\\'` if your strings are all ISO8601 but not necessarily in exactly the same format;\\n    - passing `format=\\'mixed\\'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.$"
 Input: "day 29 must be in range 1..28 for month 2 in year 2015. You might want to try:\n    - passing `format` if your strings have a consistent format;\n    - passing `format='ISO8601'` if your strings are all ISO8601 but not necessarily in exactly the same format;\n    - passing `format='mixed'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this."
FAILED pandas/tests/tools/test_to_datetime.py::TestDaysInMonth::test_day_not_in_month_raise_value[False-2015-29-02-%Y-%d-%m-^day is out of range for month. You might want to try:\\n    - passing `format` if your strings have a consistent format;\\n    - passing `format=\\'ISO8601\\'` if your strings are all ISO8601 but not necessarily in exactly the same format;\\n    - passing `format=\\'mixed\\'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.$] - AssertionError: Regex pattern did not match.
 Regex: "^day is out of range for month. You might want to try:\\n    - passing `format` if your strings have a consistent format;\\n    - passing `format=\\'ISO8601\\'` if your strings are all ISO8601 but not necessarily in exactly the same format;\\n    - passing `format=\\'mixed\\'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.$"
 Input: "day 29 must be in range 1..28 for month 2 in year 2015. You might want to try:\n    - passing `format` if your strings have a consistent format;\n    - passing `format='ISO8601'` if your strings are all ISO8601 but not necessarily in exactly the same format;\n    - passing `format='mixed'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this."
FAILED pandas/tests/tools/test_to_datetime.py::TestDaysInMonth::test_day_not_in_month_raise_value[False-2015-04-31-%Y-%m-%d-^day is out of range for month. You might want to try:\\n    - passing `format` if your strings have a consistent format;\\n    - passing `format=\\'ISO8601\\'` if your strings are all ISO8601 but not necessarily in exactly the same format;\\n    - passing `format=\\'mixed\\'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.$] - AssertionError: Regex pattern did not match.
 Regex: "^day is out of range for month. You might want to try:\\n    - passing `format` if your strings have a consistent format;\\n    - passing `format=\\'ISO8601\\'` if your strings are all ISO8601 but not necessarily in exactly the same format;\\n    - passing `format=\\'mixed\\'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.$"
 Input: "day 31 must be in range 1..30 for month 4 in year 2015. You might want to try:\n    - passing `format` if your strings have a consistent format;\n    - passing `format='ISO8601'` if your strings are all ISO8601 but not necessarily in exactly the same format;\n    - passing `format='mixed'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this."
FAILED pandas/tests/tools/test_to_datetime.py::TestDaysInMonth::test_day_not_in_month_raise_value[False-2015-31-04-%Y-%d-%m-^day is out of range for month. You might want to try:\\n    - passing `format` if your strings have a consistent format;\\n    - passing `format=\\'ISO8601\\'` if your strings are all ISO8601 but not necessarily in exactly the same format;\\n    - passing `format=\\'mixed\\'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.$] - AssertionError: Regex pattern did not match.
 Regex: "^day is out of range for month. You might want to try:\\n    - passing `format` if your strings have a consistent format;\\n    - passing `format=\\'ISO8601\\'` if your strings are all ISO8601 but not necessarily in exactly the same format;\\n    - passing `format=\\'mixed\\'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.$"
 Input: "day 31 must be in range 1..30 for month 4 in year 2015. You might want to try:\n    - passing `format` if your strings have a consistent format;\n    - passing `format='ISO8601'` if your strings are all ISO8601 but not necessarily in exactly the same format;\n    - passing `format='mixed'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this."
FAILED pandas/tests/frame/indexing/test_setitem.py::TestDataFrameSetitemCopyViewSemantics::test_setitem_column_update_inplace - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/frame/indexing/test_xs.py::TestXS::test_xs_view - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/frame/methods/test_fillna.py::TestFillNA::test_fillna_on_column_view - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/frame/methods/test_interpolate.py::TestDataFrameInterpolate::test_interp_inplace - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/util/test_show_versions.py::test_show_versions - DeprecationWarning: codecs.open() is deprecated. Use open() instead.
FAILED pandas/tests/util/test_show_versions.py::test_json_output_match - DeprecationWarning: codecs.open() is deprecated. Use open() instead.
FAILED pandas/tests/io/parser/test_quoting.py::test_bad_quote_char[python-kwargs0-"quotechar" must be a(n)? 1-character string] - AssertionError: Regex pattern did not match.
 Regex: '"quotechar" must be a(n)? 1-character string'
 Input: '"quotechar" must be a unicode character or None, not a string of length 3'
FAILED pandas/tests/io/parser/test_quoting.py::test_bad_quote_char[python-kwargs2-"quotechar" must be string( or None)?, not int] - AssertionError: Regex pattern did not match.
 Regex: '"quotechar" must be string( or None)?, not int'
 Input: '"quotechar" must be a unicode character or None, not int'
FAILED pandas/tests/io/parser/test_quoting.py::test_null_quote_char[python--0] - AssertionError: Regex pattern did not match.
 Regex: '"quotechar" must be a 1-character string'
 Input: '"quotechar" must be a unicode character or None, not a string of length 0'
FAILED pandas/tests/io/test_common.py::test_codecs_encoding[csv-None] - DeprecationWarning: codecs.open() is deprecated. Use open() instead.
FAILED pandas/tests/io/test_common.py::test_codecs_encoding[csv-utf-8] - DeprecationWarning: codecs.open() is deprecated. Use open() instead.
FAILED pandas/tests/io/test_common.py::test_codecs_encoding[json-None] - DeprecationWarning: codecs.open() is deprecated. Use open() instead.
FAILED pandas/tests/io/test_common.py::test_codecs_encoding[json-utf-8] - DeprecationWarning: codecs.open() is deprecated. Use open() instead.
FAILED pandas/tests/frame/test_block_internals.py::TestDataFrameBlockInternals::test_stale_cached_series_bug_473 - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/frame/test_block_internals.py::test_update_inplace_sets_valid_block_values - AssertionError: Did not see expected warning of class 'ChainedAssignmentError'
FAILED pandas/tests/generic/test_generic.py::TestGeneric::test_nonzero[DataFrame] - ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
FAILED pandas/tests/generic/test_generic.py::TestGeneric::test_nonzero[Series] - ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
= 72 failed, 167066 passed, 24154 skipped, 781 xfailed, 83 xpassed, 31 warnings in 453.44s (0:07:33) =

Besides the tests looking for warnings but not seeing any, I see some failures due to new deprecations in Python, some that look like changes in the regex and datetime modules maybe and a few other failures that I can't classify just looking at the failure report.

@jorisvandenbossche did you ever have time to look closer at generating the chained assignment warning on 3.14 since it was reported in April? Unfortunately we're probably past the time when we can get C API changes merged into CPython to support this use-case, so it may not be easily feasible to detect what you're looking for just based on refcounts in 3.14 and newer.

@jorisvandenbossche
Copy link
Member

@jorisvandenbossche did you ever have time to look closer at generating the chained assignment warning on 3.14 since it was reported in April? Unfortunately we're probably past the time when we can get C API changes merged into CPython to support this use-case, so it may not be easily feasible to detect what you're looking for just based on refcounts in 3.14 and newer.

I didn't get to it yet, but now installed python 3.14 to try myself and took a first look. I added some more context to the issue #61368. Based on that I am also afraid we won't be able to "fix" this (but let's further discuss that on the issue).
But in any case, to start testing Python 3.14, certainly fine to disable those warnings for now (and then the tests that currently check for the presence of a warning can just be skipped, I think)

@ngoldbaum
Copy link
Contributor Author

OK, I think I've gotten everything except for the two test failures in pandas/tests/generic/test_generic.py, which I don't understand. It looks like pytest.raises is broken somehow or it's broken as a side effect of something else? Because the exception should be getting caught as far as I can see but it's not.

goldbaum at Nathans-MBP in ~/Documents/pandas on 3.14-ci
± pytest pandas/tests/generic/test_generic.py
============================= test session starts ==============================
platform darwin -- Python 3.14.0rc1, pytest-8.4.1, pluggy-1.6.0
rootdir: /Users/goldbaum/Documents/pandas
configfile: pyproject.toml
plugins: xdist-3.8.0, hypothesis-6.136.4, cov-6.2.1, run-parallel-0.5.1.dev0
collected 79 items
Collected 0 items to run in parallel

pandas/tests/generic/test_generic.py .........FF....................................................................

=================================== FAILURES ===================================
_____________________ TestGeneric.test_nonzero[DataFrame] ______________________

self = <pandas.tests.generic.test_generic.TestGeneric object at 0x10aa25a90>
frame_or_series = <class 'pandas.DataFrame'>

    def test_nonzero(self, frame_or_series):
        # GH 4633
        # look at the boolean/nonzero behavior for objects
        obj = construct(frame_or_series, shape=4)
        msg = f"The truth value of a {frame_or_series.__name__} is ambiguous"
        with pytest.raises(ValueError, match=msg):
            bool(obj == 0)
        with pytest.raises(ValueError, match=msg):
            bool(obj == 1)
        with pytest.raises(ValueError, match=msg):
            bool(obj)

        obj = construct(frame_or_series, shape=4, value=1)
        with pytest.raises(ValueError, match=msg):
            bool(obj == 0)
        with pytest.raises(ValueError, match=msg):
            bool(obj == 1)
        with pytest.raises(ValueError, match=msg):
            bool(obj)

        obj = construct(frame_or_series, shape=4, value=np.nan)
        with pytest.raises(ValueError, match=msg):
            bool(obj == 0)
        with pytest.raises(ValueError, match=msg):
            bool(obj == 1)
        with pytest.raises(ValueError, match=msg):
            bool(obj)

        # empty
        obj = construct(frame_or_series, shape=0)
        with pytest.raises(ValueError, match=msg):
            bool(obj)

        # invalid behaviors

        obj1 = construct(frame_or_series, shape=4, value=1)
        obj2 = construct(frame_or_series, shape=4, value=1)

        with pytest.raises(ValueError, match=msg):
            if obj1:
                pass

        with pytest.raises(ValueError, match=msg):
>           obj1 and obj2

pandas/tests/generic/test_generic.py:152:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =      0    1    2    3
0  1.0  1.0  1.0  1.0
1  1.0  1.0  1.0  1.0
2  1.0  1.0  1.0  1.0
3  1.0  1.0  1.0  1.0

    @final
    def __bool__(self) -> NoReturn:
>       raise ValueError(
            f"The truth value of a {type(self).__name__} is ambiguous. "
            "Use a.empty, a.bool(), a.item(), a.any() or a.all()."
        )
E       ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

pandas/core/generic.py:1503: ValueError
_______________________ TestGeneric.test_nonzero[Series] _______________________

self = <pandas.tests.generic.test_generic.TestGeneric object at 0x10aa25b80>
frame_or_series = <class 'pandas.Series'>

    def test_nonzero(self, frame_or_series):
        # GH 4633
        # look at the boolean/nonzero behavior for objects
        obj = construct(frame_or_series, shape=4)
        msg = f"The truth value of a {frame_or_series.__name__} is ambiguous"
        with pytest.raises(ValueError, match=msg):
            bool(obj == 0)
        with pytest.raises(ValueError, match=msg):
            bool(obj == 1)
        with pytest.raises(ValueError, match=msg):
            bool(obj)

        obj = construct(frame_or_series, shape=4, value=1)
        with pytest.raises(ValueError, match=msg):
            bool(obj == 0)
        with pytest.raises(ValueError, match=msg):
            bool(obj == 1)
        with pytest.raises(ValueError, match=msg):
            bool(obj)

        obj = construct(frame_or_series, shape=4, value=np.nan)
        with pytest.raises(ValueError, match=msg):
            bool(obj == 0)
        with pytest.raises(ValueError, match=msg):
            bool(obj == 1)
        with pytest.raises(ValueError, match=msg):
            bool(obj)

        # empty
        obj = construct(frame_or_series, shape=0)
        with pytest.raises(ValueError, match=msg):
            bool(obj)

        # invalid behaviors

        obj1 = construct(frame_or_series, shape=4, value=1)
        obj2 = construct(frame_or_series, shape=4, value=1)

        with pytest.raises(ValueError, match=msg):
            if obj1:
                pass

        with pytest.raises(ValueError, match=msg):
>           obj1 and obj2

pandas/tests/generic/test_generic.py:152:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = 0    1.0
1    1.0
2    1.0
3    1.0
dtype: float64

    @final
    def __bool__(self) -> NoReturn:
>       raise ValueError(
            f"The truth value of a {type(self).__name__} is ambiguous. "
            "Use a.empty, a.bool(), a.item(), a.any() or a.all()."
        )
E       ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

pandas/core/generic.py:1503: ValueError
------ generated xml file: /Users/goldbaum/Documents/pandas/test-data.xml ------
============================= slowest 30 durations =============================
0.01s call     pandas/tests/generic/test_generic.py::TestGeneric::test_truncate_out_of_bounds[DataFrame]

(29 durations < 0.005s hidden.  Use -vv to show these durations.)
=========================== short test summary info ============================
FAILED pandas/tests/generic/test_generic.py::TestGeneric::test_nonzero[DataFrame] - ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.boo...
FAILED pandas/tests/generic/test_generic.py::TestGeneric::test_nonzero[Series] - ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool()...
========================= 2 failed, 77 passed in 0.19s =====

@@ -143,7 +142,7 @@ def show_versions(as_json: str | bool = False) -> None:
sys.stdout.writelines(json.dumps(j, indent=2))
else:
assert isinstance(as_json, str) # needed for mypy
with codecs.open(as_json, "wb", encoding="utf8") as f:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I leave this as "wb" then I get an error, not sure if this choice of specifying bytes mode and utf-8 encoding was on purpose or if it was just a bug masked by the api of codecs.open.

@ngoldbaum
Copy link
Contributor Author

ngoldbaum commented Aug 8, 2025

Because the exception should be getting caught as far as I can see but it's not.

OK, here's a weird one. This script runs without error on Python 3.13 but dies with an uncaught ValueError on 3.14.0rc1:

import pandas as pd
obj1 = pd.DataFrame({'0': [1, 1, 1, 1], '1': [1, 1, 1, 1]})
obj2 = pd.DataFrame({'0': [1, 1, 1, 1], '1': [1, 1, 1, 1]})
try:
    obj1 and obj2
except ValueError:
    pass
goldbaum at Nathans-MBP in ~/Documents/test
○  python test.py
Traceback (most recent call last):
  File "/Users/goldbaum/Documents/test/test.py", line 5, in <module>
    obj1 and obj2
  File "/Users/goldbaum/.pyenv/versions/3.14.0rc1/lib/python3.14/site-packages/pandas/core/generic.py", line 1577, in __nonzero__
    raise ValueError(
    ...<2 lines>...
    )
ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

Seems kinda like a Python bug to me?

@djhoese
Copy link
Contributor

djhoese commented Aug 8, 2025

@ngoldbaum I've been tracking this PR and happened to see your comments tonight and thought "no way, that can't be", but yeah I don't understand how that's possible without it being a python. Even if pandas is doing something wrong somehow it shouldn't be magically getting around a try/except.

@ngoldbaum
Copy link
Contributor Author

Seems kinda like a Python bug to me?

I think this is python/cpython#137288, which I think should be fixed in 3.14.0rc2. It's a little tricky to ignore these test failures because I can't actually catch these particular exceptions... I guess I can just skip them for sys.version_info == (3, 14, 0, 'candidate', 1) and then we can reassess when rc2 comes out?

@jorisvandenbossche
Copy link
Member

@ngoldbaum thanks for finding that upstream issue, good to see it is already fixed. FWIW, numpy has the same issue (obj1 and obj2 where those objects are numpy arrays also bypasses the except ValueError)

@ngoldbaum
Copy link
Contributor Author

Yup! Not really surprising to me that the Pandas test suite caught the upstream bug but the NumPy tests missed it, Pandas has much more comprehensive tests...

I think I might split off the changes for the new error messages and codecs.open into their own PR so they can be merged separately. If you decide we ultimately need to disable the warning and workarounds in C aren't possible, we can merge this and then work with @mpage to get a fix in for 3.14.1. But hopefully you figure out how to get the warning working again!

@ngoldbaum
Copy link
Contributor Author

ngoldbaum commented Aug 8, 2025

Actually on second thought I don't think it makes sense to PR the warnings changes without any 3.14 testing, so I'll leave that here. @jorisvandenbossche please feel free to cherry-pick fc51e5f if you end up coming up with a better approach. I'll go ahead and re-enable all the CI to make sure I didn't break anything on older Python versions.

@ngoldbaum
Copy link
Contributor Author

ngoldbaum commented Aug 8, 2025

Closing in favor of Joris' PRs. Please feel free to cherry-pick 180081b

@ngoldbaum ngoldbaum closed this Aug 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants