Bug report
Bug description:
With patch e9b4ec6 (which was a fix to issues #105623 and #105887) the test for whether or not the logfile is a file comes too late for fifos.
When the rotation check in shouldRollover() happens it does a self.stream.tell() which fails if the stream is a fifo.
Since doing a filetype check on NFS is expensive (as per those bugs) I'd like to suggest either:
try:
pos=self.stream.tell()
exceptio.UnsupportedOperation:
# It's a FIFO or other non-seekable streampos=None
or
pos=self.stream.tell() ifself.stream.seekable() elseNone
Alas, I'm not using NFS anywhere so can't quite test which would still be performant here.
I also haven't checked if this kind of fix should be done elsewhere but if the fix is fine I'm happy to put in the effort and see what I can spot. :)
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Linked PRs
Bug report
Bug description:
With patch e9b4ec6 (which was a fix to issues #105623 and #105887) the test for whether or not the logfile is a file comes too late for fifos.
When the rotation check in shouldRollover() happens it does a self.stream.tell() which fails if the stream is a fifo.
Since doing a filetype check on NFS is expensive (as per those bugs) I'd like to suggest either:
or
Alas, I'm not using NFS anywhere so can't quite test which would still be performant here.
I also haven't checked if this kind of fix should be done elsewhere but if the fix is fine I'm happy to put in the effort and see what I can spot. :)
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Linked PRs