1.. bpo: 46009
2.. date: 2021-12-08-11-06-53
3.. nonce: cL8pH0
4.. release date: 2021-12-08
5.. section: Core and Builtins
6
7Restore behavior from 3.9 and earlier when sending non-None to newly started
8generator. In 3.9 this did not affect the state of the generator. In 3.10.0
9and 3.10.1 ``gen_func().send(0)`` is equivalent to
10``gen_func().throw(TypeError(...)`` which exhausts the generator. In 3.10.2
11onward, the behavior has been reverted to that of 3.9.
12
13..
14
15.. bpo: 46004
16.. date: 2021-12-07-11-24-24
17.. nonce: TTEU1p
18.. section: Core and Builtins
19
20Fix the :exc:`SyntaxError` location for errors involving for loops with
21invalid targets. Patch by Pablo Galindo
22
23..
24
25.. bpo: 45711
26.. date: 2021-12-05-17-36-08
27.. nonce: 3TmTSw
28.. section: Core and Builtins
29
30:c:func:`_PyErr_ChainStackItem` no longer normalizes ``exc_info`` (including
31setting the traceback on the exception instance) because ``exc_info`` is
32always normalized.
33
34..
35
36.. bpo: 45607
37.. date: 2021-12-01-15-38-04
38.. nonce: JhuF8b
39.. section: Core and Builtins
40
41The ``__note__`` field was added to :exc:`BaseException`. It is ``None`` by
42default but can be set to a string which is added to the exception's
43traceback.
44
45..
46
47.. bpo: 45947
48.. date: 2021-12-01-14-06-36
49.. nonce: 1XPPm_
50.. section: Core and Builtins
51
52Place pointers to dict and values immediately before GC header. This reduces
53number of dependent memory loads to access either dict or values from 3 to
541.
55
56..
57
58.. bpo: 45915
59.. date: 2021-11-28-11-25-08
60.. nonce: TSGcLF
61.. section: Core and Builtins
62
63``is_valid_fd`` now uses faster ``fcntl(fd, F_GETFD)`` on Linux, macOS, and
64Windows.
65
66..
67
68.. bpo: 44530
69.. date: 2021-11-26-23-26-25
70.. nonce: EZ0gel
71.. section: Core and Builtins
72
73Reverts a change to the ``code.__new__`` :ref:`audit event <audit-events>`
74from an earlier prerelease.
75
76..
77
78.. bpo: 42268
79.. date: 2021-11-26-22-31-22
80.. nonce: 3wl-09
81.. section: Core and Builtins
82
83Fail the configure step if the selected compiler doesn't support memory
84sanitizer. Patch by Pablo Galindo
85
86..
87
88.. bpo: 45711
89.. date: 2021-11-25-17-51-29
90.. nonce: D2igmz
91.. section: Core and Builtins
92
93The three values of ``exc_info`` are now always consistent with each other.
94In particular, the ``type`` and ``traceback`` fields are now derived from
95the exception instance. This impacts the return values of
96:func:`sys.exc_info` and :c:func:`PyErr_GetExcInfo()` if the exception
97instance is modified while the exception is handled, as well as
98:c:func:`PyErr_SetExcInfo()`, which now ignores the ``type`` and
99``traceback`` arguments provided to it.
100
101..
102
103.. bpo: 45727
104.. date: 2021-11-24-18-24-49
105.. nonce: _xVbbo
106.. section: Core and Builtins
107
108Refine the custom syntax error that suggests that a comma may be missing to
109trigger only when the expressions are detected between parentheses or
110brackets. Patch by Pablo Galindo
111
112..
113
114.. bpo: 45885
115.. date: 2021-11-23-21-01-56
116.. nonce: 3IxeCX
117.. section: Core and Builtins
118
119Specialized the ``COMPARE_OP`` opcode using the PEP 659 machinery.
120
121..
122
123.. bpo: 45786
124.. date: 2021-11-23-15-25-00
125.. nonce: UdEciD
126.. section: Core and Builtins
127
128Allocate space for the interpreter frame in the frame object, to avoid an
129additional allocation when the frame object outlives the frame activation.
130
131..
132
133.. bpo: 45614
134.. date: 2021-11-23-12-06-41
135.. nonce: fIekgI
136.. section: Core and Builtins
137
138Fix :mod:`traceback` display for exceptions with invalid module name.
139
140..
141
142.. bpo: 45813
143.. date: 2021-11-22-11-28-13
144.. nonce: ZMaWE2
145.. section: Core and Builtins
146
147Fix crash when calling coro.cr_frame.clear() after coroutine has been freed.
148
149..
150
151.. bpo: 45811
152.. date: 2021-11-20-02-25-06
153.. nonce: B-1Gsr
154.. section: Core and Builtins
155
156Improve the tokenizer errors when encountering invisible control characters
157in the parser. Patch by Pablo Galindo
158
159..
160
161.. bpo: 45848
162.. date: 2021-11-19-22-57-42
163.. nonce: HgVBJ5
164.. section: Core and Builtins
165
166Allow the parser to obtain error lines directly from encoded files. Patch by
167Pablo Galindo
168
169..
170
171.. bpo: 45709
172.. date: 2021-11-19-13-17-47
173.. nonce: H_t7ut
174.. section: Core and Builtins
175
176Restore behavior from 3.10 when tracing an exception raised within a with
177statement.
178
179..
180
181.. bpo: 44525
182.. date: 2021-11-18-10-02-02
183.. nonce: M4xwn_
184.. section: Core and Builtins
185
186Adds new :opcode:`COPY_FREE_VARS` opcode, to make copying of free variables
187from function to frame explicit. Helps optimization of calls to Python
188function.
189
190..
191
192.. bpo: 45829
193.. date: 2021-11-17-10-14-35
194.. nonce: 5Cf6fY
195.. section: Core and Builtins
196
197Specialize :opcode:`BINARY_SUBSCR` for classes with a ``__getitem__`` method
198implemented in Python
199
200..
201
202.. bpo: 45826
203.. date: 2021-11-17-08-05-27
204.. nonce: OERoTm
205.. section: Core and Builtins
206
207Fixed a crash when calling ``.with_traceback(None)`` on ``NameError``. This
208occurs internally in ``unittest.TestCase.assertRaises()``.
209
210..
211
212.. bpo: 45822
213.. date: 2021-11-16-19-41-04
214.. nonce: OT6ueS
215.. section: Core and Builtins
216
217Fixed a bug in the parser that was causing it to not respect :pep:`263`
218coding cookies when no flags are provided. Patch by Pablo Galindo
219
220..
221
222.. bpo: 45820
223.. date: 2021-11-16-19-00-27
224.. nonce: 2X6Psr
225.. section: Core and Builtins
226
227Fix a segfault when the parser fails without reading any input. Patch by
228Pablo Galindo
229
230..
231
232.. bpo: 45636
233.. date: 2021-11-15-13-32-54
234.. nonce: RDlTdL
235.. section: Core and Builtins
236
237Simplify the implementation of :opcode:`BINARY_OP` by indexing into an array
238of function pointers (rather than switching on the oparg).
239
240..
241
242.. bpo: 42540
243.. date: 2021-11-15-12-08-27
244.. nonce: V2w107
245.. section: Core and Builtins
246
247Fix crash when :func:`os.fork` is called with an active non-default memory
248allocator.
249
250..
251
252.. bpo: 45738
253.. date: 2021-11-14-00-14-45
254.. nonce: e0cgKd
255.. section: Core and Builtins
256
257Fix computation of error location for invalid continuation characters in the
258parser. Patch by Pablo Galindo.
259
260..
261
262.. bpo: 45636
263.. date: 2021-11-11-19-11-57
264.. nonce: 2fyIVm
265.. section: Core and Builtins
266
267Remove an existing "fast path" for old-style string formatting, since it no
268longer appears to have any measurable impact.
269
270..
271
272.. bpo: 45753
273.. date: 2021-11-11-17-14-21
274.. nonce: nEBFcC
275.. section: Core and Builtins
276
277Make recursion checks a bit more efficient by tracking amount of calls left
278before overflow.
279
280..
281
282.. bpo: 45773
283.. date: 2021-11-09-13-01-35
284.. nonce: POU8A4
285.. section: Core and Builtins
286
287Fix a compiler hang when attempting to optimize certain jump patterns.
288
289..
290
291.. bpo: 45764
292.. date: 2021-11-09-12-19-22
293.. nonce: 8RLhWL
294.. section: Core and Builtins
295
296The parser now gives a better error message when leaving out the opening
297parenthesis ``(`` after a ``def``-statement::
298
299    >>> def f:
300      File "<stdin>", line 1
301        def f:
302             ^
303    SyntaxError: expected '('
304
305..
306
307.. bpo: 45609
308.. date: 2021-10-27-21-00-49
309.. nonce: L1GKPX
310.. section: Core and Builtins
311
312Specialized the ``STORE_SUBSCR`` opcode using the PEP 659 machinery.
313
314..
315
316.. bpo: 45636
317.. date: 2021-10-27-15-14-31
318.. nonce: K2X7QS
319.. section: Core and Builtins
320
321Replace all numeric ``BINARY_*`` and ``INPLACE_*`` instructions with a
322single :opcode:`BINARY_OP` implementation.
323
324..
325
326.. bpo: 45582
327.. date: 2021-10-23-00-39-31
328.. nonce: YONPuo
329.. section: Core and Builtins
330
331Path calculation (known as ``getpath``) has been reimplemented as a frozen
332Python module. This should have no visible impact, but may affect
333calculation of all paths referenced in :mod:`sys` and :mod:`sysconfig`.
334
335..
336
337.. bpo: 45450
338.. date: 2021-10-12-18-22-44
339.. nonce: d9a-bX
340.. section: Core and Builtins
341
342Improve the syntax error message for parenthesized arguments. Patch by Pablo
343Galindo.
344
345..
346
347.. bpo: 27946
348.. date: 2021-12-04-20-08-42
349.. nonce: -Vuarf
350.. section: Library
351
352Fix possible crash when getting an attribute of
353class:`xml.etree.ElementTree.Element` simultaneously with replacing the
354``attrib`` dict.
355
356..
357
358.. bpo: 45711
359.. date: 2021-12-02-17-22-06
360.. nonce: D6jsdv
361.. section: Library
362
363Make :mod:`asyncio` normalize exceptions as soon as they are captured with
364:c:func:`PyErr_Fetch`, and before they are stored as an exc_info triplet.
365This brings :mod:`asyncio` in line with the rest of the codebase, where an
366exc_info triplet is always normalized.
367
368..
369
370.. bpo: 23819
371.. date: 2021-12-02-14-37-30
372.. nonce: An6vkT
373.. section: Library
374
375Replaced asserts with exceptions in asyncio, patch by Kumar Aditya.
376
377..
378
379.. bpo: 13236
380.. date: 2021-11-30-13-52-02
381.. nonce: FmJIkO
382.. section: Library
383
384:class:`unittest.TextTestResult` and :class:`unittest.TextTestRunner` flush
385now the output stream more often.
386
387..
388
389.. bpo: 45917
390.. date: 2021-11-28-17-24-11
391.. nonce: J5TIrd
392.. section: Library
393
394Added :func:`math.exp2`:, which returns 2 raised to the power of x.
395
396..
397
398.. bpo: 37658
399.. date: 2021-11-28-15-30-34
400.. nonce: 8Hno7d
401.. section: Library
402
403Fix issue when on certain conditions ``asyncio.wait_for()`` may allow a
404coroutine to complete successfully, but fail to return the result,
405potentially causing memory leaks or other issues.
406
407..
408
409.. bpo: 45876
410.. date: 2021-11-23-15-36-56
411.. nonce: NO8Yaj
412.. section: Library
413
414Improve the accuracy of stdev() and pstdev() in the statistics module.  When
415the inputs are floats or fractions, the output is a correctly rounded float
416
417..
418
419.. bpo: 44649
420.. date: 2021-11-21-20-50-42
421.. nonce: E8M936
422.. section: Library
423
424Handle dataclass(slots=True) with a field that has default a default value,
425but for which init=False.
426
427..
428
429.. bpo: 45803
430.. date: 2021-11-20-17-04-25
431.. nonce: wSgFOy
432.. section: Library
433
434Added missing kw_only parameter to dataclasses.make_dataclass().
435
436..
437
438.. bpo: 45837
439.. date: 2021-11-18-13-13-19
440.. nonce: aGyr1I
441.. section: Library
442
443The :meth:`turtle.RawTurtle.settiltangle` is deprecated since Python 3.1, it
444now emits a deprecation warning and will be removed in Python 3.13.
445
446Use :meth:`turtle.RawTurtle.tiltangle` instead.
447
448:meth:`turtle.RawTurtle.tiltangle` was earlier incorrectly marked as
449deprecated, its docstring has been corrected.
450
451Patch by Hugo van Kemenade.
452
453..
454
455.. bpo: 45831
456.. date: 2021-11-17-19-25-37
457.. nonce: 9-TojK
458.. section: Library
459
460:mod:`faulthandler` can now write ASCII-only strings (like filenames and
461function names) with a single write() syscall when dumping a traceback. It
462reduces the risk of getting an unreadable dump when two threads or two
463processes dump a traceback to the same file (like stderr) at the same time.
464Patch by Victor Stinner.
465
466..
467
468.. bpo: 45828
469.. date: 2021-11-17-11-40-21
470.. nonce: kQU35U
471.. section: Library
472
473:mod:`sqlite` C callbacks now use unraisable exceptions if callback
474tracebacks are enabled. Patch by Erlend E. Aasland.
475
476..
477
478.. bpo: 41735
479.. date: 2021-11-16-18-13-49
480.. nonce: D72UY1
481.. section: Library
482
483Fix thread lock in ``zlib.Decompress.flush()`` method before
484``PyObject_GetBuffer``.
485
486..
487
488.. bpo: 45235
489.. date: 2021-11-11-13-03-17
490.. nonce: 8ZbkHa
491.. section: Library
492
493Reverted an argparse bugfix that caused regression in the handling of
494default arguments for subparsers.  This prevented leaf level arguments from
495taking precedence over root level arguments.
496
497..
498
499.. bpo: 45754
500.. date: 2021-11-09-15-48-38
501.. nonce: c-JDto
502.. section: Library
503
504Fix a regression in Python 3.11a1 and 3.11a2 where :mod:`sqlite3`
505incorrectly would use ``SQLITE_LIMIT_LENGTH`` when checking SQL statement
506lengths. Now, ``SQLITE_LIMIT_SQL_LENGTH`` is used. Patch by Erlend E.
507Aasland.
508
509..
510
511.. bpo: 45766
512.. date: 2021-11-09-09-18-06
513.. nonce: dvbcMf
514.. section: Library
515
516Added *proportional* option to :meth:`statistics.linear_regression`.
517
518..
519
520.. bpo: 45765
521.. date: 2021-11-09-09-04-19
522.. nonce: JVobxK
523.. section: Library
524
525In importlib.metadata, fix distribution discovery for an empty path.
526
527..
528
529.. bpo: 45757
530.. date: 2021-11-08-23-22-14
531.. nonce: MHZHt3
532.. section: Library
533
534Fix bug where :mod:`dis` produced an incorrect oparg when
535:opcode:`EXTENDED_ARG` is followed by an opcode that does not use its
536argument.
537
538..
539
540.. bpo: 45644
541.. date: 2021-11-06-17-47-46
542.. nonce: ZMqHD_
543.. section: Library
544
545In-place JSON file formatting using ``python3 -m json.tool infile infile``
546now works correctly, previously it left the file empty.  Patch by Chris
547Wesseling.
548
549..
550
551.. bpo: 45703
552.. date: 2021-11-03-13-41-49
553.. nonce: 35AagL
554.. section: Library
555
556When a namespace package is imported before another module from the same
557namespace is created/installed in a different :data:`sys.path` location
558while the program is running, calling the
559:func:`importlib.invalidate_caches` function will now also guarantee the new
560module is noticed.
561
562..
563
564.. bpo: 45535
565.. date: 2021-10-29-16-28-06
566.. nonce: n8NiOE
567.. section: Library
568
569Improve output of ``dir()`` with Enums.
570
571..
572
573.. bpo: 45664
574.. date: 2021-10-28-23-40-54
575.. nonce: 7dqtxQ
576.. section: Library
577
578Fix :func:`types.resolve_bases` and :func:`types.new_class` for
579:class:`types.GenericAlias` instance as a base.
580
581..
582
583.. bpo: 45663
584.. date: 2021-10-28-23-11-59
585.. nonce: J90N5R
586.. section: Library
587
588Fix :func:`dataclasses.is_dataclass` for dataclasses which are subclasses of
589:class:`types.GenericAlias`.
590
591..
592
593.. bpo: 45662
594.. date: 2021-10-28-22-58-14
595.. nonce: sJd7Ir
596.. section: Library
597
598Fix the repr of :data:`dataclasses.InitVar` with a type alias to the
599built-in class, e.g. ``InitVar[list[int]]``.
600
601..
602
603.. bpo: 43137
604.. date: 2021-10-25-12-51-02
605.. nonce: apo7jY
606.. section: Library
607
608Launch GNOME web browsers via gio tool instead of obsolete gvfs-open
609
610..
611
612.. bpo: 45429
613.. date: 2021-10-25-01-22-49
614.. nonce: VaEyN9
615.. section: Library
616
617On Windows, :func:`time.sleep` now uses a waitable timer which supports
618high-resolution timers. Patch by Dong-hee Na and Eryk Sun.
619
620..
621
622.. bpo: 37295
623.. date: 2021-10-18-16-08-55
624.. nonce: wBEWH2
625.. section: Library
626
627Optimize :func:`math.comb` and :func:`math.perm`.
628
629..
630
631.. bpo: 45514
632.. date: 2021-10-18-14-25-35
633.. nonce: YmlzIl
634.. section: Library
635
636Deprecated legacy functions in :mod:`importlib.resources`.
637
638..
639
640.. bpo: 45507
641.. date: 2021-10-18-14-00-01
642.. nonce: lDotNV
643.. section: Library
644
645Add tests for truncated/missing trailers in gzip.decompress implementation.
646
647..
648
649.. bpo: 45359
650.. date: 2021-10-03-22-27-35
651.. nonce: LX_uxe
652.. section: Library
653
654Implement :pep:`585` for :class:`graphlib.TopologicalSorter`.
655
656..
657
658.. bpo: 44733
659.. date: 2021-07-26-13-33-37
660.. nonce: 88LrP1
661.. section: Library
662
663Add ``max_tasks_per_child`` to
664:class:`concurrent.futures.ProcessPoolExecutor`. This allows users to
665specify the maximum number of tasks a single process should execute before
666the process needs to be restarted.
667
668..
669
670.. bpo: 28806
671.. date: 2021-05-24-13-48-34
672.. nonce: PkNw5D
673.. section: Library
674
675Improve netrc library. netrc file no longer needs to contain all tokens. And
676if the login name is anonymous, security check is no longer need.
677
678..
679
680.. bpo: 43498
681.. date: 2021-04-20-14-14-16
682.. nonce: L_Hq-8
683.. section: Library
684
685Avoid a possible *"RuntimeError: dictionary changed size during iteration"*
686when adjusting the process count of :class:`ProcessPoolExecutor`.
687
688..
689
690.. bpo: 42158
691.. date: 2020-11-10-17-46-12
692.. nonce: OhxAiH
693.. section: Library
694
695Add MIME types for N-quads, N-triples, Notation3 and TriG to ``mimetypes``.
696
697..
698
699.. bpo: 30533
700.. date: 2020-06-16-18-00-56
701.. nonce: StL57t
702.. section: Library
703
704Add :func:`inspect.getmembers_static` , it return all members without
705triggering dynamic lookup via the descriptor protocol. Patch by Weipeng
706Hong.
707
708..
709
710.. bpo: 42238
711.. date: 2021-11-20-02-46-39
712.. nonce: hlfMIc
713.. section: Documentation
714
715``make -C Doc suspicious`` will be removed soon in favor of ``make -C Doc
716check``, mark it as deprecated.
717
718..
719
720.. bpo: 45840
721.. date: 2021-11-19-02-02-32
722.. nonce: A51B2S
723.. section: Documentation
724
725Improve cross-references in the documentation for the data model.
726
727..
728
729.. bpo: 45640
730.. date: 2021-11-18-16-44-12
731.. nonce: lSpc2A
732.. section: Documentation
733
734Properly marked-up grammar tokens in the documentation are now clickable and
735take you to the definition of a given piece of grammar.  Patch by Arthur
736Milchior.
737
738..
739
740.. bpo: 45788
741.. date: 2021-11-18-00-07-40
742.. nonce: qibUoB
743.. section: Documentation
744
745Link doc for sys.prefix to sysconfig doc on installation paths.
746
747..
748
749.. bpo: 45772
750.. date: 2021-11-09-13-10-55
751.. nonce: EdrM3t
752.. section: Documentation
753
754``socket.socket`` documentation is corrected to a class from a function.
755
756..
757
758.. bpo: 45392
759.. date: 2021-11-06-10-54-17
760.. nonce: JZnVOz
761.. section: Documentation
762
763Update the docstring of the :class:`type` built-in to remove a redundant
764line and to mention keyword arguments for the constructor.
765
766..
767
768.. bpo: 45250
769.. date: 2021-10-22-12-09-18
770.. nonce: Iit5-Y
771.. section: Documentation
772
773Update the documentation to note that CPython does not consistently require
774iterators to define ``__iter__``.
775
776..
777
778.. bpo: 25381
779.. date: 2021-06-21-17-51-51
780.. nonce: 7Kn-_H
781.. section: Documentation
782
783In the extending chapter of the extending doc, update a paragraph about the
784global variables containing exception information.
785
786..
787
788.. bpo: 43905
789.. date: 2021-05-24-05-00-12
790.. nonce: tBIndE
791.. section: Documentation
792
793Expanded :func:`~dataclasses.astuple` and :func:`~dataclasses.asdict` docs,
794warning about deepcopy being applied and providing a workaround.
795
796..
797
798.. bpo: 45695
799.. date: 2021-12-03-14-19-16
800.. nonce: QKBn2E
801.. section: Tests
802
803Out-of-tree builds with a read-only source directory are now tested by CI.
804
805..
806
807.. bpo: 19460
808.. date: 2021-11-28-15-25-02
809.. nonce: lr0aWs
810.. section: Tests
811
812Add new Test for ``Lib/email/mime/nonmultipart.py::MIMENonMultipart``.
813
814..
815
816.. bpo: 45835
817.. date: 2021-11-17-14-28-08
818.. nonce: Mgyhjx
819.. section: Tests
820
821Fix race condition in test_queue tests with multiple "feeder" threads.
822
823..
824
825.. bpo: 45783
826.. date: 2021-11-11-13-56-00
827.. nonce: 8k1Rng
828.. section: Tests
829
830The test for the freeze tool now handles file moves and deletions.
831
832..
833
834.. bpo: 45745
835.. date: 2021-11-10-12-01-28
836.. nonce: wX5B3K
837.. section: Tests
838
839Remove the ``--findleaks`` command line option of regrtest: use the
840``--fail-env-changed`` option instead. Since Python 3.7, it was a deprecated
841alias to the ``--fail-env-changed`` option.
842
843..
844
845.. bpo: 45701
846.. date: 2021-10-31-10-58-45
847.. nonce: r0LAUL
848.. section: Tests
849
850Add tests with ``tuple`` type with :func:`functools.lru_cache` to
851``test_functools``.
852
853..
854
855.. bpo: 44035
856.. date: 2021-12-06-09-31-27
857.. nonce: BiO4XC
858.. section: Build
859
860CI now verifies that autoconf files have been regenerated with a current and
861unpatched autoconf package.
862
863..
864
865.. bpo: 45950
866.. date: 2021-12-01-17-28-39
867.. nonce: eEVLoz
868.. section: Build
869
870The build system now uses a :program:`_bootstrap_python` interpreter for
871freezing and deepfreezing again. To speed up build process the build tools
872:program:`_bootstrap_python` and :program:`_freeze_module` are no longer
873build with LTO.
874
875..
876
877.. bpo: 45881
878.. date: 2021-11-29-16-32-55
879.. nonce: 7597J6
880.. section: Build
881
882The :program:`configure` script now accepts ``--with-build-python`` and
883``--with-freeze-module`` options to make cross compiling easier.
884
885..
886
887.. bpo: 40280
888.. date: 2021-11-29-14-37-29
889.. nonce: UlTMR8
890.. section: Build
891
892Emscripten platform now uses ``.wasm`` suffix by default.
893
894..
895
896.. bpo: 40280
897.. date: 2021-11-29-11-24-45
898.. nonce: Knx7d7
899.. section: Build
900
901Disable unusable core extension modules on WASM/Emscripten targets.
902
903..
904
905.. bpo: 40280
906.. date: 2021-11-26-14-09-04
907.. nonce: ZLpwQf
908.. section: Build
909
910``configure`` now checks for socket ``shutdown`` function. The check makes
911it possible to disable ``SYS_shutdown`` with ``ac_cv_func_shutdown=no`` in
912CONFIG_SITE.
913
914..
915
916.. bpo: 40280
917.. date: 2021-11-26-09-10-19
918.. nonce: xmiMJl
919.. section: Build
920
921``configure`` now checks for functions ``fork1, getegid, geteuid, getgid,
922getppid, getuid, opendir, pipe, system, wait, ttyname``.
923
924..
925
926.. bpo: 33393
927.. date: 2021-11-25-20-26-06
928.. nonce: 24YNtM
929.. section: Build
930
931Update ``config.guess`` to 2021-06-03 and ``config.sub`` to 2021-08-14.
932``Makefile`` now has an ``update-config`` target to make updating more
933convenient.
934
935..
936
937.. bpo: 45866
938.. date: 2021-11-25-13-53-36
939.. nonce: ZH1W8N
940.. section: Build
941
942``make regen-all`` now produces the same output when run from a directory
943other than the source tree: when building Python out of the source tree.
944pegen now strips directory of the "generated by pygen from <FILENAME>"
945header Patch by Victor Stinner.
946
947..
948
949.. bpo: 40280
950.. date: 2021-11-25-10-55-03
951.. nonce: E9-gsQ
952.. section: Build
953
954``configure`` now accepts machine ``wasm32`` or ``wasm64`` and OS ``wasi``
955or ``emscripten`` for cross building, e.g. ``wasm32-unknown-emscripten``,
956``wasm32-wasi``, or ``wasm32-unknown-wasi``.
957
958..
959
960.. bpo: 41498
961.. date: 2021-11-25-09-15-04
962.. nonce: qAk5eo
963.. section: Build
964
965Python now compiles on platforms without ``sigset_t``. Several functions in
966:mod:`signal` are not available when ``sigset_t`` is missing.
967
968Based on patch by Roman Yurchak for pyodide.
969
970..
971
972.. bpo: 45881
973.. date: 2021-11-24-17-14-06
974.. nonce: GTXXLk
975.. section: Build
976
977``setup.py`` now uses ``CC`` from environment first to discover multiarch
978and cross compile paths.
979
980..
981
982.. bpo: 45886
983.. date: 2021-11-23-23-37-49
984.. nonce: _Ulnh-
985.. section: Build
986
987The ``_freeze_module`` program path can now be overridden on the command
988line, e.g. ``make FREEZE_MODULE=../x86_64/Program/_freeze_module``.
989
990..
991
992.. bpo: 45873
993.. date: 2021-11-23-04-28-40
994.. nonce: 9dldZ4
995.. section: Build
996
997Get rid of the ``_bootstrap_python`` build step. The deepfreeze.py script is
998now run using ``$(PYTHON_FOR_REGEN)`` which can be Python 3.7 or newer (on
999Windows, 3.8 or newer).
1000
1001..
1002
1003.. bpo: 45847
1004.. date: 2021-11-19-17-57-57
1005.. nonce: 9phcpd
1006.. section: Build
1007
1008Port builtin hashlib extensions to ``PY_STDLIB_MOD`` macro and ``addext()``.
1009
1010..
1011
1012.. bpo: 45723
1013.. date: 2021-11-19-15-42-27
1014.. nonce: vwIJWI
1015.. section: Build
1016
1017Add ``autoconf`` helpers for saving and restoring environment variables:
1018
1019* ``SAVE_ENV``: Save ``$CFLAGS``, ``$LDFLAGS``, ``$LIBS``, and
1020  ``$CPPFLAGS``.
1021* ``RESTORE_ENV``: Restore ``$CFLAGS``, ``$LDFLAGS``, ``$LIBS``, and
1022  ``$CPPFLAGS``.
1023* ``WITH_SAVE_ENV([SCRIPT])``: Run ``SCRIPT`` wrapped with ``SAVE_ENV`` and
1024  ``RESTORE_ENV``.
1025
1026Patch by Erlend E. Aasland.
1027
1028..
1029
1030.. bpo: 45573
1031.. date: 2021-11-18-13-31-02
1032.. nonce: LCjGB8
1033.. section: Build
1034
1035Mandatory core modules, that are required to bootstrap Python, are now in
1036``Modules/Setup.bootstrap``.
1037
1038..
1039
1040.. bpo: 45573
1041.. date: 2021-11-18-12-18-43
1042.. nonce: xsMZzn
1043.. section: Build
1044
1045``configure`` now creates ``Modules/Setup.stdlib`` with conditionally
1046enabled/disabled extension module lines. The file is not used, yet.
1047
1048..
1049
1050.. bpo: 45573
1051.. date: 2021-11-17-19-02-51
1052.. nonce: GMNdun
1053.. section: Build
1054
1055``configure`` now uses a unified format to set state, compiler flags, and
1056linker flags in Makefile. The new macro ``PY_STDLIB_MOD`` sets three
1057variables that are consumed by ``Modules/Setup`` and ``setup.py``.
1058
1059..
1060
1061.. bpo: 45816
1062.. date: 2021-11-16-14-44-06
1063.. nonce: nbdmVK
1064.. section: Build
1065
1066Python now supports building with Visual Studio 2022 (MSVC v143, VS Version
106717.0). Patch by Jeremiah Vivian.
1068
1069..
1070
1071.. bpo: 45800
1072.. date: 2021-11-13-16-40-05
1073.. nonce: 5Hz6nr
1074.. section: Build
1075
1076Settings for :mod:`pyexpat` C extension are now detected by ``configure``.
1077The bundled ``expat`` library is built in ``Makefile``.
1078
1079..
1080
1081.. bpo: 45798
1082.. date: 2021-11-13-10-18-22
1083.. nonce: IraaTs
1084.. section: Build
1085
1086Settings for :mod:`decimal` internal C extension are now detected by
1087``configure``. The bundled ``libmpdec`` library is built in ``Makefile``.
1088
1089..
1090
1091.. bpo: 45723
1092.. date: 2021-11-10-16-13-02
1093.. nonce: B5gCB1
1094.. section: Build
1095
1096:program:`configure` has a new option ``--with-pkg-config`` to disable or
1097require pkg-config.
1098
1099..
1100
1101.. bpo: 45774
1102.. date: 2021-11-09-23-30-12
1103.. nonce: Mwm3ZR
1104.. section: Build
1105
1106The build dependencies for :mod:`sqlite3` are now detected by ``configure``
1107and ``pkg-config``. Patch by Erlend E. Aasland.
1108
1109..
1110
1111.. bpo: 45763
1112.. date: 2021-11-09-10-15-33
1113.. nonce: gP-vrX
1114.. section: Build
1115
1116The build dependencies for :mod:`zlib`, :mod:`bz2`, and :mod:`lzma` are now
1117detected by ``configure``.
1118
1119..
1120
1121.. bpo: 45747
1122.. date: 2021-11-08-11-31-48
1123.. nonce: AODmk_
1124.. section: Build
1125
1126gdbm and dbm build dependencies are now detected by ``configure``.
1127
1128..
1129
1130.. bpo: 45743
1131.. date: 2021-11-08-08-58-06
1132.. nonce: fZ8CTi
1133.. section: Build
1134
1135On macOS, the build system no longer passes ``search_paths_first`` to the
1136linker. The flag has been the default since Xcode 4 / macOS 10.6.
1137
1138..
1139
1140.. bpo: 45723
1141.. date: 2021-11-07-10-45-40
1142.. nonce: AreusF
1143.. section: Build
1144
1145``configure.ac`` is now compatible with autoconf 2.71. Deprecated checks
1146``STDC_HEADERS`` and ``AC_HEADER_TIME`` have been removed.
1147
1148..
1149
1150.. bpo: 45723
1151.. date: 2021-11-07-10-36-12
1152.. nonce: JNwKSG
1153.. section: Build
1154
1155``configure`` now prints a warning when pkg-config is missing.
1156
1157..
1158
1159.. bpo: 45731
1160.. date: 2021-11-05-20-56-29
1161.. nonce: 9SDnDf
1162.. section: Build
1163
1164``configure --enable-loadable-sqlite-extensions`` is now handled by new
1165``PY_SQLITE_ENABLE_LOAD_EXTENSION`` macro instead of logic in setup.py.
1166
1167..
1168
1169.. bpo: 45723
1170.. date: 2021-11-05-15-09-49
1171.. nonce: gfSxur
1172.. section: Build
1173
1174configure.ac now uses custom helper macros and ``AC_CACHE_CHECK`` to
1175simplify and speed up configure runs.
1176
1177..
1178
1179.. bpo: 45696
1180.. date: 2021-11-03-00-19-50
1181.. nonce: eKs46f
1182.. section: Build
1183
1184Skip the marshal step for frozen modules by generating C code that produces
1185a set of ready-to-use code objects. This speeds up startup time by another
118610% or more.
1187
1188..
1189
1190.. bpo: 45561
1191.. date: 2021-10-21-14-38-30
1192.. nonce: PVqhZE
1193.. section: Build
1194
1195Run smelly.py tool from $(srcdir).
1196
1197..
1198
1199.. bpo: 46105
1200.. date: 2021-12-08-16-36-20
1201.. nonce: t1mJ6Q
1202.. section: Windows
1203
1204Fixed calculation of :data:`sys.path` in a venv on Windows.
1205
1206..
1207
1208.. bpo: 45901
1209.. date: 2021-11-26-18-17-41
1210.. nonce: c5IBqM
1211.. section: Windows
1212
1213When installed through the Microsoft Store and set as the default app for
1214:file:`*.py` files, command line arguments will now be passed to Python when
1215invoking a script without explicitly launching Python (that is, ``script.py
1216args`` rather than ``python script.py args``).
1217
1218..
1219
1220.. bpo: 45616
1221.. date: 2021-11-23-11-44-42
1222.. nonce: K52PLZ
1223.. section: Windows
1224
1225Fix Python Launcher's ability to distinguish between versions 3.1 and 3.10
1226when either one is explicitly requested.  Previously, 3.1 would be used if
12273.10 was requested but not installed, and 3.10 would be used if 3.1 was
1228requested but 3.10 was installed.
1229
1230..
1231
1232.. bpo: 45850
1233.. date: 2021-11-20-00-06-59
1234.. nonce: q9lofz
1235.. section: Windows
1236
1237Implement changes to build with deep-frozen modules on Windows. Note that we
1238now require Python 3.10 as the "bootstrap" or "host" Python.
1239
1240..
1241
1242.. bpo: 45732
1243.. date: 2021-11-08-21-53-11
1244.. nonce: idl5kx
1245.. section: Windows
1246
1247Updates bundled Tcl/Tk to 8.6.12.
1248
1249..
1250
1251.. bpo: 45720
1252.. date: 2021-11-05-01-05-46
1253.. nonce: 47Nc5I
1254.. section: Windows
1255
1256Internal reference to :file:`shlwapi.dll` was dropped to help improve
1257startup time. This DLL will no longer be loaded at the start of every Python
1258process.
1259
1260..
1261
1262.. bpo: 45732
1263.. date: 2021-12-05-23-52-03
1264.. nonce: -BWrnh
1265.. section: macOS
1266
1267Update python.org macOS installer to use Tcl/Tk 8.6.12.
1268
1269..
1270
1271.. bpo: 39026
1272.. date: 2021-11-09-15-42-11
1273.. nonce: sUnYWn
1274.. section: C API
1275
1276Fix Python.h to build C extensions with Xcode: remove a relative include
1277from ``Include/cpython/pystate.h``.
1278