Author p-ganssle
Recipients p-ganssle, r.david.murray, steven.daprano
Date 2017-08-16.17:39:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
@r.david.murray In the other thread, you mention that the full test suite is run against the C and Python implementations, so that answers the question of how to write the tests.

I think treating it as an enhancement in Python 3.7 makes a reasonable amount of sense - it's clearly under-specified at the moment and people are probably relying on the CPython behavior (dateutil definitely is in the latest stable release, but not on master). Saying "it's implementation-specific before Python 3.7 but in Python 3.7+, the spec says it should use self(type)" is fine by me. It's not particularly hard to work around if you're subclassing datetime anyway.

Among the major libraries that provide their own datetime objects:

- Arrow seems to use composition (
- pendulum subclasses, but implements their own "replace":
- delorean uses composition:
- maya uses composition:

I'd say for the most part it's not a major issue to change it even as a bugfix, particularly if the line we're going with is "it was always implementation-specific", but there's also no rush.
Date User Action Args
2017-08-16 17:39:48p-gansslesetrecipients: + p-ganssle, steven.daprano, r.david.murray
2017-08-16 17:39:48p-gansslesetmessageid: <>
2017-08-16 17:39:48p-gansslelinkissue31222 messages
2017-08-16 17:39:47p-gansslecreate