Skip to content

Raise TypeError for non-paths in posixpath.relpath() #117584

Closed
@nineteendo

Description

@nineteendo

Bug report

Bug description:

>>> import posixpath
>>> posixpath.relpath(None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<frozen posixpath>", line 509, in relpath
ValueError: no path specified

Expected: TypeError like npath.relpath().

CPython versions tested on:

CPython main branch

Operating systems tested on:

Windows

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixestype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions