Author serhiy.storchaka
Recipients Ronan.Lamy, gvanrossum, larry, pitrou, pjenvey, serhiy.storchaka, vstinner
Date 2016-04-24.18:22:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1461522144.94.0.321342089829.issue26800@psf.upfronthosting.co.za>
In-reply-to
Content
The os.path module and os.fsdecode() don't support bytearray paths. Should we add bytearray support? This will complicate and slowdown os.path functions which often are used multiple times in tight loops.

Correspondingly, many Python implemented functions in the os module, such as makedirs() or walk(), doesn't support bytearray paths.

In 3.2 almost all functions used PyUnicode_FSConverter() and supported only str and bytes paths. Few functions accidentally supported other types (on Windows only!): chdir(), rmdir() and unlink() supported read-only buffers (i.e. bytearray was not supported), and rename() and symplink() supported any buffers, including bytearray. Now all these functions emit a warning since non-string paths are deprecated on Windows. It looks to me that the support of non-bytes paths was added by accident.
History
Date User Action Args
2016-04-24 18:22:24serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, pitrou, vstinner, larry, pjenvey, Ronan.Lamy
2016-04-24 18:22:24serhiy.storchakasetmessageid: <1461522144.94.0.321342089829.issue26800@psf.upfronthosting.co.za>
2016-04-24 18:22:24serhiy.storchakalinkissue26800 messages
2016-04-24 18:22:24serhiy.storchakacreate