[issue4761] create Python wrappers for openat() and others

2012-03-10 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: Why use a special value AT_FDCWD instead of None? It is not Pythonish. Clearly, when it is used in C, but in dynamically typed Python we are not limited to only one C-type. Such a large number of new functions littering the namespace.

[issue4761] create Python wrappers for openat() and others

2012-03-10 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I agree about the constant AT_FDCWD. (At least, None should be allowed in addition.) Your other proposition would break the principle of very thin platform wrappers that we try to follow in posixmodule.c. -- status: closed - open

[issue4761] create Python wrappers for openat() and others

2012-03-10 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Addition/Substitution of None I think should be in a new issue. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4761

[issue4761] create Python wrappers for openat() and others

2012-03-10 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: Perhaps it is better not export these functions in the `os` module, leaving them in `posix`? In addition, `stat` and `lstat` is not very thin wrappers (especially on Windows) given that they are working with `bytes` and with `str`.

[issue4761] create Python wrappers for openat() and others

2011-02-26 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: What about Doc/whatsnew/3.3.rst? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4761 ___

[issue4761] create Python wrappers for openat() and others

2011-02-26 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: What about Doc/whatsnew/3.3.rst? This is filled by Raymond (or other people) when the release nears. No need to care about it in regular commits. -- ___ Python tracker rep...@bugs.python.org

[issue4761] create Python wrappers for openat() and others

2011-02-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I have committed the patch in r88624. Thank you! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue4761] create Python wrappers for openat() and others

2011-01-20 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: Fixed small #ifdef error with fstatat. -- Added file: http://bugs.python.org/file20460/i4761_v6.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4761

[issue4761] create Python wrappers for openat() and others

2011-01-20 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4761 ___ ___

[issue4761] create Python wrappers for openat() and others

2010-12-22 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Reference counting is not always correct. For example, in unlinkat if (res 0) return posix_error(); Py_DECREF(opath); (return None) the DECREF should be before the error check. (Note that you can use the Py_RETURN_NONE

[issue4761] create Python wrappers for openat() and others

2010-12-22 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: New patch *should* have fixed up reference counting and version tags. I standardized all the error calls to posix_error. -- Added file: http://bugs.python.org/file20137/i4761_v4.patch ___

[issue4761] create Python wrappers for openat() and others

2010-12-22 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks for the update! Three more comments: * the new constants doc should also get a versionadded * faccessat should check for EBADF, EINVAL and ENOTDIR and raise an error if they are returned, since these are input errors Or, alternately,

[issue4761] create Python wrappers for openat() and others

2010-12-22 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: This new patch has proper octal mode strings and another doc update. I'll leave faccessat until #10758 has been resolved. -- Added file: http://bugs.python.org/file20138/i4761_v5.patch ___

[issue4761] create Python wrappers for openat() and others

2010-12-21 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: Attached is a patch that adds: faccessat, fchmodat, fchownat, fstatat, futimesat, linkat, mkdirat, mknodat, openat, readlinkat, renameat, symlinkat, unlinkat, utimensat and mkfifoat. Each function has documentation and a unit test and

[issue4761] create Python wrappers for openat() and others

2010-12-21 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: unit test needed - patch review versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4761 ___

[issue4761] create Python wrappers for openat() and others

2010-12-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Thanks for the patch. A couple of comments: - the C code is misindented in some places (using 8 spaces rather than 4) - you should use support.unlink consistently in the tests (rather than sometimes os.unlink or posix.unlink) - when cleaning up

[issue4761] create Python wrappers for openat() and others

2010-12-21 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: Attached is an updated patch which: - fixes badly indented C code - uses support.unlink consistently - cleans up tests better using finally -- Added file: http://bugs.python.org/file20133/i4761_v2.patch

[issue4761] create Python wrappers for openat() and others

2010-12-21 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: The docs shouldn't use [ to denote optional args. Rather, optional arguments can just be shown by their defaults. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org

[issue4761] create Python wrappers for openat() and others

2010-12-21 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: Ok, attached is a patch with the documentation updated as per recommendation. -- Added file: http://bugs.python.org/file20135/i4761_v3.patch ___ Python tracker rep...@bugs.python.org

[issue4761] create Python wrappers for openat() and others

2010-12-20 Thread Matt Joiner
Changes by Matt Joiner anacro...@gmail.com: -- nosy: +anacrolix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4761 ___ ___ Python-bugs-list

[issue4761] create Python wrappers for openat() and others

2010-09-15 Thread Daniel Urban
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4761 ___ ___ Python-bugs-list

[issue4761] create Python wrappers for openat() and others

2010-09-13 Thread Chris Gerhard
Changes by Chris Gerhard chris.gerh...@oracle.com: -- nosy: +Chris.Gerhard ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4761 ___ ___

[issue4761] create Python wrappers for openat() and others

2010-08-08 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- stage: - unit test needed versions: +Python 3.2 -Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4761 ___

[issue4761] create Python wrappers for openat() and others

2008-12-28 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: Very recent POSIX versions have introduced a set of functions named openat(), unlinkat(), etc. (*) which allow to access files relatively to a directory pointed to by a file descriptor (rather than the process-wide current working directory).

[issue4761] create Python wrappers for openat() and others

2008-12-28 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: There is a tradition that any POSIX calls are added to the POSIX module without much discussion, provided that a) there is an autoconf test testing for their presence, and b) they expose the API as-is, i.e. without second-guessing the

[issue4761] create Python wrappers for openat() and others

2008-12-28 Thread Christian Heimes
Christian Heimes li...@cheimes.de added the comment: The openat() functions sound useful indeed. However I'm concerned about the file descriptor requirment for the *at() POSIX functions. In Python file descriptors can lead to resource leaks because developers are used to automatic garbage

[issue4761] create Python wrappers for openat() and others

2008-12-28 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Developers may think that the file descriptor is closed when the integer object gets out of scope. I'm not concerned about that. When they use os.open, they will typically understand what a file handle is, and how it relates to I propose