nvda
283c69fb - Monkey patch ctypes._dlopen (used by the constructor for ctypes.CDLL, ctypes.WINDLL, etc.) so that it accepts unicode paths as it did prior to Python 2.7.13. (issue #6705, PR #6710)

Commit
8 years ago
Monkey patch ctypes._dlopen (used by the constructor for ctypes.CDLL, ctypes.WINDLL, etc.) so that it accepts unicode paths as it did prior to Python 2.7.13. (issue #6705, PR #6710) In Python 2.7.13, it raises an exception if you pass a unicode path. In Python < 2.7.13, it silently converted them to str, treating them as ASCII. Some add-ons (such as the Eurobraille driver) relied on the previous behaviour. This monkey patch actually gives slightly better results than < 2.7.13 in that it converts paths using mbcs, so it should work with non-ASCII paths as well in most cases. Aside from restoring the previous behaviour, given that we push for unicode wherever possible, I think this is a good thing.
Author
Parents
Loading