[issue27186] add os.fspath()

2018-08-13 Thread Erik Janssens
Erik Janssens added the comment: thank you for the info ... I'll have a look at making the posix module easier to port ... -- ___ Python tracker ___ _

[issue27186] add os.fspath()

2018-08-06 Thread Brett Cannon
Brett Cannon added the comment: On Mon, Aug 6, 2018, 13:56 Erik Janssens, wrote: > > Erik Janssens added the comment: > > is there a particular reason for PyOS_FSPath to live in posixmodule.c > It's there because the C API for the os module is kept in that module. -- _

[issue27186] add os.fspath()

2018-08-06 Thread Erik Janssens
Erik Janssens added the comment: is there a particular reason for PyOS_FSPath to live in posixmodule.c since Objects/unicodeobject.c uses this function, this makes it not possible to compile Python without a posixmodule. this makes it difficult to compile a 'core' python on a new platform, s

[issue27186] add os.fspath()

2016-07-04 Thread Brett Cannon
Brett Cannon added the comment: I'm fine with merging the two files if you want to do it. Build rules will also need updating if they do get merged. -- ___ Python tracker ___ __

[issue27186] add os.fspath()

2016-07-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Maybe merge Include/osmodule.h and Modules/posixmodule.h? -- ___ Python tracker ___ ___ Python-bug

[issue27186] add os.fspath()

2016-06-24 Thread Ethan Furman
Ethan Furman added the comment: Brett, no worries. My time has been extremely limited. I'll get the other locations in the stdlib fixed sometime in the next two months if no one beats me to it. -- ___ Python tracker

[issue27186] add os.fspath()

2016-06-24 Thread Brett Cannon
Brett Cannon added the comment: I think with the glossary change, this issue is done! Thanks everyone for the help with getting this far! Now on to os.path... -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Pytho

[issue27186] add os.fspath()

2016-06-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9c57178f13dc by Brett Cannon in branch 'default': Issue #27186: Define what a "path-like object" is. https://hg.python.org/cpython/rev/9c57178f13dc -- ___ Python tracker

[issue27186] add os.fspath()

2016-06-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset ea7b6a7827a4 by Brett Cannon in branch 'default': Issue #27186: Update os.fspath()/PyOS_FSPath() to check the return https://hg.python.org/cpython/rev/ea7b6a7827a4 -- ___ Python tracker

[issue27186] add os.fspath()

2016-06-24 Thread Brett Cannon
Brett Cannon added the comment: And now that I have updated os.fspath() I realize that Ethan said he was going to implement the update. :( If you started on the work, Ethan, I'm really sorry for duplicating your (potential) work. I'm going to commit Dusty's glossary term next and then go throu

[issue27186] add os.fspath()

2016-06-15 Thread Ethan Furman
Ethan Furman added the comment: os.fspath() will be changed to ensure the output of calling obj.__fspath__() is a str or bytes object. So the final behavior of calling os.fspath() will be to return a str or bytes or to raise an exception. I'll update the code for this change, as well is the p

[issue27186] add os.fspath()

2016-06-13 Thread Brett Cannon
Brett Cannon added the comment: Thanks for catching my screw-up, Martin; I misread the checks in the file by noticing the "nt" bit but not picking up it was comparing against sys.name instead of sys.platform. -- ___ Python tracker

[issue27186] add os.fspath()

2016-06-13 Thread Martin Panter
Martin Panter added the comment: I went with os.name == "nt", which is what other scandir() tests use. I’m not sure there is a practical different. Anyway the buildbots seem happier now. -- ___ Python tracker

[issue27186] add os.fspath()

2016-06-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset f384c5c14488 by Martin Panter in branch 'default': Issue #27186: Skip scandir(bytes) test with os.name == "nt" https://hg.python.org/cpython/rev/f384c5c14488 -- ___ Python tracker

[issue27186] add os.fspath()

2016-06-12 Thread Martin Panter
Martin Panter added the comment: Should the skip logic perhaps check for sys.platform == "win32" instead? The buildbots are still failing. -- ___ Python tracker ___

[issue27186] add os.fspath()

2016-06-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1ccd6196115a by Brett Cannon in branch 'default': Issue #27186: add Include/osmodule.h to the proper build rules https://hg.python.org/cpython/rev/1ccd6196115a -- ___ Python tracker

[issue27186] add os.fspath()

2016-06-12 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the notice, Martin! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue27186] add os.fspath()

2016-06-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6a35aa1995ab by Brett Cannon in branch 'default': Issue #27186: skip bytes path test for os.scandir() on Windows https://hg.python.org/cpython/rev/6a35aa1995ab -- ___ Python tracker

[issue27186] add os.fspath()

2016-06-11 Thread Martin Panter
Martin Panter added the comment: Test_fspath_protocol_bytes() (added in revision 5a62d682636e) fails on Windows: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds//steps/test/logs/stdio == ERROR: te

[issue27186] add os.fspath()

2016-06-10 Thread Brett Cannon
Changes by Brett Cannon : -- stage: resolved -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue27186] add os.fspath()

2016-06-10 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: fixed -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue27186] add os.fspath()

2016-06-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5a62d682636e by Brett Cannon in branch 'default': Issue #27186: Add os.PathLike support to DirEntry https://hg.python.org/cpython/rev/5a62d682636e -- ___ Python tracker

[issue27186] add os.fspath()

2016-06-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset a5a013ca5687 by Brett Cannon in branch 'default': Issue #27186: Add os.PathLike support to pathlib. https://hg.python.org/cpython/rev/a5a013ca5687 -- ___ Python tracker

[issue27186] add os.fspath()

2016-06-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset cec1f00c538d by Brett Cannon in branch 'default': Issue #27186: Document PyOS_FSPath(). https://hg.python.org/cpython/rev/cec1f00c538d -- ___ Python tracker __

[issue27186] add os.fspath()

2016-06-09 Thread Brett Cannon
Brett Cannon added the comment: I'm starting to catch up on everything you all did for PEP 519 and I wanted to say thanks! It looks like everything that needs to be done has been committed, has a patch, or just needs docs. The only thing I needed to do post-commit is tweak the docstrings to be

[issue27186] add os.fspath()

2016-06-09 Thread Brett Cannon
Brett Cannon added the comment: Re-opening as there are several patches that got put in here that have not been applied (e.g. glossary entry, os.DirEntry, etc.). -- assignee: -> brett.cannon status: closed -> open ___ Python tracker

[issue27186] add os.fspath()

2016-06-07 Thread Berker Peksag
Changes by Berker Peksag : -- stage: test needed -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue27186] add os.fspath()

2016-06-05 Thread Dusty Phillips
Dusty Phillips added the comment: Ethan: Can you clarify what you mean by "testing the other classes"? PureWindowsPath and PurePosixPath are tested by extension of _BasePurePathTest. So I think you mean that _BasePathTest also needs testing, but I don't see anything in there that would mirror

[issue27186] add os.fspath()

2016-06-05 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I moved my patch for the path_t converter to issue26027, which already covers posixmodule.c. I'm creating issue27231 to track adding os.fspath() support to posixpath.py. With that, I think this issue is done. -- resolution: -> fixed status: open -> cl

[issue27186] add os.fspath()

2016-06-04 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: This patch adds support for fspath to a number of functions in the os module by augmenting the path_t argument converter. The tests only cover a subset of the functions that use path_t, because some (e.g., unlink) have destructive side effects. -- Add

[issue27186] add os.fspath()

2016-06-04 Thread Ethan Furman
Ethan Furman added the comment: os.path is actually two different modules: posixpath.py and ntpath.py posixpath.py is being tracked in issue26027 ntpath.py is being tracked in issue27184 -- ___ Python tracker __

[issue27186] add os.fspath()

2016-06-04 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Sure, I'll do that too. Now that os.PathLike and PyOS_FSPath exist, it should also be possible to add support to os.path. -- ___ Python tracker ___

[issue27186] add os.fspath()

2016-06-04 Thread Ethan Furman
Ethan Furman added the comment: Jelle: We still need os.open if you would like to work on that. :) -- ___ Python tracker ___ ___ Pyt

[issue27186] add os.fspath()

2016-06-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 254125a265d2 by Ethan Furman in branch 'default': issue27186: add open/io.open; patch by Jelle Zijlstra https://hg.python.org/cpython/rev/254125a265d2 -- ___ Python tracker

[issue27186] add os.fspath()

2016-06-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 76b2ddaee6bd by Ethan Furman in branch 'default': issue27186: fix fsencode/fsdecode and update tests; patch by Jelle Zijlstra https://hg.python.org/cpython/rev/76b2ddaee6bd -- ___ Python tracker

[issue27186] add os.fspath()

2016-06-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset e672cf63d08a by Ethan Furman in branch 'default': issue27186: add PathLike ABC https://hg.python.org/cpython/rev/e672cf63d08a -- ___ Python tracker ___

[issue27186] add os.fspath()

2016-06-04 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks for reviewing. This patch adds tests with a bytes DirEntry. -- Added file: http://bugs.python.org/file43205/issue27186-DirEntry-fspath.patch ___ Python tracker _

[issue27186] add os.fspath()

2016-06-04 Thread Ethan Furman
Ethan Furman added the comment: Jelle: the DirEntry patch looks good so far, but it needs a test for a bytes path. -- ___ Python tracker ___ ___

[issue27186] add os.fspath()

2016-06-04 Thread Ethan Furman
Ethan Furman added the comment: New changeset 00991aa5fdb5 by Ethan Furman in branch 'default': issue27182: update fsencode and fsdecode for os.path(); patch by Dusty Phillips https://hg.python.org/cpython/rev/00991aa5fdb5 (had wrong issue # in commit) -- __

[issue27186] add os.fspath()

2016-06-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 780cbe18082e by Ethan Furman in branch 'default': issue27186: add C version of os.fspath(); patch by Jelle Zijlstra https://hg.python.org/cpython/rev/780cbe18082e -- ___ Python tracker

[issue27186] add os.fspath()

2016-06-04 Thread Ethan Furman
Ethan Furman added the comment: Dusty: The pathlib tests looks like it's only testing the PurePath implementation; while this /should/ be sufficient, please add tests for the other classes as well. -- ___ Python tracker

[issue27186] add os.fspath()

2016-06-03 Thread Dusty Phillips
Changes by Dusty Phillips : Added file: http://bugs.python.org/file43155/issue27186-glossary.buchuki.patch ___ Python tracker ___ ___ Python-b

[issue27186] add os.fspath()

2016-06-03 Thread Dusty Phillips
Changes by Dusty Phillips : Removed file: http://bugs.python.org/file43154/issue27186-glossary.buchuki.patch ___ Python tracker ___ ___ Python

[issue27186] add os.fspath()

2016-06-03 Thread Dusty Phillips
Dusty Phillips added the comment: Adding a glossary entry for path-like. The references are all correct except: :class:`os.PathLike` doesn't link to anything because PathLike hasn't been added to the os module yet. Similarly, :meth:`__fspath__` does not link to anything, although I think this

[issue27186] add os.fspath()

2016-06-03 Thread Ethan Furman
Ethan Furman added the comment: Note: My schedule changed -- I won't be at the sprints today, but tomorrow. I'll finish reviewing these patches and commit this afternoon if no one beats me to it. -- ___ Python tracker

[issue27186] add os.fspath()

2016-06-02 Thread Dusty Phillips
Changes by Dusty Phillips : Removed file: http://bugs.python.org/file43123/issue27186.buchuki.patch ___ Python tracker ___ ___ Python-bugs-lis

[issue27186] add os.fspath()

2016-06-02 Thread Dusty Phillips
Dusty Phillips added the comment: This patch adds fspath protocol and constructor initialization to pathlib.Path. -- Added file: http://bugs.python.org/file43133/issue27186-pathlib.buchuki.patch ___ Python tracker

[issue27186] add os.fspath()

2016-06-02 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : Added file: http://bugs.python.org/file43128/issue27186-DirEntry-fspath.patch ___ Python tracker ___ ___ Python-bu

[issue27186] add os.fspath()

2016-06-02 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: This patch adds the C implementation (copied from the PEP). Some notes: - I added a new .h file in Include/ because there didn't seem to be an obvious existing place to put it. - There was some uncertainty about whether we should Py_INCREF the string or bytes

[issue27186] add os.fspath()

2016-06-02 Thread Dusty Phillips
Dusty Phillips added the comment: Test __fspath__ returning bytes as well. -- Added file: http://bugs.python.org/file43124/issue27186.buchuki.patch ___ Python tracker ___ ___

[issue27186] add os.fspath()

2016-06-02 Thread Dusty Phillips
Dusty Phillips added the comment: Make os.fsencode and os.fsdecode able to accept a PathLike by calling into fspath. Additionally adds test for PathLike objects. -- keywords: +patch nosy: +buchuki Added file: http://bugs.python.org/file43123/issue27186.buchuki.patch ___

[issue27186] add os.fspath()

2016-06-02 Thread Roundup Robot
New submission from Roundup Robot: New changeset 59a52a9dd0dc by Ethan Furman in branch 'default': issue27186 -- initial docs, tests, and python version of os.fspath https://hg.python.org/cpython/rev/59a52a9dd0dc -- nosy: +python-dev ___ Python tracke

[issue27186] add os.fspath()

2016-06-02 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: brett.cannon, ethan.furman, serhiy.storchaka priority: normal severity: normal stage: test needed status: open title: add os.fspath() type: enhancement versions: Python 3.6 ___ Python tracker