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.
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
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
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`.
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
___
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
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
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
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4761
___
___
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
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
___
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,
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
___
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
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
___
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
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
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
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
Changes by Matt Joiner anacro...@gmail.com:
--
nosy: +anacrolix
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4761
___
___
Python-bugs-list
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4761
___
___
Python-bugs-list
Changes by Chris Gerhard chris.gerh...@oracle.com:
--
nosy: +Chris.Gerhard
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4761
___
___
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
___
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).
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
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
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
27 matches
Mail list logo