NT abspath() doesn't support pathlib.Path instances
I just downloaded the pypy3.7-v7.3.2-win32 build from site, and attempted a django+rest-framework runserver on Windows10, and it fails with the following stdlib error :
TypeError - 'WindowsPath' does not support the buffer interface
pypy3.7-v7.3.2-win32\lib-python\3\ntpath.py, line 526, in abspath
return normpath(_getfullpathname(path))
▼ Local vars
path = WindowsPath('C:/xxx.../templates')
I couldn't find the _getfullpathname() function on repo, but the code in https://foss.heptapod.net/pypy/pypy/-/blob/branch/default/lib-python/2.7/ntpath.py (is it the proper codebase?) does the same things.
This code works on CPython3.7, so it seems that Pypy would need to support pathlib.Path instances too, in its NT os.path utilities (didn't test on linux)?
Here is the quick&ugly workaround I applied, and the webservice works with that:
from os.path import abspath as oldabspath
def newabspath(*args, **kwargs):
return oldabspath(str(*args, **kwargs))
os.path.abspath = newabspath