[issue31163] Return destination path in Path.rename and Path.replace

2019-09-11 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.9

___
Python tracker 

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



[issue31163] Return destination path in Path.rename and Path.replace

2019-09-11 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset cbd7b2a399a8ff2ed9994c380b07ef598892b6b1 by Jason R. Coombs (Miss 
Islington (bot)) in branch '3.8':
bpo-31163: Added return values to pathlib.Path instance's rename and replace 
methods. (GH-13582) (GH-15944)
https://github.com/python/cpython/commit/cbd7b2a399a8ff2ed9994c380b07ef598892b6b1


--

___
Python tracker 

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



[issue31163] Return destination path in Path.rename and Path.replace

2019-09-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15578
pull_request: https://github.com/python/cpython/pull/15944

___
Python tracker 

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



[issue31163] Return destination path in Path.rename and Path.replace

2019-09-11 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset 088a09af4bdeff52b9dedeb7acd1e82069f37d98 by Jason R. Coombs (hui 
shang) in branch 'master':
bpo-31163: Added return values to pathlib.Path instance's rename and replace 
methods. (GH-13582)
https://github.com/python/cpython/commit/088a09af4bdeff52b9dedeb7acd1e82069f37d98


--
nosy: +jaraco

___
Python tracker 

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



[issue31163] Return destination path in Path.rename and Path.replace

2019-05-26 Thread shangdahao


Change by shangdahao :


--
keywords: +patch
pull_requests: +13489
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/13582

___
Python tracker 

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



[issue31163] Return destination path in Path.rename and Path.replace

2019-05-20 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

I've closed the original pull request as the Github user account that created 
it no longer exists.

--
keywords: +easy -patch
nosy: +berker.peksag, cheryl.sabella
stage: patch review -> needs patch
versions: +Python 3.8 -Python 3.6

___
Python tracker 

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



[issue31163] Return destination path in Path.rename and Path.replace

2017-10-19 Thread Janko Krstic

Change by Janko Krstic :


--
keywords: +patch
pull_requests: +4024
stage:  -> patch review

___
Python tracker 

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



[issue31163] Return destination path in Path.rename and Path.replace

2017-08-09 Thread R. David Murray

R. David Murray added the comment:

I agree.  The normal python convention is that an immutable object returns the 
new value when an operation "changes" it, while a mutable object returns None.  
It seems like replace and rename should follow this convention (and that it 
would also be convenient).

--
nosy: +r.david.murray

___
Python tracker 

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



[issue31163] Return destination path in Path.rename and Path.replace

2017-08-09 Thread Alberto Gomez-Casado

New submission from Alberto Gomez-Casado:

Extracted from issue31154

Both calls lack any kind of return, which leads me to expect after a 
rename/replace the Path instance would be changed to the new path. This is not 
the case (reading the PEP I have seen Path instances are kind of immutable), 
after the call the Path instance keeps "pointing" to the previous (and quite 
likely now useless) path. 

Returning the new path would be a reasonable option. In any case, I think the 
documentation should mention this behavior explicitly.

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 300019
nosy: Alberto Gomez-Casado, docs@python, pitrou
priority: normal
severity: normal
status: open
title: Return destination path in Path.rename and Path.replace
type: enhancement
versions: Python 3.6

___
Python tracker 

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