-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
date.fromtimestamp(None)
behaves differently between _pydatetime
and _datetime
#120268
Comments
Eclips4
changed the title
Jun 8, 2024
date.fromtimestamp(None)
behaves differently between `_pydatetime
and _datetime
date.fromtimestamp(None)
behaves differently between _pydatetime
and _datetime
pganssle
pushed a commit
that referenced
this issue
Jun 8, 2024
…amp`` (#120269) This makes the pure Python implementation consistent with the C implementation.
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jun 8, 2024
…timestamp`` (pythonGH-120269) This makes the pure Python implementation consistent with the C implementation. (cherry picked from commit 34f5ae6) Co-authored-by: Kirill Podoprigora <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jun 8, 2024
…timestamp`` (pythonGH-120269) This makes the pure Python implementation consistent with the C implementation. (cherry picked from commit 34f5ae6) Co-authored-by: Kirill Podoprigora <[email protected]>
serhiy-storchaka
pushed a commit
that referenced
this issue
Jun 11, 2024
…mtimestamp`` (GH-120269) (GH-120282) This makes the pure Python implementation consistent with the C implementation. (cherry picked from commit 34f5ae6) Co-authored-by: Kirill Podoprigora <[email protected]>
serhiy-storchaka
pushed a commit
that referenced
this issue
Jun 11, 2024
…mtimestamp`` (GH-120269) (GH-120283) This makes the pure Python implementation consistent with the C implementation. (cherry picked from commit 34f5ae6) Co-authored-by: Kirill Podoprigora <[email protected]>
noahbkim
pushed a commit
to hudson-trading/cpython
that referenced
this issue
Jul 11, 2024
…timestamp`` (python#120269) This makes the pure Python implementation consistent with the C implementation.
estyxx
pushed a commit
to estyxx/cpython
that referenced
this issue
Jul 17, 2024
…timestamp`` (python#120269) This makes the pure Python implementation consistent with the C implementation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Bug description:
This happens because the
_pydatetime.date.fromtimestamp
is usingtime.localtime
which is acceptsNone
as a valid argument while_datetime.date.fromtimestamp
is trying to convertNone
to an integer.I would prefer to change the Python implementation, as the documentaion for
datetime.date.fromtimestamp
doesn't mention that it can acceptNone
as a valid argument.CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
None
to_pydatetime.date.fromtimestamp
#120269None
to_pydatetime.date.fromtimestamp
(GH-120269) #120282None
to_pydatetime.date.fromtimestamp
(GH-120269) #120283The text was updated successfully, but these errors were encountered: