This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Py3k's posixpath.relpath not compatible with ntpath.relpath
Type: behavior Stage: test needed
Components: Library (Lib) Versions: Python 3.2
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: brian.curtin, erickt, ezio.melotti
Priority: normal Keywords: patch

Created on 2009-08-05 19:23 by erickt, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
issue6651.diff brian.curtin, 2009-12-30 18:54 patch against r77150
Messages (3)
msg91327 - (view) Author: Erick Tryzelaar (erickt) Date: 2009-08-05 19:23
It looks like Python 3.x's relpath isn't compatible between posixpath
and ntpath. In posixpath.relpath, the start keyword defaults to None,
but ntpath.relpath, the start keyword defaults to curdir.

Interestingly enough, 2.6 and 2.7 have a different implementation of
posixpath.relpath, where it explicitly sets the start to equal curdir,
just like ntpath does.
msg97053 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2009-12-30 18:54
How does this patch look? 

For the sake of consistency it changes back to start=curdir. Then, if
the `path` parameter is type bytes and the `start` parameter equals
`curdir`, `start` is set to the bytes version of `curdir`.
msg98206 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2010-01-24 03:33
After thinking about this, I don't see a need for any change. 

Although it _looks_ like the relpath implementations aren't compatible based on their start default parameters, they do work the same. My code change isn't really necessary. All it does is rearrange things to make the signatures look the same, but it doesn't change the actual functionality.
Date User Action Args
2022-04-11 14:56:51adminsetgithub: 50900
2010-01-24 03:33:20brian.curtinsetstatus: open -> closed
resolution: not a bug
messages: + msg98206
2010-01-12 18:24:21ezio.melottisetpriority: normal
nosy: + ezio.melotti

stage: test needed
2009-12-30 18:54:25brian.curtinsetfiles: + issue6651.diff

type: performance -> behavior
versions: - Python 3.0, Python 3.1
keywords: + patch
nosy: + brian.curtin

messages: + msg97053
2009-08-05 19:23:11ericktcreate