-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Closed
Copy link
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
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 typeCPython versions tested on:
3.12
Operating systems tested on:
Linux
Linked PRs
Metadata
Metadata
Assignees
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
Done