@@ -1504,12 +1504,20 @@ os
15041504 :func: `~os.link `, :func: `~os.lstat `, :func: `~os.mkdir `, :func: `~os.mkfifo `,
15051505 :func: `~os.mknod `, :func: `~os.open `, :func: `~os.readlink `, :func: `~os.remove `,
15061506 :func: `~os.rename `, :func: `~os.replace `, :func: `~os.rmdir `, :func: `~os.stat `,
1507- :func: `~os.symlink `, :func: `~os.unlink `, :func: `~os.utime `.
1507+ :func: `~os.symlink `, :func: `~os.unlink `, :func: `~os.utime `. Platform
1508+ support for using these parameters can be checked via the sets
1509+ :data: `os.supports_dir_fd ` and :data: `os.supports_follows_symlinks `.
15081510
15091511 - The following functions now support a file descriptor for their path argument:
15101512 :func: `~os.chdir `, :func: `~os.chmod `, :func: `~os.chown `,
15111513 :func: `~os.execve `, :func: `~os.listdir `, :func: `~os.pathconf `, :func: `~os.path.exists `,
1512- :func: `~os.stat `, :func: `~os.statvfs `, :func: `~os.utime `.
1514+ :func: `~os.stat `, :func: `~os.statvfs `, :func: `~os.utime `. Platform support
1515+ for this can be checked via the :data: `os.supports_fd ` set.
1516+
1517+ * :func: `~os.access ` accepts an ``effective_ids `` keyword argument to turn on
1518+ using the effective uid/gid rather than the real uid/gid in the access check.
1519+ Platform support for this can be checked via the
1520+ :data: `~os.supports_effective_ids ` set.
15131521
15141522* The :mod: `os ` module has two new functions: :func: `~os.getpriority ` and
15151523 :func: `~os.setpriority `. They can be used to get or set process
15581566 for a file.
15591567 * :func: `~os.sync `: Force write of everything to disk.
15601568
1561- * Add some extra posix functions to the os module :
1569+ * Additional new posix functions:
15621570
15631571 * :func: `~os.lockf `: Apply, test or remove a POSIX lock on an open file descriptor.
15641572 * :func: `~os.pread `: Read from a file descriptor at an offset, the file
@@ -1577,6 +1585,12 @@ os
15771585* :func: `~os.times ` and :func: `~os.uname `: Return type changed from a tuple to
15781586 a tuple-like object with named attributes.
15791587
1588+ * Some platforms now support additional constants for the :func: `~os.lseek `
1589+ function, such as ``os.SEEK_HOLE `` and ``os.SEEK_DATA ``.
1590+
1591+ * :func: `os.symlink ` now accepts (and ignores) the ``target_is_directory ``
1592+ keyword argument on non-Windows platforms, to ease cross-platform support.
1593+
15801594
15811595pdb
15821596---
@@ -1703,6 +1717,14 @@ signal
17031717 instead of a RuntimeError: OSError has an errno attribute.
17041718
17051719
1720+ smtp
1721+ ----
1722+
1723+ :class: `~smtplib.SMTP ` now supports the context manager protocol, allowing an
1724+ ``SMTP `` instance to be used in a ``with `` statement. (Contributed
1725+ by Giampaolo Rodolà in :issue: `11289 `.)
1726+
1727+
17061728smtpd
17071729-----
17081730
@@ -1810,6 +1832,18 @@ the form '-rwxrwxrwx'.
18101832
18111833(Contributed by Giampaolo Rodolà in :issue: `14807 `)
18121834
1835+
1836+ subprocess
1837+ ----------
1838+
1839+ Command strings can now be bytes objects on posix platforms. (Contributed by
1840+ Victor Stiner in :issue: `8513 `.)
1841+
1842+ A new constant :data: `~subprocess.DEVNULL ` allows suppressing output in a
1843+ platform-independent fashion. (Contributed by Ross Lagerwall in
1844+ :issue: `5870 `.)
1845+
1846+
18131847sys
18141848---
18151849
@@ -1872,10 +1906,11 @@ unittest
18721906
18731907:meth: `.assertRaises `, :meth: `.assertRaisesRegex `, :meth: `.assertWarns `, and
18741908:meth: `.assertWarnsRegex ` now accept a keyword argument *msg * when used as
1875- context managers.
1876-
1877- (Contributed by Ezio Melotti and Winston Ewert in :issue: `10775 `)
1909+ context managers. (Contributed by Ezio Melotti and Winston Ewert in
1910+ :issue: `10775 `)
18781911
1912+ :meth: `unittest.TestCase.run ` now returns the :class: `~unittest.TestResult `
1913+ object.
18791914
18801915urllib
18811916------
@@ -1993,7 +2028,7 @@ Deprecated Python modules, functions and methods
19932028* :meth: `ftplib.FTP.nlst ` and :meth: `ftplib.FTP.dir `: use
19942029 :meth: `ftplib.FTP.mlsd `
19952030* :func: `platform.popen `: use the :mod: `subprocess ` module. Check especially
1996- the :ref: `subprocess-replacements ` section.
2031+ the :ref: `subprocess-replacements ` section ( :issue: ` 11377 `) .
19972032* :issue: `13374 `: The Windows bytes API has been deprecated in the :mod: `os `
19982033 module. Use Unicode filenames, instead of bytes filenames, to not depend on
19992034 the ANSI code page anymore and to support any filename.
0 commit comments