Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Dec 21, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )


📚 Documentation preview 📚: https://cpython-previews--584.org.readthedocs.build/

…me. (GH-116179)

* gh-70647: Better promote how to safely parse yearless dates in datetime.

Every four years people encounter this because it just isn't obvious.
This moves the footnote up to a note with a code example.

We'd love to change the default year value for datetime but doing
that could have other consequences for existing code.  This documented
workaround *always* works.

* doctest code within note is bad, dedent.

* Update to match the error message.

* remove no longer referenced footnote

* ignore the warning in the doctest

* use Petr's suggestion for the docs to hide the warning processing

* cover date.strptime (3.14) as well
@pull pull bot locked and limited conversation to collaborators Dec 21, 2025
@pull pull bot added the ⤵️ pull label Dec 21, 2025
@pull pull bot merged commit b8d3fdd into tj-python:main Dec 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant