Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(22641)

Delta Between Two Patch Sets: Doc/whatsnew/3.6.rst

Issue 25994: File descriptor leaks in os.scandir()
Left Patch Set: Created 3 years, 7 months ago
Right Patch Set: Created 3 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
1 **************************** 1 ****************************
2 What's New In Python 3.6 2 What's New In Python 3.6
3 **************************** 3 ****************************
4 4
5 :Release: |release| 5 :Release: |release|
6 :Date: |today| 6 :Date: |today|
7 7
8 .. Rules for maintenance: 8 .. Rules for maintenance:
9 9
10 * Anyone can add text to this document. Do not spend very much time 10 * Anyone can add text to this document. Do not spend very much time
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 The :meth:`datetime.strftime() <datetime.datetime.strftime>` and 101 The :meth:`datetime.strftime() <datetime.datetime.strftime>` and
102 :meth:`date.strftime() <datetime.date.strftime>` methods now support ISO 8601 da te 102 :meth:`date.strftime() <datetime.date.strftime>` methods now support ISO 8601 da te
103 directives ``%G``, ``%u`` and ``%V``. 103 directives ``%G``, ``%u`` and ``%V``.
104 (Contributed by Ashley Anderson in :issue:`12006`.) 104 (Contributed by Ashley Anderson in :issue:`12006`.)
105 105
106 106
107 os 107 os
108 -- 108 --
109 109
110 A new :meth:`close() <os.scandir.close>` method allows explicitly 110 A new :meth:`~os.scandir.close` method allows explicitly closing a
Martin Panter 2016/02/10 03:38:38 Not a big deal, but I would have though the markup
storchaka 2016/02/10 10:03:42 Done.
111 closing a :func:`~os.scandir` iterator. The :func:`~os.scandir` iterator 111 :func:`~os.scandir` iterator. The :func:`~os.scandir` iterator now
112 now supports the :term:`context manager` protocol. If a :func:`scandir` 112 supports the :term:`context manager` protocol. If a :func:`scandir`
113 iterator is not exhausted or explicitly closed a :exc:`ResourceWarning` 113 iterator is not exhausted nor explicitly closed a :exc:`ResourceWarning`
Martin Panter 2016/02/10 03:38:38 nor explicitly closed
storchaka 2016/02/10 10:03:42 Done.
Jim.J.Jewett 2016/02/10 23:20:41 "not ... nor" -> "neither ... nor"
storchaka 2016/02/11 12:20:36 Done.
114 will be emitted in its destructor. 114 will be emitted in its destructor.
115 (Contributed by Serhiy Storchaka in :issue:`25994`.) 115 (Contributed by Serhiy Storchaka in :issue:`25994`.)
116 116
117 117
118 pickle 118 pickle
119 ------ 119 ------
120 120
121 Objects that need calling ``__new__`` with keyword arguments can now be pickled 121 Objects that need calling ``__new__`` with keyword arguments can now be pickled
122 using :ref:`pickle protocols <pickle-protocols>` older than protocol version 4. 122 using :ref:`pickle protocols <pickle-protocols>` older than protocol version 4.
123 Protocol version 4 already supports this case. (Contributed by Serhiy 123 Protocol version 4 already supports this case. (Contributed by Serhiy
(...skipping 24 matching lines...) Expand all
148 148
149 :class:`~urllib.robotparser.RobotFileParser` now supports the ``Crawl-delay`` an d 149 :class:`~urllib.robotparser.RobotFileParser` now supports the ``Crawl-delay`` an d
150 ``Request-rate`` extensions. 150 ``Request-rate`` extensions.
151 (Contributed by Nikolay Bogoychev in :issue:`16099`.) 151 (Contributed by Nikolay Bogoychev in :issue:`16099`.)
152 152
153 153
154 zipfile 154 zipfile
155 ------- 155 -------
156 156
157 A new :meth:`ZipInfo.from_file() <zipfile.ZipInfo.from_file>` class method 157 A new :meth:`ZipInfo.from_file() <zipfile.ZipInfo.from_file>` class method
158 allow to make :class:`~zipfile.ZipInfo` instance from a filesystem file. 158 allows making a :class:`~zipfile.ZipInfo` instance from a filesystem file.
159 A new :meth:`ZipInfo.is_dir() <zipfile.ZipInfo.is_dir>` method can be used 159 A new :meth:`ZipInfo.is_dir() <zipfile.ZipInfo.is_dir>` method can be used
160 to check if the :class:`~zipfile.ZipInfo` instance represents a directory. 160 to check if the :class:`~zipfile.ZipInfo` instance represents a directory.
161 (Contributed by Thomas Kluyver in :issue:`26039`.) 161 (Contributed by Thomas Kluyver in :issue:`26039`.)
162
163
164 zlib
165 ----
166
167 The :func:`~zlib.compress` function now accepts keyword arguments.
168 (Contributed by Aviv Palivoda in :issue:`26243`.)
162 169
163 170
164 Optimizations 171 Optimizations
165 ============= 172 =============
166 173
167 * The ASCII decoder is now up to 60 times as fast for error handlers 174 * The ASCII decoder is now up to 60 times as fast for error handlers
168 ``surrogateescape``, ``ignore`` and ``replace`` (Contributed 175 ``surrogateescape``, ``ignore`` and ``replace`` (Contributed
169 by Victor Stinner in :issue:`24870`). 176 by Victor Stinner in :issue:`24870`).
170 177
171 * The ASCII and the Latin1 encoders are now up to 3 times as fast for the 178 * The ASCII and the Latin1 encoders are now up to 3 times as fast for the
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 236
230 * The ``pyvenv`` script has been deprecated in favour of ``python3 -m venv``. 237 * The ``pyvenv`` script has been deprecated in favour of ``python3 -m venv``.
231 This prevents confusion as to what Python interpreter ``pyvenv`` is 238 This prevents confusion as to what Python interpreter ``pyvenv`` is
232 connected to and thus what Python interpreter will be used by the virtual 239 connected to and thus what Python interpreter will be used by the virtual
233 environment. (Contributed by Brett Cannon in :issue:`25154`.) 240 environment. (Contributed by Brett Cannon in :issue:`25154`.)
234 241
235 * When performing a relative import, falling back on ``__name__`` and 242 * When performing a relative import, falling back on ``__name__`` and
236 ``__path__`` from the calling module when ``__spec__`` or 243 ``__path__`` from the calling module when ``__spec__`` or
237 ``__package__`` are not defined now raises an :exc:`ImportWarning`. 244 ``__package__`` are not defined now raises an :exc:`ImportWarning`.
238 (Contributed by Rose Ames in :issue:`25791`.) 245 (Contributed by Rose Ames in :issue:`25791`.)
246
247
248 Deprecated Python behavior
249 --------------------------
250
251 * Raising the :exc:`StopIteration` exception inside a generator will now generat e a
252 :exc:`DeprecationWarning`, and will trigger a :exc:`RuntimeError` in Python 3. 7.
253 See :ref:`whatsnew-pep-479` for details.
239 254
240 255
241 Removed 256 Removed
242 ======= 257 =======
243 258
244 API and Feature Removals 259 API and Feature Removals
245 ------------------------ 260 ------------------------
246 261
247 * ``inspect.getmoduleinfo()`` was removed (was deprecated since CPython 3.3). 262 * ``inspect.getmoduleinfo()`` was removed (was deprecated since CPython 3.3).
248 :func:`inspect.getmodulename` should be used for obtaining the module 263 :func:`inspect.getmodulename` should be used for obtaining the module
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 * When a relative import is performed and no parent package is known, then 317 * When a relative import is performed and no parent package is known, then
303 :exc:`ImportError` will be raised. Previously, :exc:`SystemError` could be 318 :exc:`ImportError` will be raised. Previously, :exc:`SystemError` could be
304 raised. (Contribute by Brett Cannon in :issue:`18018`.) 319 raised. (Contribute by Brett Cannon in :issue:`18018`.)
305 320
306 321
307 Changes in the C API 322 Changes in the C API
308 -------------------- 323 --------------------
309 324
310 * :c:func:`Py_Exit` (and the main interpreter) now override the exit status 325 * :c:func:`Py_Exit` (and the main interpreter) now override the exit status
311 with 120 if flushing buffered data failed. See :issue:`5319`. 326 with 120 if flushing buffered data failed. See :issue:`5319`.
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+