You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
date.fromtimestamp(None) behaves differently between _pydatetime and _datetime #120268
This happens because the _pydatetime.date.fromtimestamp is using time.localtime which is accepts None as a valid argument while _datetime.date.fromtimestamp is trying to convert None to an integer.
I would prefer to change the Python implementation, as the documentaion for datetime.date.fromtimestamp doesn't mention that it can accept None as a valid argument.
changed the title [-]``date.fromtimestamp(None)`` behaves differently between ``_pydatetime` and ``_datetime``[/-][+]``date.fromtimestamp(None)`` behaves differently between ``_pydatetime`` and ``_datetime``[/+]on Jun 8, 2024
Activity
[-]``date.fromtimestamp(None)`` behaves differently between ``_pydatetime` and ``_datetime``[/-][+]``date.fromtimestamp(None)`` behaves differently between ``_pydatetime`` and ``_datetime``[/+]gh-120268: Prohibit passing ``None`` to ``_pydatetime.date.fromtimest…
pythongh-120268: Prohibit passing ``None`` to ``_pydatetime.date.from…
pythongh-120268: Prohibit passing ``None`` to ``_pydatetime.date.from…
[3.13] gh-120268: Prohibit passing ``None`` to ``_pydatetime.date.fro…
[3.12] gh-120268: Prohibit passing ``None`` to ``_pydatetime.date.fro…
pythongh-120268: Prohibit passing ``None`` to ``_pydatetime.date.from…
pythongh-120268: Prohibit passing ``None`` to ``_pydatetime.date.from…