CLN: simplify logic in json date parsing regarding warnings - #66760
Merged
jorisvandenbossche merged 2 commits intoAug 17, 2026
Merged
Conversation
Comment on lines
-1740
to
-1745
| if ( | ||
| not kept | ||
| and issubclass(warning.category, Pandas4Warning) | ||
| and _QUARTER_DEPR_MSG in str(warning.message) | ||
| ): | ||
| continue |
Member
Author
There was a problem hiding this comment.
If we only call this helper function when we have the data that will actually be returned, I don't think we need this filter or the kept keyword
jbrockmendel
approved these changes
Aug 14, 2026
Member
|
mypy complaint, otherwise lgtm |
Sharl0tteIsTaken
added a commit
to Sharl0tteIsTaken/pandas
that referenced
this pull request
Aug 18, 2026
…-comparison * upstream/main: (63 commits) BUG: to_json dropping the seconds of a sub-minute UTC offset (pandas-dev#66818) CI: fix working directory for the web interactive_terminal task (pandas-dev#66810) DEPS: Bump pyarrow minimum version to 16.0 (pandas-dev#66358) BUG: bar plot raises AttributeError when the DatetimeIndex freq attribute is unset (pandas-dev#66771) BLD: Build Python 3.15 wheels (pandas-dev#66808) PERF: enable parallel read_csv by default on Windows (pandas-dev#66751) [pre-commit.ci] pre-commit autoupdate (pandas-dev#66609) TST: avoid resetting RNG in MultiIndex duplicate test (pandas-dev#66806) CLN: simplify logic in json date parsing regarding warnings (pandas-dev#66760) CI: fix UBSan suppressions silently going inert with meson 1.12.0 (pandas-dev#66805) CI: Close PRs with linked issues that aren't assigned (pandas-dev#66803) CI: Update pixi.lock (pandas-dev#66799) TST: Add test for writing UUIDs to parquet with pyarrow pandas-dev#61602 (pandas-dev#65647) BUG: to_json wrapped unsigned numpy scalars above int64 max (GH#66142) (pandas-dev#66796) BUG: remaining ujson_dumps segfaults from unchecked C-API returns (GH#66356) (pandas-dev#66797) CI: Update pixi to 0.76.2 + relock (pandas-dev#66793) BUG: pandas-dev#66356 - Fix 4 segfaults from ujson_dumps values that are abnormal (pandas-dev#66357) PERF: single-pass string conversion in read_csv's pyarrow fast path (pandas-dev#66756) BUG: secondary_y hid the primary y-axis over collection-drawn data (pandas-dev#66789) BUG: read_csv(sep=None) raised TypeError instead of falling back to the python engine (GH#66639) (pandas-dev#66790) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I was looking at this logic introduced in #64645 in the json date parsing code (was changing something there in context of another PR), and didn't directly understand what was going on. Tried to simplify this a bit (while the tests are still passing).
One consequence might be that we are also silencing any other warning (besides the specific warning about quarterly strings) for the attempts are not returned, but that seems a good thing