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

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:`scandir.close() <os.scandir.close>` method allows explicit 110 A new :meth:`~os.scandir.close` method allows explicitly closing a
111 closing a :class:`~os.scandir` instance. The :class:`~os.scandir` class 111 :func:`~os.scandir` iterator. The :func:`~os.scandir` iterator now
Martin Panter 2016/02/09 02:45:01 explicitly closing
storchaka 2016/02/09 16:11:45 Done.
112 now supports the :term:`context manager` protocol. 112 supports the :term:`context manager` protocol. If a :func:`scandir`
113 iterator is not exhausted nor explicitly closed a :exc:`ResourceWarning`
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.
113 (Contributed by Serhiy Storchaka in :issue:`25994`.) 115 (Contributed by Serhiy Storchaka in :issue:`25994`.)
116
114 117
115 pickle 118 pickle
116 ------ 119 ------
117 120
118 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
119 using :ref:`pickle protocols <pickle-protocols>` older than protocol version 4. 122 using :ref:`pickle protocols <pickle-protocols>` older than protocol version 4.
120 Protocol version 4 already supports this case. (Contributed by Serhiy 123 Protocol version 4 already supports this case. (Contributed by Serhiy
121 Storchaka in :issue:`24164`.) 124 Storchaka in :issue:`24164`.)
122 125
123 126
(...skipping 21 matching lines...) Expand all
145 148
146 :class:`~urllib.robotparser.RobotFileParser` now supports the ``Crawl-delay`` an d 149 :class:`~urllib.robotparser.RobotFileParser` now supports the ``Crawl-delay`` an d
147 ``Request-rate`` extensions. 150 ``Request-rate`` extensions.
148 (Contributed by Nikolay Bogoychev in :issue:`16099`.) 151 (Contributed by Nikolay Bogoychev in :issue:`16099`.)
149 152
150 153
151 zipfile 154 zipfile
152 ------- 155 -------
153 156
154 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
155 allow to make :class:`~zipfile.ZipInfo` instance from a filesystem file. 158 allows making a :class:`~zipfile.ZipInfo` instance from a filesystem file.
156 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
157 to check if the :class:`~zipfile.ZipInfo` instance represents a directory. 160 to check if the :class:`~zipfile.ZipInfo` instance represents a directory.
158 (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`.)
159 169
160 170
161 Optimizations 171 Optimizations
162 ============= 172 =============
163 173
164 * 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
165 ``surrogateescape``, ``ignore`` and ``replace`` (Contributed 175 ``surrogateescape``, ``ignore`` and ``replace`` (Contributed
166 by Victor Stinner in :issue:`24870`). 176 by Victor Stinner in :issue:`24870`).
167 177
168 * 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
226 236
227 * 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``.
228 This prevents confusion as to what Python interpreter ``pyvenv`` is 238 This prevents confusion as to what Python interpreter ``pyvenv`` is
229 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
230 environment. (Contributed by Brett Cannon in :issue:`25154`.) 240 environment. (Contributed by Brett Cannon in :issue:`25154`.)
231 241
232 * When performing a relative import, falling back on ``__name__`` and 242 * When performing a relative import, falling back on ``__name__`` and
233 ``__path__`` from the calling module when ``__spec__`` or 243 ``__path__`` from the calling module when ``__spec__`` or
234 ``__package__`` are not defined now raises an :exc:`ImportWarning`. 244 ``__package__`` are not defined now raises an :exc:`ImportWarning`.
235 (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.
236 254
237 255
238 Removed 256 Removed
239 ======= 257 =======
240 258
241 API and Feature Removals 259 API and Feature Removals
242 ------------------------ 260 ------------------------
243 261
244 * ``inspect.getmoduleinfo()`` was removed (was deprecated since CPython 3.3). 262 * ``inspect.getmoduleinfo()`` was removed (was deprecated since CPython 3.3).
245 :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
299 * 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
300 :exc:`ImportError` will be raised. Previously, :exc:`SystemError` could be 318 :exc:`ImportError` will be raised. Previously, :exc:`SystemError` could be
301 raised. (Contribute by Brett Cannon in :issue:`18018`.) 319 raised. (Contribute by Brett Cannon in :issue:`18018`.)
302 320
303 321
304 Changes in the C API 322 Changes in the C API
305 -------------------- 323 --------------------
306 324
307 * :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
308 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+