[issue19777] Provide a home() classmethod on Path objects

2015-01-12 Thread STINNER Victor

STINNER Victor added the comment:

+def _test_home(self, p):
+q = self.cls(os.path.expanduser('~'))
+self.assertEqual(p, q)
+self.assertEqual(str(p), str(q))
+self.assertIs(type(p), type(q))
+self.assertTrue(p.is_absolute())
+
+def test_home(self):
+p = self.cls.home()
+self._test_home(p)

Why are you using a submethod _test_home()?

--

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



[issue19777] Provide a home() classmethod on Path objects

2015-01-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4a55b98314cd by Antoine Pitrou in branch 'default':
Issue #19777: Provide a home() classmethod on Path objects.
https://hg.python.org/cpython/rev/4a55b98314cd

--
nosy: +python-dev

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



[issue19777] Provide a home() classmethod on Path objects

2015-01-12 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I've committed the patch, thank you!

--
resolution:  - fixed
stage: needs patch - resolved
status: open - closed

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



[issue19777] Provide a home() classmethod on Path objects

2015-01-06 Thread STINNER Victor

STINNER Victor added the comment:

I agree that Path.home() is more user friendly than Path.expanduser('~').

--
nosy: +haypo

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



[issue19777] Provide a home() classmethod on Path objects

2015-01-04 Thread Mayank Tripathi

Mayank Tripathi added the comment:

Added docs to mcsalgado's patch.

--
nosy: +oquanox
Added file: http://bugs.python.org/file37595/home.patch

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



[issue19777] Provide a home() classmethod on Path objects

2015-01-01 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
keywords: +easy
stage:  - needs patch

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



[issue19777] Provide a home() classmethod on Path objects

2015-01-01 Thread Victor Salgado

Changes by Victor Salgado victor.mcsalg...@gmail.com:


--
keywords: +patch
Added file: http://bugs.python.org/file37581/path_home.patch

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



[issue19777] Provide a home() classmethod on Path objects

2015-01-01 Thread Victor Salgado

Changes by Victor Salgado victor.mcsalg...@gmail.com:


Added file: http://bugs.python.org/file37582/path_home2.patch

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



[issue19777] Provide a home() classmethod on Path objects

2015-01-01 Thread Kevin J Pallan

Changes by Kevin J Pallan kevinjpal...@gmail.com:


--
nosy: +artifex93

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



[issue19777] Provide a home() classmethod on Path objects

2014-11-13 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

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



[issue19777] Provide a home() classmethod on Path objects

2014-08-12 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 IMO, this functionality is subsumed by http://bugs.python.org/issue19776

Roughly, yes, but it can also be a useful convenience (expanduser('~') isn't 
that user-friendly, especially for Windows users).

--
nosy: +serhiy.storchaka

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



[issue19777] Provide a home() classmethod on Path objects

2013-11-25 Thread Antoine Pitrou

New submission from Antoine Pitrou:

Similar to Path.cwd(), perhaps a Path.home() to create a new Path object 
pointing to the current user's home directory may be useful.

--
components: Library (Lib)
messages: 204388
nosy: pitrou
priority: low
severity: normal
status: open
title: Provide a home() classmethod on Path objects
type: enhancement
versions: Python 3.5

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



[issue19777] Provide a home() classmethod on Path objects

2013-11-25 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue19777] Provide a home() classmethod on Path objects

2013-11-25 Thread Charles-François Natali

Charles-François Natali added the comment:

IMO, this functionality is subsumed by http://bugs.python.org/issue19776
(Path.expanduser).

--
nosy: +neologix

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