SIGN IN SIGN UP

[3.12] gh-89039: Call subclass constructors in datetime.*.replace (GH-114780) (GH-131239)

When replace() method is called on a subclass of datetime, date or time,
properly call derived constructor. Previously, only the base class's
constructor was called.

Also, make sure to pass non-zero fold values when creating subclasses in
various methods. Previously, fold was silently ignored.
(cherry picked from commit 46190d9ea8a878a03d95b4e1bdcdc9ed576cf3fa)

Co-authored-by: Eugene Toder <eltoder@users.noreply.github.com>
S
Serhiy Storchaka committed
6f6b8b4ac95ac1921acc912ac28c5ddca83b927e
Parent: e4fe4d9
Committed by GitHub <noreply@github.com> on 4/2/2025, 5:35:16 PM