Closed cielavenir closed 1 week ago
Because os.path.realpath can return bytes
Only if you pass bytes to it. If you pass a string it should return a string.
Please try to run this on both Python2 and Python3...
Maybe you would like realpath on _compat.py...
import os
dir = u'/'
realdir = os.path.realpath(dir)
print(type(dir) == type(realdir))
So the problem is on Python 2 only? What is the problem here exactly? You basically provided no description.
@giampaolo sorry added the original issue to the description
According to https://docs.python.org/2.7/whatsnew/2.3.html#pep-277-unicode-file-name-support-for-windows-nt , it seems this limitation is not applied to WinNT/macOS
Closing this out as I recently removed Python 2 support.
Because os.path.realpath can return bytes
issue: on Python2 this warning is printed even if the homedir argument is unicode: