[Python-checkins] r84188 - in python/branches/py3k: Doc/library/os.rst Doc/whatsnew/3.2.rst Misc/ACKS Misc/NEWS Modules/posixmodule.c
andrew.kuchling
python-checkins at python.org
Thu Aug 19 00:30:35 CEST 2010
Author: andrew.kuchling
Date: Thu Aug 19 00:30:34 2010
New Revision: 84188
Log:
#7647: add ST_RDONLY, ST_NOSUID constants to os module.
(Also fix a name ordering in the ACKS file.)
Modified:
python/branches/py3k/Doc/library/os.rst
python/branches/py3k/Doc/whatsnew/3.2.rst
python/branches/py3k/Misc/ACKS
python/branches/py3k/Misc/NEWS
python/branches/py3k/Modules/posixmodule.c
Modified: python/branches/py3k/Doc/library/os.rst
==============================================================================
--- python/branches/py3k/Doc/library/os.rst (original)
+++ python/branches/py3k/Doc/library/os.rst Thu Aug 19 00:30:34 2010
@@ -1342,6 +1342,14 @@
:attr:`f_bavail`, :attr:`f_files`, :attr:`f_ffree`, :attr:`f_favail`,
:attr:`f_flag`, :attr:`f_namemax`.
+ Two module-level constants are defined for the :attr:`f_flag` attribute's
+ bit-flags: if :const:`ST_RDONLY` is set, the filesystem is mounted
+ read-only, and if :const:`ST_NOSUID` is set, the semantics of
+ setuid/setgid bits are disabled or not supported.
+
+ .. versionchanged:: 3.2
+ The :const:`ST_RDONLY` and :const:`ST_NOSUID` constants were added.
+
Availability: Unix.
Modified: python/branches/py3k/Doc/whatsnew/3.2.rst
==============================================================================
--- python/branches/py3k/Doc/whatsnew/3.2.rst (original)
+++ python/branches/py3k/Doc/whatsnew/3.2.rst Thu Aug 19 00:30:34 2010
@@ -111,6 +111,10 @@
programmer aware that his code contains object finalization issues.
(Added by Antoine Pitrou; :issue:`477863`.)
+* The :mod:`os` module now has the :const:`ST_RDONLY` and :const:`ST_NOSUID`
+ constants, for use with the :func:`~os.statvfs` function.
+ (Patch by Adam Jackson; :issue:`7647`.)
+
* The :func:`shutil.copytree` function has two new options:
* *ignore_dangling_symlinks*: when ``symlinks=False`` (meaning that the
Modified: python/branches/py3k/Misc/ACKS
==============================================================================
--- python/branches/py3k/Misc/ACKS (original)
+++ python/branches/py3k/Misc/ACKS Thu Aug 19 00:30:34 2010
@@ -389,8 +389,9 @@
John Interrante
Bob Ippolito
Atsuo Ishimoto
-Paul Jackson
+Adam Jackson
Ben Jackson
+Paul Jackson
David Jacobs
Kevin Jacobs
Kjetil Jacobsen
Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS (original)
+++ python/branches/py3k/Misc/NEWS Thu Aug 19 00:30:34 2010
@@ -152,6 +152,9 @@
using the filesystem encoding and surrogateescape error handler. Patch
written by David Watson.
+- Issue #7647: The posix module now has the ST_RDONLY and ST_NOSUID
+ constants, for use with the statvfs() function. Patch by Adam Jackson.
+
- Issue #8688: MANIFEST files created by distutils now include a magic
comment indicating they are generated. Manually maintained MANIFESTs
without this marker will not be overwritten or removed.
Modified: python/branches/py3k/Modules/posixmodule.c
==============================================================================
--- python/branches/py3k/Modules/posixmodule.c (original)
+++ python/branches/py3k/Modules/posixmodule.c Thu Aug 19 00:30:34 2010
@@ -8169,6 +8169,14 @@
if (ins(d, "EX_NOTFOUND", (long)EX_NOTFOUND)) return -1;
#endif /* EX_NOTFOUND */
+ /* statvfs */
+#ifdef ST_RDONLY
+ if (ins(d, "ST_RDONLY", (long)ST_RDONLY)) return -1;
+#endif /* ST_RDONLY */
+#ifdef ST_NOSUID
+ if (ins(d, "ST_NOSUID", (long)ST_NOSUID)) return -1;
+#endif /* ST_NOSUID */
+
#ifdef HAVE_SPAWNV
#if defined(PYOS_OS2) && defined(PYCC_GCC)
if (ins(d, "P_WAIT", (long)P_WAIT)) return -1;
More information about the Python-checkins
mailing list