Upgrading DateTime 2 to 3
Breaking2.12.8 → 3.0.3Breaking6Changed9Fixed7Other6
BreakingUpgrade verdict
6 breaking changes.
In plain terms
- Code that referenced these exceptions through the DateTime class must import them from their new location.
- Code relying on these old internal variables will break.
- Very old saved DateTime objects without microsecond data can no longer be loaded.
- The old comparison method on DateTime is gone.
Must act Top 3 of 6 that need code or config changes
What you must change
Breaking6
No longer provides
DateError, DateTimeError, SyntaxError and TimeError as class attributes; import them from DateTime.interfaces instead.DateErrorDateTimeErrorSyntaxErrorTimeErrorDateTime.interfacesRemoves the deprecated
_isDST and _localzone class variables._isDST_localzoneRemoves in-place migration of old DateTime pickles that lack a
_micros value._microsRemoves deprecated support for using
DateTime.__cmp__.DateTime.__cmp__DateTime 3 changes its pickle representation; older DateTime versions cannot read instances pickled with version 3.
DateTime becomes a new-style class with slots instead of an old-style class.
DateTime