Skip to content

Commit cab0b2b

Browse files
authored
bpo-29708: Add What's New entries for SOURCE_DATE_EPOCH and py_compile (GH-5306)
1 parent fe133aa commit cab0b2b

File tree

1 file changed

+31
-15
lines changed

1 file changed

+31
-15
lines changed

Doc/whatsnew/3.7.rst

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,17 @@ begins. (Contributed by Barry Warsaw in :issue:`31389`.)
479479
pdb command line now accepts `-m module_name` as an alternative to
480480
script file. (Contributed by Mario Corchero in :issue:`32206`.)
481481

482+
py_compile
483+
----------
484+
485+
:func:`py_compile.compile` -- and by extension, :mod:`compileall` -- now
486+
respects the :envvar:`SOURCE_DATE_EPOCH` environment variable by
487+
unconditionally creating ``.pyc`` files for hash-based validation.
488+
This allows for guaranteeing
489+
`reproducible builds <https://reproducible-builds.org/>`_ of ``.pyc``
490+
files when they are created eagerly. (Contributed by Bernhard M. Wiedemann
491+
in :issue:`29708`.)
492+
482493

483494
re
484495
--
@@ -544,6 +555,12 @@ Added functions :func:`time.thread_time` and :func:`time.thread_time_ns`
544555
to get per-thread CPU time measurements.
545556
(Contributed by Antoine Pitrou in :issue:`32025`.)
546557

558+
unicodedata
559+
-----------
560+
561+
The internal :mod:`unicodedata` database has been upgraded to use `Unicode 10
562+
<http://www.unicode.org/versions/Unicode10.0.0/>`_. (Contributed by Benjamin
563+
Peterson.)
547564

548565
unittest
549566
--------
@@ -565,20 +582,6 @@ children by preventing to get or set any new attribute on the sealed mock.
565582
The sealing process is performed recursively. (Contributed by Mario Corchero
566583
in :issue:`30541`.)
567584

568-
xmlrpc.server
569-
-------------
570-
571-
:meth:`register_function` of :class:`xmlrpc.server.SimpleXMLRPCDispatcher` and
572-
its subclasses can be used as a decorator. (Contributed by Xiang Zhang in
573-
:issue:`7769`.)
574-
575-
unicodedata
576-
-----------
577-
578-
The internal :mod:`unicodedata` database has been upgraded to use `Unicode 10
579-
<http://www.unicode.org/versions/Unicode10.0.0/>`_. (Contributed by Benjamin
580-
Peterson.)
581-
582585
urllib.parse
583586
------------
584587

@@ -624,6 +627,13 @@ methods can now compare text of the current node with ``[. = "text"]``,
624627
not only text in children. Predicates also allow adding spaces for
625628
better readability. (Contributed by Stefan Behnel in :issue:`31648`.)
626629

630+
xmlrpc.server
631+
-------------
632+
633+
:meth:`register_function` of :class:`xmlrpc.server.SimpleXMLRPCDispatcher` and
634+
its subclasses can be used as a decorator. (Contributed by Xiang Zhang in
635+
:issue:`7769`.)
636+
627637
zipapp
628638
------
629639

@@ -680,10 +690,16 @@ Optimizations
680690
Build and C API Changes
681691
=======================
682692

693+
* :mod:`py_compile` and :mod:`compileall` now support the
694+
:envvar:`SOURCE_DATE_EPOCH` environment variable by unconditionally
695+
building ``.pyc`` files for hash verification instead of potentially
696+
timestamp-based ``.pyc`` files. See the notes for the `py_compile`_
697+
improvement notes for more details.
698+
683699
* A full copy of libffi is no longer bundled for use when building the
684700
:mod:`_ctypes <ctypes>` module on non-OSX UNIX platforms. An installed copy
685701
of libffi is now required when building ``_ctypes`` on such platforms.
686-
Contributed by Zachary Ware in :issue:`27979`.
702+
(Contributed by Zachary Ware in :issue:`27979`.)
687703

688704
* The fields :c:member:`name` and :c:member:`doc` of structures
689705
:c:type:`PyMemberDef`, :c:type:`PyGetSetDef`,

0 commit comments

Comments
 (0)