Skip to content

AssetPath doesn't implement parent #1433

@mhsmith

Description

@mhsmith

It implements the documented Traversable interface, but it doesn't implement the undocumented SimplePath interface used by importlib.metadata. This causes an exception from this code in numpy/testing/_private/utils.py:

np_dist = importlib.metadata.distribution('numpy')
....
np_dist.locate_file('numpy')
  File "/data/data/com.chaquo.python.pkgtest3/files/chaquopy/AssetFinder/requirements/numpy/testing/_private/utils.py", line 86, in <module>
  File "stdlib/importlib/metadata/__init__.py", line 922, in locate_file
AttributeError: 'AssetPath' object has no attribute 'parent'

Review all Path properties and methods to see if there's anything else we should add at the same time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions