[issue41661] os.path.relpath does not document ValueError on Windows with different drives

2021-04-26 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset b570feaa9c6039b9d89cdf854a5fb388872eb38e by Miss Islington (bot) 
in branch '3.8':
bpo-41661: Document os.path.relpath() exception on Windows with different 
drives (GH-25346) (#25367)
https://github.com/python/cpython/commit/b570feaa9c6039b9d89cdf854a5fb388872eb38e


--
nosy: +lukasz.langa

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41661] os.path.relpath does not document ValueError on Windows with different drives

2021-04-12 Thread miss-islington


miss-islington  added the comment:


New changeset de06baa9de109a00c26de0dc5a248fe7aafe09f5 by Miss Islington (bot) 
in branch '3.9':
bpo-41661: Document os.path.relpath() exception on Windows with different 
drives (GH-25346)
https://github.com/python/cpython/commit/de06baa9de109a00c26de0dc5a248fe7aafe09f5


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41661] os.path.relpath does not document ValueError on Windows with different drives

2021-04-12 Thread Steve Dower


Change by Steve Dower :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41661] os.path.relpath does not document ValueError on Windows with different drives

2021-04-12 Thread Steve Dower


Steve Dower  added the comment:


New changeset 67c0b3d89c4da9750fdb43fc66d3924681b22d2e by Zackery Spytz in 
branch 'master':
bpo-41661: Document os.path.relpath() exception on Windows with different 
drives (GH-25346)
https://github.com/python/cpython/commit/67c0b3d89c4da9750fdb43fc66d3924681b22d2e


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41661] os.path.relpath does not document ValueError on Windows with different drives

2021-04-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24101
pull_request: https://github.com/python/cpython/pull/25367

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41661] os.path.relpath does not document ValueError on Windows with different drives

2021-04-12 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 8.0 -> 9.0
pull_requests: +24100
pull_request: https://github.com/python/cpython/pull/25366

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41661] os.path.relpath does not document ValueError on Windows with different drives

2021-04-11 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
nosy: +ZackerySpytz
nosy_count: 7.0 -> 8.0
pull_requests: +24080
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/25346

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41661] os.path.relpath does not document ValueError on Windows with different drives

2021-03-26 Thread Eryk Sun


Eryk Sun  added the comment:

The suggested documentation change looks good to me.

--
type: behavior -> enhancement
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41661] os.path.relpath does not document ValueError on Windows with different drives

2020-08-29 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
components: +Windows
nosy: +eryksun, paul.moore, steve.dower, tim.golden, zach.ware
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41661] os.path.relpath does not document ValueError on Windows with different drives

2020-08-28 Thread Andy Maier


New submission from Andy Maier :

I found that os.path.relpath() on Windows raises ValueError when the path and 
the start path are on different drives. This is to be expected, as there is no 
single root on Windows.

On Python 3.7, the behavior is:

>>> os.path.relpath('c:/abc', 'a:/')
Traceback (most recent call last):
  File "", line 1, in 
  File "...\Python\Python37\lib\ntpath.py", line 564, in relpath
path_drive, start_drive))
ValueError: path is on mount 'c:', start on mount 'a:'

The issue is that this ValueError and the reasons for it are not mentioned at 
all in the documentation for os.path.relpath(). Other os.path functions do 
document specific behaviors for different drives on Windows, for example 
os.path.commonpath(), so there is a precedence for documenting this. Also, it 
should be normal to document the possible exceptions that can be raised.

I did read https://bugs.python.org/issue7195 from 2009 where the original issue 
discussed also lead to a request to update the documentation of 
os.path.relpath() to show the ValueError for this case, but that angle of the 
issue ended up being ignored back then, unfortunately.

My suggestion is to add something like the following sentence the documentation:

"On Windows, ValueError is raised when path and start are on different drives."

--
assignee: docs@python
components: Documentation
messages: 376057
nosy: andymaier, docs@python
priority: normal
severity: normal
status: open
title: os.path.relpath does not document ValueError on Windows with different 
drives
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com