Skip to content

gh-115783: Deprecate support for invalid ISO formats in datetime.fromisoformat#131522

Open
StanFromIreland wants to merge 10 commits intopython:mainfrom
StanFromIreland:deprecate-stuff
Open

gh-115783: Deprecate support for invalid ISO formats in datetime.fromisoformat#131522
StanFromIreland wants to merge 10 commits intopython:mainfrom
StanFromIreland:deprecate-stuff

Conversation

@StanFromIreland
Copy link
Copy Markdown
Member

@StanFromIreland StanFromIreland commented Mar 20, 2025

This deprecates the support for invalid formats in datetime.fromisoformat to be removed in 3.15.

@StanFromIreland StanFromIreland marked this pull request as ready for review March 20, 2025 18:09
Copy link
Copy Markdown
Member

@pganssle pganssle left a comment

Choose a reason for hiding this comment

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

Note: Before we go too far with this I would like to start a thread on discourse to try and gauge how disruptive this is likely to be, and whether other folks agree that we should deprecate instead of just fixing the function.

It is the safe and cautious thing to do to issue a warning, but also we aren't technically deprecating anything since we didn't intend for this function to be able to parse things other than the output of isoformat or valid ISO 8601 date/time strings.

Comment thread Doc/library/datetime.rst
@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented Mar 20, 2025

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@StanFromIreland
Copy link
Copy Markdown
Member Author

I have made the requested changes; please review again

@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented Mar 20, 2025

Thanks for making the requested changes!

@pganssle: please review the changes made to this pull request.

@bedevere-app bedevere-app Bot requested a review from pganssle March 20, 2025 21:08
Comment thread Lib/_pydatetime.py
Comment thread Lib/_pydatetime.py Outdated
Comment thread Modules/_datetimemodule.c
@github-actions
Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting change review stale Stale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants