Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

logging.handler fails when attempting to rotate a fifo (with potential fix) #143237

Closed
Assignees
serhiy-storchaka
Labels
3.13bugs and security fixes3.14bugs and security fixes3.15new features, bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error
@rubiksdot

Description

@rubiksdot

Bug report

Bug description:

With patche9b4ec6 (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

Metadata

Metadata

Labels

3.13bugs and security fixes3.14bugs and security fixes3.15new features, bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2026 Movatter.jp