[issue37130] pathlib does not handle '..' directory

2019-06-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm sorry, but I don't understand the issue here. Instead of posting isolated snippets, could you explain what are you trying to do? -- ___ Python tracker

[issue37130] pathlib does not handle '..' directory

2019-06-12 Thread N.P. Khelili
N.P. Khelili added the comment: @Brett: Honestly I don't think it is the best way. But fact is: nono@ACER ~ % cd / nono@ACER / % python Python 3.7.3 (default, Mar 26 2019, 21:43:19) [GCC 8.2.1 20181127] on linux Type "help", "copyright", "credits" or "license" for more information. >>>

[issue37130] pathlib does not handle '..' directory

2019-06-12 Thread Brett Cannon
Brett Cannon added the comment: @Antoine: was there a design reason behind setting 'name' to '' when a Path objects was initialized with '.'? Is it to implicitly represent the current directory? @N.P.: we will have to think through the implications of this as I don't know if normalizing to

[issue37130] pathlib does not handle '..' directory

2019-06-12 Thread N.P. Khelili
N.P. Khelili added the comment: After digging the question,I'd rather go for a minimal change. - setting .name to '' for '..' - let it be known in the doc - special-casing Path('..').stem (to keep the old behaviour) - update tests More could be done, but I don't feel like rewriting too much o

[issue37130] pathlib does not handle '..' directory

2019-06-12 Thread N.P. Khelili
Change by N.P. Khelili : -- keywords: +patch pull_requests: +13887 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/14022 ___ Python tracker

[issue37130] pathlib does not handle '..' directory

2019-06-10 Thread Brett Cannon
Change by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue37130] pathlib does not handle '..' directory

2019-06-10 Thread N.P. Khelili
N.P. Khelili added the comment: First, there is no real special case about the '.' path. The parse_args() method simlply removes then during __new__() (around line 80) as they are not needed. Double dots having to be kept, are later considered valid by the name @property. In test_pathlib.py