Antoine Pitrou added the comment:
> I've updated the type to enhancement (it seems like a grey area to me
> - it's a behavioural fix for a niche use case).
> I suggested a patch rather than simply subclassing RotatingFileHandler
> - The subclass would just have a copy of RotatingFileHandler's
> doRollover method with a one-line change.
> - The proposed fix is functionally equivalent to the current code
> for all currently working uses.
You may just as well monkeypatch os.rename() to fallback on
shutil.move() if the filenames are on a /dev/shm filesystem (or you
could bug QNX to fix their broken filesystem...).
>From a code quality and readability standpoint, os.rename() conveys the
intended semantics clearly, while shutil.move() doesn't, so switching to
shutil.move() in the stdlib would be a regression. Also, doing this in
logging would open the door to doing the same thing in other modules.
Even a critical piece of infrastructure such as importlib relies on
os.rename() working properly.
Python tracker <rep...@bugs.python.org>
Python-bugs-list mailing list