[New-bugs-announce] [issue42602] seekable() returns True on pipe objects in Windows

Myungbae Son report at bugs.python.org
Tue Dec 8 10:55:37 EST 2020


New submission from Myungbae Son <nedsociety at gmail.com>:

>>> import os
>>> r, w = os.pipe()
>>> os.lseek(w, 10, 0)
10
>>> wf = open(w, 'w')
>>> wf.seekable()
True

This happens on Windows. Consequently seek() works for these objects but they seems to be no-op. This may confuse libraries that depend on seeking.

The named pipe objects (via CreateNamedPipe -> open_osfhandle -> open()) exhibit the same behavior.

----------
components: IO
messages: 382746
nosy: nedsociety
priority: normal
severity: normal
status: open
title: seekable() returns True on pipe objects in Windows
type: behavior
versions: Python 3.9

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


More information about the New-bugs-announce mailing list