[issue31577] crash in os.utime() in case of a bad ns argument

Zachary Ware report at bugs.python.org
Mon Sep 10 13:54:46 EDT 2018


Zachary Ware <zachary.ware at gmail.com> added the comment:

We definitely can't make that change to PyNumber_Divmod in 3.7 at this point, I'm sure someone somewhere is relying on being able to get arbitrary information out of their objects with `divmod(crazy_object)`.  I don't know enough math to say whether there could be any legitimate mathematical use for arbitrary return values so I leave it to others to determine whether we could make that consider that change in 3.8 just to clean things up.

I've looked through _datetimemodule.c and I don't see how timedelta.__divmod__ could fail like this, since it actually creates new timedelta objects from its arguments to work from.

----------
nosy: +zach.ware
versions: +Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31577>
_______________________________________


More information about the Python-bugs-list mailing list