New submission from Eryk Sun <eryk...@gmail.com>:

In issue 26330 it was noted that nt._getdiskusage doesn't accept bytes paths. 
The same applies to nt._getvolumepathname and nt._getfinalpathname. Callers of 
these functions shouldn't have to manually implement PEP 529 UTF-8 support to 
handle input and output bytes paths. 

On the other hand, nt._getfullpathname works with a bytes path since it takes a 
`path_t` argument instead of `unicode` or `Py_UNICODE`. The above 3 functions 
could be rewritten to use `path_t` for the input path, and then encode the 
output path via PyUnicode_EncodeFSDefault if path->narrow is set.

----------
components: Library (Lib), Unicode, Windows
messages: 309990
nosy: eryksun, ezio.melotti, paul.moore, steve.dower, tim.golden, vstinner, 
zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: support bytes paths in nt _getdiskusage, _getvolumepathname, and 
_getfinalpathname
type: enhancement
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32556>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to