[issue19776] Provide expanduser() on Path objects

2015-01-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 63dac5212552 by Victor Stinner in branch 'default': Issue #19776: Fix test_pathlib.test_expanduser() https://hg.python.org/cpython/rev/63dac5212552 -- ___ Python tracker rep...@bugs.python.org

[issue19776] Provide expanduser() on Path objects

2015-01-10 Thread STINNER Victor
STINNER Victor added the comment: Ok, test_pathlib now pass on the buildbot PPC64 AIX 3.x. I close the issue. Nice enhancement of the Path object. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue19776] Provide expanduser() on Path objects

2015-01-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Victor, your patch sounds ok to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776 ___ ___

[issue19776] Provide expanduser() on Path objects

2015-01-06 Thread STINNER Victor
STINNER Victor added the comment: The test fails on the buildbot PPC64 AIX 3.x. It looks like the home directory of the buildbot slave user is /home/shager/. http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/builds/2994/steps/test/logs/stdio

[issue19776] Provide expanduser() on Path objects

2015-01-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't really know how to investigate that failure. Perhaps David wants to look into it? -- nosy: +David.Edelsohn ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776

[issue19776] Provide expanduser() on Path objects

2015-01-06 Thread STINNER Victor
STINNER Victor added the comment: I don't really know how to investigate that failure. I don't think that it's specific to AIX, it just depends on the list of users on your system. On my Fedora 21, I have many users which have an empty home directory: - nobody - dbus - polkitd - usbmuxd -

[issue19776] Provide expanduser() on Path objects

2014-12-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset bee697b0fd18 by Antoine Pitrou in branch 'default': Issue #19776: Add a expanduser() method on Path objects. https://hg.python.org/cpython/rev/bee697b0fd18 -- nosy: +python-dev ___ Python tracker

[issue19776] Provide expanduser() on Path objects

2014-12-30 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776 ___

[issue19776] Provide expanduser() on Path objects

2014-12-28 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +steve.dower, zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776 ___ ___

[issue19776] Provide expanduser() on Path objects

2014-12-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Steve, would you like to give an opinion on the Windows aspects of this patch? Otherwise I will simply commit it soon. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776

[issue19776] Provide expanduser() on Path objects

2014-12-28 Thread Steve Dower
Steve Dower added the comment: I thought that USERPROFILE was the preferred environment variable and should be checked before HOME, but I could be wrong. Consistency with the existing expanduser function is more important probably. There's almost certainly an API to find an arbitrary user

[issue19776] Provide expanduser() on Path objects

2014-12-24 Thread Chris Rebert
Changes by Chris Rebert pyb...@rebertia.com: -- nosy: +cvrebert ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776 ___ ___ Python-bugs-list

[issue19776] Provide expanduser() on Path objects

2014-09-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Serhiy, would you like to update your patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776 ___ ___

[issue19776] Provide expanduser() on Path objects

2014-09-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry. Here is updated patch. -- Added file: http://bugs.python.org/file36669/pathlib_expanduser_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776

[issue19776] Provide expanduser() on Path objects

2014-07-26 Thread Claudiu Popa
Claudiu Popa added the comment: Here's a version of the patch which raises ValueError when the path can't be expanded. Hopefully, the used approach is good enough. -- Added file: http://bugs.python.org/file36102/issue19776_4.patch ___ Python tracker

[issue19776] Provide expanduser() on Path objects

2014-07-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is alternative patch which doesn't use os.path.expanduser() and reimplement it's logic. Differences: * expanduser() is part of concrete path API. This method access environment. * RuntimeError is raised when user home can't be determined. * Currently

[issue19776] Provide expanduser() on Path objects

2014-07-26 Thread Claudiu Popa
Claudiu Popa added the comment: Looks good. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776 ___ ___ Python-bugs-list mailing list

[issue19776] Provide expanduser() on Path objects

