Skip to content

tools/wpt tests failing on Python 3.12.8 #49545

@jonathan-j-lee

Description

@jonathan-j-lee

Examples across several PRs:

Sample failure:

self = PosixPath('/home/test/web-platform-tests/tools/wpt/.tox/py312/lib/python3.12/site-packages')

other = PosixPath('/home/test/web-platform-tests/_venv3'), walk_up = False

_deprecated = (), step = 0



    def relative_to(self, other, /, *_deprecated, walk_up=False):

        """Return the relative path to another path identified by the passed

        arguments.  If the operation is not possible (because this is not

        related to the other path), raise ValueError.

    

        The *walk_up* parameter controls whether `..` may be used to resolve

        the path.

        """

        if _deprecated:

            msg = ("support for supplying more than one positional argument "

                   "to pathlib.PurePath.relative_to() is deprecated and "

                   "scheduled for removal in Python {remove}")

            warnings._deprecated("pathlib.PurePath.relative_to(*args)", msg,

                                 remove=(3, 14))

        other = self.with_segments(other, *_deprecated)

        for step, path in enumerate([other] + list(other.parents)):

            if self.is_relative_to(path):

                break

            elif not walk_up:

>               raise ValueError(f"{str(self)!r} is not in the subpath of {str(other)!r}")

E               ValueError: '/home/test/web-platform-tests/tools/wpt/.tox/py312/lib/python3.12/site-packages' is not in the subpath of '/home/test/web-platform-tests/_venv3'

The theory in the WPT matrix chat is nested virtualenvs, but it doesn't look like the recent commit log for tools/ contains any likely culprits.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions