[issue27038] Make os.DirEntry exist

2016-08-16 Thread STINNER Victor
STINNER Victor added the comment: Brendan Moloney: Please open a thread on the python-ideas mailing list to discuss your idea. Please don't start discussing on a *closed* issue: since an issue is closed, it's hidden from the main bug tracker and so only very few people see it. --

[issue27038] Make os.DirEntry exist

2016-08-15 Thread Brendan Moloney
Brendan Moloney added the comment: The functions were all written around DirEntry objects since that is what they will be processing 99% of the time and I want to do that as efficiently as possible. Converting a DirEntry object into a str representation doesn't help me with my use case at

[issue27038] Make os.DirEntry exist

2016-08-15 Thread Brett Cannon
Brett Cannon added the comment: If all you want is to extract the path representation from an os.DirEntry instance and continue to work with strings/bytes then you can use os.fspath() which is new in Python 3.6 to get the representation: https://docs.python.org/3.6/library/os.html#os.fspath .

[issue27038] Make os.DirEntry exist

2016-08-15 Thread Brendan Moloney
Brendan Moloney added the comment: The pathlib Path class is different enough from the DirEntry class that it doesn't really help my goal of allowing a function to work with either a DirEntry or a plain (str) path. These functions are going to be working with DirEntry objects generated by

[issue27038] Make os.DirEntry exist

2016-08-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset a95d98086621 by Ned Deily in branch 'default': Issue #27736: Prevent segfault after interpreter re-initialization due https://hg.python.org/cpython/rev/a95d98086621 -- ___ Python tracker

[issue27038] Make os.DirEntry exist

2016-08-13 Thread STINNER Victor
STINNER Victor added the comment: Brendan Moloney added the comment: > It would be nice if there was a supported way to create a DirEntry object from a path. If you don't want to document the constructor perhaps expose some helper function or class method (i.e. from_path)? It's a deliberate

[issue27038] Make os.DirEntry exist

2016-08-12 Thread Brendan Moloney
Brendan Moloney added the comment: It makes it much easier to write functions that can work with either a DirEntry object or a plain path. -- ___ Python tracker

[issue27038] Make os.DirEntry exist

2016-08-12 Thread Brett Cannon
Brett Cannon added the comment: Exposing a class method to construct one is no different than exposing the constructor, so it's still not desired to have. What is the specific need you have for creating a DirEntry instance on its own? -- ___ Python

[issue27038] Make os.DirEntry exist

2016-08-12 Thread Brendan Moloney
Brendan Moloney added the comment: It would be nice if there was a supported way to create a DirEntry object from a path. If you don't want to document the constructor perhaps expose some helper function or class method (i.e. from_path)? -- nosy: +moloney

[issue27038] Make os.DirEntry exist

2016-06-24 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the patch, Jelle! -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue27038] Make os.DirEntry exist

2016-06-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset b841972ed0bd by Brett Cannon in branch 'default': Issue #27038: Expose DirEntry as os.DirEntry. https://hg.python.org/cpython/rev/b841972ed0bd -- nosy: +python-dev ___ Python tracker

[issue27038] Make os.DirEntry exist

2016-06-10 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker ___ ___

[issue27038] Make os.DirEntry exist

2016-06-02 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : -- keywords: +patch Added file: http://bugs.python.org/file43130/issue27038.patch ___ Python tracker

[issue27038] Make os.DirEntry exist

2016-05-23 Thread Jim Jewett
Changes by Jim Jewett : -- stage: -> needs patch ___ Python tracker ___ ___

[issue27038] Make os.DirEntry exist

2016-05-16 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue27038] Make os.DirEntry exist

2016-05-16 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +benhoyt ___ Python tracker ___ ___

[issue27038] Make os.DirEntry exist

2016-05-16 Thread Brett Cannon
New submission from Brett Cannon: The docs claim that os.DirEntry exists (https://docs.python.org/3/library/os.html#os.DirEntry) but it actually does not (it is internal to the posix module). Should probably actually make os.DirEntry exist (but continue to not document the constructor).