2014-07-23 Thread Charles-François Natali
Charles-François Natali added the comment: There is a question. What should pathlib's expanduser() do in case when user directory can't be determined (or user does not exist)? Perhaps unlike to os.path.expanduser() it should raise an exception (as in many other pathlib's methods). Let's see

[issue19776] Provide expanduser() on Path objects

2014-07-19 Thread Claudiu Popa
Claudiu Popa added the comment: No, my home directory is actually /root. The attached patch should be clearer now (I hope). Regarding your question, wouldn't checking for this duplicate what os.path.expanduser already does? (Unless checking for the exact same string before returning it.)

[issue19776] Provide expanduser() on Path objects

2014-07-15 Thread Claudiu Popa
Claudiu Popa added the comment: Since all the comments have been addressed, it would be nice if this gets committed. -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776

[issue19776] Provide expanduser() on Path objects

2014-07-15 Thread Claudiu Popa
Claudiu Popa added the comment: This new patch fixes some comments from Serhiy. Thanks for the review! -- stage: commit review - patch review Added file: http://bugs.python.org/file35955/issue19776_2.patch ___ Python tracker rep...@bugs.python.org

[issue19776] Provide expanduser() on Path objects

2014-07-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Doc example is still looks confusing. Is your home directory /home? There is a question. What should pathlib's expanduser() do in case when user directory can't be determined (or user does not exist)? Perhaps unlike to os.path.expanduser() it should raise

[issue19776] Provide expanduser() on Path objects

2014-06-16 Thread Claudiu Popa
Claudiu Popa added the comment: Attached the new version of the patch with fixes according to Antoine's review. -- Added file: http://bugs.python.org/file35666/issue19776_1.patch ___ Python tracker rep...@bugs.python.org

[issue19776] Provide expanduser() on Path objects

2014-06-13 Thread Claudiu Popa
Claudiu Popa added the comment: Antoine, how does my latest patch look? -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776 ___

[issue19776] Provide expanduser() on Path objects

2014-06-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Claudiu, sorry for the delay. I'm going to take a look soon! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776 ___

[issue19776] Provide expanduser() on Path objects

2014-05-13 Thread Claudiu.Popa
Claudiu.Popa added the comment: Added a new version of the patch with improvements suggested by Berker Peksag. Thanks for the review! -- Added file: http://bugs.python.org/file35237/issue19776.patch ___ Python tracker rep...@bugs.python.org

[issue19776] Provide expanduser() on Path objects

2014-04-27 Thread Antoine Pietri
Antoine Pietri added the comment: I think that `absolute` method should call `expanduser` and `expandvars` (do you plan to include it?) automatically. This should be optional (via default arguments: `expanduser=True, expandvars=True`. I think it shouldn't. (Or shouldn't be set to True by

[issue19776] Provide expanduser() on Path objects

2014-04-26 Thread Roman Inflianskas
Roman Inflianskas added the comment: I think that `absolute` method should call `expanduser` and `expandvars` (do you plan to include it?) automatically. This should be optional (via default arguments: `expanduser=True, expandvars=True`. -- nosy: +rominf

[issue19776] Provide expanduser() on Path objects

2014-04-18 Thread Fletcher Tomalty
Fletcher Tomalty added the comment: +1 It's very annoying to have to import expand user from os.path, when pathlib should be a full replacement for that module. Thanks to those working on this! -- nosy: +fletom ___ Python tracker

[issue19776] Provide expanduser() on Path objects

2014-01-19 Thread Claudiu.Popa
Claudiu.Popa added the comment: Antoine, is this feature still wanted? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776 ___ ___

[issue19776] Provide expanduser() on Path objects

2013-12-05 Thread Claudiu.Popa
Claudiu.Popa added the comment: Thanks, Vajrasky! Here's the new version of the patch. -- Added file: http://bugs.python.org/file32980/pathlib1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776

[issue19776] Provide expanduser() on Path objects

2013-12-04 Thread Vajrasky Kok
Vajrasky Kok added the comment: Documentation, please (Doc/library/pathlib.rst)! This is the docstring of Path.cwd. Return a new path pointing to the current working directory (as returned by os.getcwd()). This is the docstring of Path.expanduser. Return a new path with expanded ~ and ~user

[issue19776] Provide expanduser() on Path objects

2013-12-01 Thread Claudiu.Popa
Claudiu.Popa added the comment: Hello. Here's a patch for `expanduser()`. -- keywords: +patch nosy: +Claudiu.Popa Added file: http://bugs.python.org/file32919/pathlib.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776

[issue19776] Provide expanduser() on Path objects

2013-11-27 Thread STINNER Victor
STINNER Victor added the comment: I wanted to suggest to modify the resolve() method, but '~' is a valid filename... (I tested, and it's annoying because depending on command, sometimes ~ is expanded to /home/haypo sometimes not...) -- nosy: +haypo

[issue19776] Provide expanduser() on Path objects

2013-11-25 Thread Antoine Pitrou
New submission from Antoine Pitrou: Something like expanduser() may be useful on Path objects. -- components: Library (Lib) messages: 204387 nosy: pitrou priority: low severity: normal status: open title: Provide expanduser() on Path objects type: enhancement versions: Python 3.5

[issue19776] Provide expanduser() 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/issue19776 ___