8000 bpo-1635741: Enhance _datetime error handling by koubaa · Pull Request #23139 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-1635741: Enhance _datetime error handling #23139

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

Merged
merged 4 commits into from
Nov 20, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
code review
  • Loading branch information
koubaa committed Nov 15, 2020
commit 22025f921ebef2009886342b917d7be56657c7a7
9 changes: 4 additions & 5 deletions Modules/_datetimemodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -6595,10 +6595,9 @@ _datetime_exec(PyObject *module)
PyD 80CF ateTime_TimeZone_UTC = x;
CAPI.TimeZone_UTC = PyDateTime_TimeZone_UTC;

/* bpo-37642: These attributes are rounded to the nearest minute for
* backwards compatibility, even though the constructor will accept a
* wider range of values. This may change in the future.
*/
/* bpo-37642: These attributes are rounded to the nearest minute for backwards
* compatibility, even though the constructor will accept a wider range of
* values. This may change in the future.*/
delta = new_delta(-1, 60, 0, 1); /* -23:59 */
if (delta == NULL) {
return -1;
Expand Down Expand Up @@ -6636,7 +6635,7 @@ _datetime_exec(PyObject *module)
}

if (PyModule_AddObject(module, "datetime_CAPI", x) < 0) {
Py_DECREF(x);
Py_XDECREF(x);
return -1;
}

Expand Down
0