This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author snoopyjc
Recipients snoopyjc
Date 2022-04-02.03:51:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1648871512.58.0.519594308427.issue47198@roundup.psfhosted.org>
In-reply-to
Content
os.stat on windows doesn't take an open file even though os.stat in os.supports_fd

>>> fd = open('tmp.tmp', 'w')
>>> fd
<_io.TextIOWrapper name='tmp.tmp' mode='w' encoding='cp1252'>
>>> os.stat(fd)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: stat: path should be string, bytes, os.PathLike or integer, not TextIOWrapper
>>> os.stat in os.supports_fd
True
History
Date User Action Args
2022-04-02 03:51:52snoopyjcsetrecipients: + snoopyjc
2022-04-02 03:51:52snoopyjcsetmessageid: <1648871512.58.0.519594308427.issue47198@roundup.psfhosted.org>
2022-04-02 03:51:52snoopyjclinkissue47198 messages
2022-04-02 03:51:52snoopyjccreate