summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-10-01 00:07:42 (GMT)
committerR David Murray <rdmurray@bitdance.com>2012-10-01 00:07:42 (GMT)
commitc652ce6d02d3665465ec87fbc1aae98558b07e43 (patch)
treeeb6f8194832131cf007e10421d453486b22c1fe1
parentb7a0bfe912f203468e67f0541a365a4cc41a7cb2 (diff)
downloadcpython-c652ce6d02d3665465ec87fbc1aae98558b07e43.zip
cpython-c652ce6d02d3665465ec87fbc1aae98558b07e43.tar.gz
cpython-c652ce6d02d3665465ec87fbc1aae98558b07e43.tar.bz2
More whatsnew adds, especially the os module.
I went through all the versionchanged/versionadded tags in the os doc page for this changeset.
-rw-r--r--Doc/whatsnew/3.3.rst49
-rw-r--r--Misc/NEWS4
2 files changed, 44 insertions, 9 deletions
diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst
index 41a0c36..e1e0fe6 100644
--- a/Doc/whatsnew/3.3.rst
+++ b/Doc/whatsnew/3.3.rst
@@ -1504,12 +1504,20 @@ os
:func:`~os.link`, :func:`~os.lstat`, :func:`~os.mkdir`, :func:`~os.mkfifo`,
:func:`~os.mknod`, :func:`~os.open`, :func:`~os.readlink`, :func:`~os.remove`,
:func:`~os.rename`, :func:`~os.replace`, :func:`~os.rmdir`, :func:`~os.stat`,
- :func:`~os.symlink`, :func:`~os.unlink`, :func:`~os.utime`.
+ :func:`~os.symlink`, :func:`~os.unlink`, :func:`~os.utime`. Platform
+ support for using these parameters can be checked via the sets
+ :data:`os.supports_dir_fd` and :data:`os.supports_follows_symlinks`.
- The following functions now support a file descriptor for their path argument:
:func:`~os.chdir`, :func:`~os.chmod`, :func:`~os.chown`,
:func:`~os.execve`, :func:`~os.listdir`, :func:`~os.pathconf`, :func:`~os.path.exists`,
- :func:`~os.stat`, :func:`~os.statvfs`, :func:`~os.utime`.
+ :func:`~os.stat`, :func:`~os.statvfs`, :func:`~os.utime`. Platform support
+ for this can be checked via the :data:`os.supports_fd` set.
+
+* :func:`~os.access` accepts an ``effective_ids`` keyword argument to turn on
+ using the effective uid/gid rather than the real uid/gid in the access check.
+ Platform support for this can be checked via the
+ :data:`~os.supports_effective_ids` set.
* The :mod:`os` module has two new functions: :func:`~os.getpriority` and
:func:`~os.setpriority`. They can be used to get or set process
@@ -1558,7 +1566,7 @@ os
for a file.
* :func:`~os.sync`: Force write of everything to disk.
-* Add some extra posix functions to the os module:
+* Additional new posix functions:
* :func:`~os.lockf`: Apply, test or remove a POSIX lock on an open file descriptor.
* :func:`~os.pread`: Read from a file descriptor at an offset, the file
@@ -1577,6 +1585,12 @@ os
* :func:`~os.times` and :func:`~os.uname`: Return type changed from a tuple to
a tuple-like object with named attributes.
+* Some platforms now support additional constants for the :func:`~os.lseek`
+ function, such as ``os.SEEK_HOLE`` and ``os.SEEK_DATA``.
+
+* :func:`os.symlink` now accepts (and ignores) the ``target_is_directory``
+ keyword argument on non-Windows platforms, to ease cross-platform support.
+
pdb
---
@@ -1703,6 +1717,14 @@ signal
instead of a RuntimeError: OSError has an errno attribute.
+smtp
+----
+
+:class:`~smtplib.SMTP` now supports the context manager protocol, allowing an
+``SMTP`` instance to be used in a ``with`` statement. (Contributed
+by Giampaolo RodolĂ  in :issue:`11289`.)
+
+
smtpd
-----
@@ -1810,6 +1832,18 @@ the form '-rwxrwxrwx'.
(Contributed by Giampaolo RodolĂ  in :issue:`14807`)
+
+subprocess
+----------
+
+Command strings can now be bytes objects on posix platforms. (Contributed by
+Victor Stiner in :issue:`8513`.)
+
+A new constant :data:`~subprocess.DEVNULL` allows suppressing output in a
+platform-independent fashion. (Contributed by Ross Lagerwall in
+:issue:`5870`.)
+
+
sys
---
@@ -1872,10 +1906,11 @@ unittest
:meth:`.assertRaises`, :meth:`.assertRaisesRegex`, :meth:`.assertWarns`, and
:meth:`.assertWarnsRegex` now accept a keyword argument *msg* when used as
-context managers.
-
-(Contributed by Ezio Melotti and Winston Ewert in :issue:`10775`)
+context managers. (Contributed by Ezio Melotti and Winston Ewert in
+:issue:`10775`)
+:meth:`unittest.TestCase.run` now returns the :class:`~unittest.TestResult`
+object.
urllib
------
@@ -1993,7 +2028,7 @@ Deprecated Python modules, functions and methods
* :meth:`ftplib.FTP.nlst` and :meth:`ftplib.FTP.dir`: use
:meth:`ftplib.FTP.mlsd`
* :func:`platform.popen`: use the :mod:`subprocess` module. Check especially
- the :ref:`subprocess-replacements` section.
+ the :ref:`subprocess-replacements` section (:issue:`11377`).
* :issue:`13374`: The Windows bytes API has been deprecated in the :mod:`os`
module. Use Unicode filenames, instead of bytes filenames, to not depend on
the ANSI code page anymore and to support any filename.
diff --git a/Misc/NEWS b/Misc/NEWS
index f3189c2..32c862b 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -3690,7 +3690,7 @@ Library
not installed. Instead, the zipfile.ZIP_STORED compression is used to create
the ZipFile. Patch by Natalia B. Bidart.
-- Issue #11289: `smtp.SMTP` class becomes a context manager so it can be used
+- Issue #11289: `smtp.SMTP` class is now a context manager so it can be used
in a `with` statement. Contributed by Giampaolo Rodola.
- Issue #11554: Fixed support for Japanese codecs; previously the body output
@@ -3702,7 +3702,7 @@ Library
- Issue #11407: `TestCase.run` returns the result object used or created.
Contributed by Janathan Hartley.
-- Issue #11500: Fixed a bug in the os x proxy bypass code for fully qualified
+- Issue #11500: Fixed a bug in the OS X proxy bypass code for fully qualified
IP addresses in the proxy exception list.
- Issue #11491: dbm.error is no longer raised when dbm.open is called with