Author vstinner
Recipients alex, benjamin.peterson, piotr.dobrogost, pitrou, python-dev, serhiy.storchaka, stutzbach, vstinner
Date 2015-04-10.16:14:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> 2. os.ftruncate doesn't exist on Windows.

Steve Dower wrote a patch and the latest version looks good to me:

+            if 0 in os.fsencode(file):
+                raise ValueError('embedded null character')

IMO the check must be implemented in (in path_converter). It doesn't look right to have a differen behaviour on UNIX and Windows. path_converter() calls PyUnicode_FSConverter() on UNIX and this function checks for embedded null bytes.

So I would prefer to see the issue #23668 fixed and path_converter() fixed, instead of pushing pyio_fileio_fix.patch.
Date User Action Args
2015-04-10 16:14:25vstinnersetrecipients: + vstinner, pitrou, benjamin.peterson, stutzbach, alex, python-dev, piotr.dobrogost, serhiy.storchaka
2015-04-10 16:14:25vstinnersetmessageid: <>
2015-04-10 16:14:25vstinnerlinkissue21859 messages
2015-04-10 16:14:25vstinnercreate