Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 676
    • Issues 676
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

April 05-07 - Mercurial Paris Conference 2023 - One day of workshop dedicated to Heptapod and Mercurial usage and workflow. There are still places available for both workshops and talks!

  • PyPyPyPy
  • pypypypy
  • Issues
  • #3343
Closed
Open
Issue created Nov 13, 2020 by Pakal@Pakal

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
Edited Nov 13, 2020 by Pakal
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking