bpo-31827: Remove os.stat_float_times()#4061
Conversation
| to be executed on a process fork. (Contributed by Antoine Pitrou in | ||
| :issue:`16500`.) | ||
|
|
||
| The ``os.stat_float_times()`` function has been removed. It was introduced in |
There was a problem hiding this comment.
It should be in other section, "API and Feature Removals".
| create_file(self.fname) | ||
|
|
||
| def restore_float_times(state): | ||
| with ignore_deprecation_warnings('stat_float_times'): |
There was a problem hiding this comment.
ignore_deprecation_warnings no longer used.
| ``False``, future calls return ints. If *newvalue* is omitted, return the | ||
| current setting. | ||
|
|
||
| For compatibility with older Python versions, accessing :class:`stat_result` as |
There was a problem hiding this comment.
Shouldn't this be changed?
There was a problem hiding this comment.
So, I tried to remove the backward compatibility layer: I modified stat_result[ST_MTIME] to return float rather than int. Problem: it broke test_logging, the code deciding if a log file should be rotated or not.
While I'm not strongly opposed to modify stat_result[ST_MTIME], I prefer to do it in a separated PR. Moreover, we need maybe to emit a DeprecationWarning, or at least deprecate the feature in the doc, before changing the type, no?
There was a problem hiding this comment.
I agree, it should be done in a separate issue. It needs a special discussion. And maybe this can't be changed.
|
Thank you @serhiy-storchaka for your useful review! |
https://bugs.python.org/issue31827