Closed
Description
Bug report
Bug description:
Datetime has two modes. There is divergent behavior between the pure python and the c-extension timezone
class, as found in django
>>> import datetime, _pydatetime
>>> class timezone(_pydatetime.timezone): pass # Works fine...
...
>>> class timezone(datetime.timezone): pass # Fails to subclass...
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: type 'datetime.timezone' is not an acceptable base type
CPython versions tested on:
3.12
Operating systems tested on:
Linux
Linked PRs
Metadata
Metadata
Assignees
Projects
Status
Done