Skip to content

REF: consolidate datetime parsing paths and exception handling #50790

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

Merged
merged 3 commits into from
Jan 20, 2023

Conversation

jbrockmendel
Copy link
Member

One last check I'd like to move down into dateutil_parse is the if dt.tzinfo is not None: in parse_datetime_string, but it turns doing that breaks a bunch of Period parsing bc of dateutil parsing "2001-11-19/2001-11-25" as 2001-11-19 20:01:00 with a tzoffset of -1500 hours.

I'm indifferent between "Unknown string format" vs "Unknown datetime string format", so happy to change to the other one.

@MarcoGorelli MarcoGorelli self-requested a review January 17, 2023 17:32
@mroeschke mroeschke added the Refactor Internal refactoring of code label Jan 17, 2023
@jbrockmendel
Copy link
Member Author

@mroeschke @MarcoGorelli not time-sensitive but blocker-ish for ongoing parsing simplification

@MarcoGorelli
Copy link
Member

sure, taking a look today

@MarcoGorelli MarcoGorelli added this to the 2.0 milestone Jan 20, 2023
Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

Lovely stuff, thanks @jbrockmendel !

@MarcoGorelli MarcoGorelli merged commit 22bf069 into pandas-dev:main Jan 20, 2023
@jbrockmendel jbrockmendel deleted the ref-parse-share-2 branch January 20, 2023 18:10
pooja-subramaniam pushed a commit to pooja-subramaniam/pandas that referenced this pull request Jan 25, 2023
…s-dev#50790)

* REF: fewer paths through datetime parsing code

* dont catch in conversion.pyx

* REF: move exception handling within dateutil_parse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor Internal refactoring of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants