Skip to content

Consistent datetime parsing across all py-versions #372

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 1 commit into from
Feb 24, 2025

Conversation

dalito
Copy link
Member

@dalito dalito commented Feb 24, 2025

Old Python versions before 3.11 have to use the isodate-package for parsing ISO 8601 date-times. Newer versions use datetime.fromisoformat. Both differ in handling of dates like "2025-02-24": Error in isodate-package, parsed to "2025-02-24T00:00:00" with datetime.fromisoformat. This PR makes the behavior the same across the supported Python versions.

The issue was observed in the PR #350.

@dalito dalito requested a review from ialarmedalien February 24, 2025 17:51
@ialarmedalien
Copy link
Contributor

I was about to say, "Hey, let's do a quick PR to remove the py3.8 support whilst we're at it!" but a short search turned up this monster...

@dalito dalito requested a review from sierra-moxon February 24, 2025 18:08
@sneakers-the-rat
Copy link
Contributor

@ialarmedalien it's a normal pull request I swear lol.

Copy link
Contributor

@amc-corey-cox amc-corey-cox left a comment

Choose a reason for hiding this comment

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

Yep, this looks good.

@cmungall cmungall merged commit f8e79f9 into linkml:main Feb 24, 2025
14 checks passed
@dalito dalito deleted the relax-datetime-pre-py311 branch February 24, 2025 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants