From 066a2146989ad0fd37fc919002806a925c6848f7 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Mon, 12 Sep 2016 17:29:04 -0400 Subject: Bump to 3.7.0a0 --- Doc/whatsnew/3.7.rst | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 Doc/whatsnew/3.7.rst (limited to 'Doc/whatsnew/3.7.rst') diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst new file mode 100644 index 0000000000..0b54019841 --- /dev/null +++ b/Doc/whatsnew/3.7.rst @@ -0,0 +1,115 @@ +**************************** + What's New In Python 3.7 +**************************** + +:Release: |release| +:Date: |today| + +.. Rules for maintenance: + + * Anyone can add text to this document. Do not spend very much time + on the wording of your changes, because your text will probably + get rewritten to some degree. + + * The maintainer will go through Misc/NEWS periodically and add + changes; it's therefore more important to add your changes to + Misc/NEWS than to this file. + + * This is not a complete list of every single change; completeness + is the purpose of Misc/NEWS. Some changes I consider too small + or esoteric to include. If such a change is added to the text, + I'll just remove it. (This is another reason you shouldn't spend + too much time on writing your addition.) + + * If you want to draw your new text to the attention of the + maintainer, add 'XXX' to the beginning of the paragraph or + section. + + * It's OK to just add a fragmentary note about a change. For + example: "XXX Describe the transmogrify() function added to the + socket module." The maintainer will research the change and + write the necessary text. + + * You can comment out your additions if you like, but it's not + necessary (especially when a final release is some months away). + + * Credit the author of a patch or bugfix. Just the name is + sufficient; the e-mail address isn't necessary. + + * It's helpful to add the bug/patch number as a comment: + + XXX Describe the transmogrify() function added to the socket + module. + (Contributed by P.Y. Developer in :issue:`12345`.) + + This saves the maintainer the effort of going through the Mercurial log + when researching a change. + +This article explains the new features in Python 3.7, compared to 3.6. + +For full details, see the :source:`Misc/NEWS` file. + +.. note:: + + Prerelease users should be aware that this document is currently in draft + form. It will be updated substantially as Python 3.7 moves towards release, + so it's worth checking back even after reading earlier versions. + + +Summary -- Release highlights +============================= + +.. This section singles out the most important changes in Python 3.7. + Brevity is key. + + +.. PEP-sized items next. + + + +New Features +============ + + + +Other Language Changes +====================== + + + +New Modules +=========== + +* None yet. + + +Improved Modules +================ + + +Optimizations +============= + + +Build and C API Changes +======================= + + + +Deprecated +========== + + + +Removed +======= + + + +Porting to Python 3.7 +===================== + +This section lists previously described changes and other bugfixes +that may require changes to your code. + + -- cgit v1.2.1 From 5d4c6d95015015bdc10eba4d6687018d2cc172d3 Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Sat, 17 Sep 2016 01:25:24 -0500 Subject: Closes #27979: Remove bundled copy of libffi An installed copy of libffi is now required for building _ctypes on any platform but OSX and Windows. --- Doc/whatsnew/3.7.rst | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Doc/whatsnew/3.7.rst') diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index 0b54019841..91c6cc1762 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -94,6 +94,10 @@ Optimizations Build and C API Changes ======================= +* A full copy of libffi is no longer bundled for use when building the + :mod:`_ctypes ` module on non-OSX UNIX platforms. An installed copy + of libffi is now required when building ``_ctypes`` on such platforms. + Contributed by Zachary Ware in :issue:`27979`. Deprecated -- cgit v1.2.1 From abeacf914be1d289e08cc06be4516e2a7d756032 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 22 Nov 2016 07:58:08 +0200 Subject: Issue #28761: The fields name and doc of structures PyMemberDef, PyGetSetDef, PyStructSequence_Field, PyStructSequence_Desc, and wrapperbase are now of type "const char *" rather of "char *". --- Doc/whatsnew/3.7.rst | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Doc/whatsnew/3.7.rst') diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index de0c3646bd..0f6ebc4b1d 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -99,6 +99,12 @@ Build and C API Changes of libffi is now required when building ``_ctypes`` on such platforms. Contributed by Zachary Ware in :issue:`27979`. +* The fields :c:member:`name` and :c:member:`doc` of structures + :c:type:`PyMemberDef`, :c:type:`PyGetSetDef`, + :c:type:`PyStructSequence_Field`, :c:type:`PyStructSequence_Desc`, + and :c:type:`wrapperbase` are now of type ``const char *`` rather of + ``char *``. (Contributed by Serhiy Storchaka in :issue:`28761`.) + Deprecated ========== -- cgit v1.2.1 From ed1d1ae207b06ff23524a9ab6081997b8fecd70b Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 28 Nov 2016 10:52:05 +0200 Subject: Issue #12844: More than 255 arguments can now be passed to a function. --- Doc/whatsnew/3.7.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Doc/whatsnew/3.7.rst') diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index 0f6ebc4b1d..d306d40357 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -75,6 +75,8 @@ New Features Other Language Changes ====================== +* More than 255 arguments can now be passed to a function. + (Contributed by Serhiy Storchaka in :issue:`12844`.) New Modules -- cgit v1.2.1 From 4f5d39b98cc760dcb7641bb71bdaeb2933b1ee40 Mon Sep 17 00:00:00 2001 From: Yury Selivanov Date: Tue, 13 Dec 2016 19:03:51 -0500 Subject: Issue #26110: Add LOAD_METHOD/CALL_METHOD opcodes. Special thanks to INADA Naoki for pushing the patch through the last mile, Serhiy Storchaka for reviewing the code, and to Victor Stinner for suggesting the idea (originally implemented in the PyPy project). --- Doc/whatsnew/3.7.rst | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Doc/whatsnew/3.7.rst') diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index 14285d97a6..90ef759c4f 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -92,6 +92,11 @@ Improved Modules Optimizations ============= +* Added two new opcodes: ``LOAD_METHOD`` and ``CALL_METHOD`` to avoid + instantiation of bound method objects for method calls, which results + in method calls being faster up to 20%. + (Contributed by Yury Selivanov and INADA Naoki in :issue:`26110`.) + Build and C API Changes ======================= -- cgit v1.2.1 From b738df1cd4bcfdf6e01ea459ca559cd64f0bf6f3 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Fri, 16 Dec 2016 19:19:02 +0200 Subject: Issue #18896: Python function can now have more than 255 parameters. collections.namedtuple() now supports tuples with more than 255 elements. --- Doc/whatsnew/3.7.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Doc/whatsnew/3.7.rst') diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index 90ef759c4f..ac3a151638 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -75,8 +75,9 @@ New Features Other Language Changes ====================== -* More than 255 arguments can now be passed to a function. - (Contributed by Serhiy Storchaka in :issue:`12844`.) +* More than 255 arguments can now be passed to a function, and a function can + now have more than 255 parameters. + (Contributed by Serhiy Storchaka in :issue:`12844` and :issue:`18896`.) New Modules -- cgit v1.2.1 From d33309cd9787b4ab16f5bbc6abb6ad3f7c6f42f7 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 19 Dec 2016 18:51:37 +0200 Subject: Issue #28927: bytes.fromhex() and bytearray.fromhex() now ignore all ASCII whitespace, not only spaces. Patch by Robert Xiao. --- Doc/whatsnew/3.7.rst | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Doc/whatsnew/3.7.rst') diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index ac3a151638..0d19f25942 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -79,6 +79,10 @@ Other Language Changes now have more than 255 parameters. (Contributed by Serhiy Storchaka in :issue:`12844` and :issue:`18896`.) +* :meth:`bytes.fromhex` and :meth:`bytearray.fromhex` now ignore all ASCII + whitespace, not only spaces. + (Contributed by Robert Xiao in :issue:`28927`.) + New Modules =========== -- cgit v1.2.1 From 3c70739866781670089dfd30215ddf62713181d9 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 11 Jan 2017 20:13:03 +0200 Subject: Issue #20804: The unittest.mock.sentinel attributes now preserve their identity when they are copied or pickled. --- Doc/whatsnew/3.7.rst | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Doc/whatsnew/3.7.rst') diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index 0d19f25942..a2e6422793 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -93,6 +93,13 @@ New Modules Improved Modules ================ +unittest.mock +------------- + +The :const:`~unittest.mock.sentinel` attributes now preserve their identity +when they are :mod:`copied ` or :mod:`pickled `. +(Contributed by Serhiy Storchaka in :issue:`20804`.) + Optimizations ============= -- cgit v1.2.1 From 1e97cd7fb5d5776bf8bbf76bb4586d0b86833d45 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Fri, 13 Jan 2017 09:10:51 +0200 Subject: Issue #29193: A format string argument for string.Formatter.format() is now positional-only. --- Doc/whatsnew/3.7.rst | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Doc/whatsnew/3.7.rst') diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index a2e6422793..c4814e2706 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -147,3 +147,9 @@ This section lists previously described changes and other bugfixes that may require changes to your code. +Changes in the Python API +------------------------- + +* A format string argument for :meth:`string.Formatter.format` + is now :ref:`positional-only `. + (Contributed by Serhiy Storchaka in :issue:`29193`.) -- cgit v1.2.1 From 86f7fe2081eae28a74be681453a59c243f9632cf Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Fri, 13 Jan 2017 09:23:15 +0200 Subject: Issue #29192: Removed deprecated features in the http.cookies module. --- Doc/whatsnew/3.7.rst | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Doc/whatsnew/3.7.rst') diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index c4814e2706..411f9167e7 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -153,3 +153,10 @@ Changes in the Python API * A format string argument for :meth:`string.Formatter.format` is now :ref:`positional-only `. (Contributed by Serhiy Storchaka in :issue:`29193`.) + +* Attributes :attr:`~http.cookies.Morsel.key`, + :attr:`~http.cookies.Morsel.value` and + :attr:`~http.cookies.Morsel.coded_value` of class + :class:`http.cookies.Morsel` are now read-only. + Use the :meth:`~http.cookies.Morsel.set` method for setting them. + (Contributed by Serhiy Storchaka in :issue:`29192`.) -- cgit v1.2.1 From c3e70c9df5ac47a4e611afdc6a4ea1e621d2d0aa Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Fri, 13 Jan 2017 13:25:24 +0200 Subject: Issue #29210: Removed support of deprecated argument "exclude" in tarfile.TarFile.add(). --- Doc/whatsnew/3.7.rst | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Doc/whatsnew/3.7.rst') diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index 411f9167e7..e6dd5a17cd 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -139,6 +139,9 @@ API and Feature Removals * Unknown escapes consisting of ``'\'`` and an ASCII letter in replacement templates for :func:`re.sub` will now cause an error. +* Removed support of the *exclude* argument in :meth:`tarfile.TarFile.add`. + Use the *filter* argument instead. + Porting to Python 3.7 ===================== -- cgit v1.2.1 From 41cbeed8d7604d0562cc9d6494520886f82d2ace Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Fri, 13 Jan 2017 20:55:05 +0200 Subject: Issue #29197: Removed deprecated function ntpath.splitunc(). --- Doc/whatsnew/3.7.rst | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Doc/whatsnew/3.7.rst') diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index e6dd5a17cd..56545b8941 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -142,6 +142,10 @@ API and Feature Removals * Removed support of the *exclude* argument in :meth:`tarfile.TarFile.add`. Use the *filter* argument instead. +* The ``splitunc()`` function in the :mod:`ntpath` module was deprecated in + Python 3.1, and has now been removed. Use the :func:`~os.path.splitdrive` + function instead. + Porting to Python 3.7 ===================== -- cgit v1.2.1 From 3f4d8f833093a8c51cae48f59d4dea79171fd675 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Fri, 13 Jan 2017 21:14:40 +0200 Subject: Document Python versions in which the removed features were deprecated. --- Doc/whatsnew/3.7.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Doc/whatsnew/3.7.rst') diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index 56545b8941..ca7c2c5381 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -137,10 +137,11 @@ API and Feature Removals ------------------------ * Unknown escapes consisting of ``'\'`` and an ASCII letter in replacement - templates for :func:`re.sub` will now cause an error. + templates for :func:`re.sub` were deprecated in Python 3.5, and will now + cause an error. * Removed support of the *exclude* argument in :meth:`tarfile.TarFile.add`. - Use the *filter* argument instead. + It was deprecated in Python 2.7 and 3.2. Use the *filter* argument instead. * The ``splitunc()`` function in the :mod:`ntpath` module was deprecated in Python 3.1, and has now been removed. Use the :func:`~os.path.splitdrive` @@ -159,11 +160,13 @@ Changes in the Python API * A format string argument for :meth:`string.Formatter.format` is now :ref:`positional-only `. + Passing it as a keyword argument was deprecated in Python 3.5. (Contributed by Serhiy Storchaka in :issue:`29193`.) * Attributes :attr:`~http.cookies.Morsel.key`, :attr:`~http.cookies.Morsel.value` and :attr:`~http.cookies.Morsel.coded_value` of class :class:`http.cookies.Morsel` are now read-only. + Assigning to them was deprecated in Python 3.5. Use the :meth:`~http.cookies.Morsel.set` method for setting them. (Contributed by Serhiy Storchaka in :issue:`29192`.) -- cgit v1.2.1 From fb133ca2ee4decf7f9a30ad020564617783403ce Mon Sep 17 00:00:00 2001 From: INADA Naoki Date: Mon, 16 Jan 2017 17:23:30 +0900 Subject: Issue #26110: Add document for LOAD_METHOD and CALL_METHOD opcode. Changed stack layout bit for "easy to explain." --- Doc/whatsnew/3.7.rst | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Doc/whatsnew/3.7.rst') diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index ca7c2c5381..fe03defa65 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -170,3 +170,10 @@ Changes in the Python API Assigning to them was deprecated in Python 3.5. Use the :meth:`~http.cookies.Morsel.set` method for setting them. (Contributed by Serhiy Storchaka in :issue:`29192`.) + + +CPython bytecode changes +------------------------ + +* Added two new opcodes: :opcode:`LOAD_METHOD`` and :opcode:`CALL_METHOD`. + (Contributed by Yury Selivanov and INADA Naoki in :issue:`26110`.) -- cgit v1.2.1 From 06a1969f0c560934f61b1df1798e9aab89b19702 Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Sat, 21 Jan 2017 12:35:30 +0000 Subject: Issue #29282: add fused multiply-add function, math.fma. --- Doc/whatsnew/3.7.rst | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Doc/whatsnew/3.7.rst') diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index fe03defa65..192a7ab59a 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -100,6 +100,15 @@ The :const:`~unittest.mock.sentinel` attributes now preserve their identity when they are :mod:`copied ` or :mod:`pickled `. (Contributed by Serhiy Storchaka in :issue:`20804`.) +math module +----------- + +A new function :func:`~math.fma` for fused multiply-add operations has been +added. This function computes ``x * y + z`` with only a single round, and so +avoids any intermediate loss of precision. It wraps the ``fma`` function +provided by C99, and follows the specification of the IEEE 754-2008 +"fusedMultiplyAdd" operation for special cases. + Optimizations ============= -- cgit v1.2.1 From 15a9df1f32c007a211dc165b26c189153feec4ca Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Sat, 21 Jan 2017 13:10:52 +0000 Subject: Issue #29282: Backed out changeset b33012ef1417 --- Doc/whatsnew/3.7.rst | 9 --------- 1 file changed, 9 deletions(-) (limited to 'Doc/whatsnew/3.7.rst') diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index 192a7ab59a..fe03defa65 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -100,15 +100,6 @@ The :const:`~unittest.mock.sentinel` attributes now preserve their identity when they are :mod:`copied ` or :mod:`pickled `. (Contributed by Serhiy Storchaka in :issue:`20804`.) -math module ------------ - -A new function :func:`~math.fma` for fused multiply-add operations has been -added. This function computes ``x * y + z`` with only a single round, and so -avoids any intermediate loss of precision. It wraps the ``fma`` function -provided by C99, and follows the specification of the IEEE 754-2008 -"fusedMultiplyAdd" operation for special cases. - Optimizations ============= -- cgit v1.2.1 From 72ded8136b92c1b107f629021cf231fd3163f041 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 22 Jan 2017 23:07:07 +0200 Subject: Issue #28769: The result of PyUnicode_AsUTF8AndSize() and PyUnicode_AsUTF8() is now of type "const char *" rather of "char *". --- Doc/whatsnew/3.7.rst | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Doc/whatsnew/3.7.rst') diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index fe03defa65..5353a141cb 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -124,6 +124,10 @@ Build and C API Changes and :c:type:`wrapperbase` are now of type ``const char *`` rather of ``char *``. (Contributed by Serhiy Storchaka in :issue:`28761`.) +* The result of :c:func:`PyUnicode_AsUTF8AndSize` and :c:func:`PyUnicode_AsUTF8` + is now of type ``const char *`` rather of ``char *``. + (Contributed by Serhiy Storchaka in :issue:`28769`.) + Deprecated ========== -- cgit v1.2.1 From 8882e556eef08ade01461b9f4ccfe2d82bdae694 Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Tue, 24 Jan 2017 00:30:06 +0000 Subject: Fix grammar in doc string, RST markup --- Doc/whatsnew/3.7.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Doc/whatsnew/3.7.rst') diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index 5353a141cb..129d4d45c5 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -179,5 +179,5 @@ Changes in the Python API CPython bytecode changes ------------------------ -* Added two new opcodes: :opcode:`LOAD_METHOD`` and :opcode:`CALL_METHOD`. +* Added two new opcodes: :opcode:`LOAD_METHOD` and :opcode:`CALL_METHOD`. (Contributed by Yury Selivanov and INADA Naoki in :issue:`26110`.) -- cgit v1.2.1