1.. bpo: 45716
2.. date: 2021-11-04-20-19-07
3.. nonce: 5C0pA1
4.. release date: 2021-11-05
5.. section: Core and Builtins
6
7Improve the :exc:`SyntaxError` message when using ``True``, ``None`` or
8``False`` as keywords in a function call. Patch by Pablo Galindo.
9
10..
11
12.. bpo: 45688
13.. date: 2021-11-02-09-27-46
14.. nonce: v5Der1
15.. section: Core and Builtins
16
17:data:`sys.stdlib_module_names` now contains the macOS-specific module
18:mod:`_scproxy`.
19
20..
21
22.. bpo: 45379
23.. date: 2021-10-23-13-49-00
24.. nonce: ZF7G3n
25.. section: Core and Builtins
26
27Clarify :exc:`ImportError` message when we try to explicitly import a frozen
28module but frozen modules are disabled.
29
30..
31
32.. bpo: 44525
33.. date: 2021-10-20-11-57-31
34.. nonce: veL4lJ
35.. section: Core and Builtins
36
37Specialize simple calls to Python functions (no starargs, keyowrd dict, or
38closure)
39
40..
41
42.. bpo: 45530
43.. date: 2021-10-20-01-28-26
44.. nonce: 5r7n4m
45.. section: Core and Builtins
46
47Cases of sorting using tuples as keys may now be significantly faster in
48some cases. Patch by Tim Peters.
49
50The order of the result may differ from earlier releases if the tuple
51elements don't define a total ordering (see
52:ref:`expressions-value-comparisons` for information on total ordering).
53It's generally true that the result of sorting simply isn't well-defined in
54the absence of a total ordering on list elements.
55
56..
57
58.. bpo: 45526
59.. date: 2021-10-19-10-29-47
60.. nonce: WQnvW9
61.. section: Core and Builtins
62
63In obmalloc, set ADDRESS_BITS to not ignore any bits (ignored 16 before).
64That is safer in the case that the kernel gives user-space virtual addresses
65that span a range greater than 48 bits.
66
67..
68
69.. bpo: 30570
70.. date: 2021-10-19-01-04-08
71.. nonce: _G30Ms
72.. section: Core and Builtins
73
74Fixed a crash in ``issubclass()`` from infinite recursion when searching
75pathological ``__bases__`` tuples.
76
77..
78
79.. bpo: 45521
80.. date: 2021-10-18-22-40-33
81.. nonce: GdMiuW
82.. section: Core and Builtins
83
84Fix a bug in the obmalloc radix tree code.  On 64-bit machines, the bug
85causes the tree to hold 46-bits of virtual addresses, rather than the
86intended 48-bits.
87
88..
89
90.. bpo: 45494
91.. date: 2021-10-16-17-27-48
92.. nonce: vMt1g4
93.. section: Core and Builtins
94
95Fix parser crash when reporting errors involving invalid continuation
96characters. Patch by Pablo Galindo.
97
98..
99
100.. bpo: 45445
101.. date: 2021-10-12-14-41-39
102.. nonce: _F5cMf
103.. section: Core and Builtins
104
105Python now fails to initialize if it finds an invalid :option:`-X` option in
106the command line. Patch by Pablo Galindo.
107
108..
109
110.. bpo: 45340
111.. date: 2021-10-08-09-47-38
112.. nonce: ukHgDb
113.. section: Core and Builtins
114
115Object attributes are held in an array instead of a dictionary. An object's
116dictionary are created lazily, only when needed. Reduces the memory
117consumption of a typical Python object by about 30%. Patch by Mark Shannon.
118
119..
120
121.. bpo: 45408
122.. date: 2021-10-07-21-26-44
123.. nonce: qUqzcd
124.. section: Core and Builtins
125
126Fix a crash in the parser when reporting tokenizer errors that occur at the
127same time unclosed parentheses are detected. Patch by Pablo Galindo.
128
129..
130
131.. bpo: 29410
132.. date: 2021-10-07-19-09-12
133.. nonce: bg5SYp
134.. section: Core and Builtins
135
136Add SipHash13 for string hash algorithm and use it by default.
137
138..
139
140.. bpo: 45385
141.. date: 2021-10-06-21-20-11
142.. nonce: CTUT8s
143.. section: Core and Builtins
144
145Fix reference leak from descr_check. Patch by Dong-hee Na.
146
147..
148
149.. bpo: 45367
150.. date: 2021-10-05-03-49-07
151.. nonce: _astoU
152.. section: Core and Builtins
153
154Specialized the ``BINARY_MULTIPLY`` opcode to ``BINARY_MULTIPLY_INT`` and
155``BINARY_MULTIPLY_FLOAT`` using the PEP 659 machinery.
156
157..
158
159.. bpo: 21736
160.. date: 2021-10-01-09-21-02
161.. nonce: RI47BU
162.. section: Core and Builtins
163
164Frozen stdlib modules now have ``__file__`` to the .py file they would
165otherwise be loaded from, if possible.  For packages, ``__path__`` now has
166the correct entry instead of being an empty list, which allows unfrozen
167submodules to be imported.  These are set only if the stdlib directory is
168known when the runtime is initialized.  Note that the file at ``__file__``
169is not guaranteed to exist.  None of this affects non-stdlib frozen modules
170nor, for now, frozen modules imported using
171``PyImport_ImportFrozenModule()``.  Also, at the moment ``co_filename`` is
172not updated for the module.
173
174..
175
176.. bpo: 45020
177.. date: 2021-10-01-09-06-54
178.. nonce: Cj5VQN
179.. section: Core and Builtins
180
181For frozen stdlib modules, record the original module name as
182``module.__spec__.loader_state.origname``.  If the value is different than
183``module.__spec__.name`` then the module was defined as an alias in
184Tools/scripts/freeze_modules.py.  If it is ``None`` then the module comes
185from a source file outside the stdlib.
186
187..
188
189.. bpo: 45324
190.. date: 2021-09-29-12-02-39
191.. nonce: BTQElX
192.. section: Core and Builtins
193
194In FrozenImporter.find_spec(), we now preserve the information needed in
195exec_module() to load the module.  This change mostly impacts internal
196details, rather than changing the importer's behavior.
197
198..
199
200.. bpo: 45292
201.. date: 2021-09-26-18-18-50
202.. nonce: aX5HVr
203.. section: Core and Builtins
204
205Implement :pep:`654`. Add :class:`ExceptionGroup` and
206:class:`BaseExceptionGroup`. Update traceback display code.
207
208..
209
210.. bpo: 40116
211.. date: 2021-09-23-14-00-05
212.. nonce: KaoeFs
213.. section: Core and Builtins
214
215Change to the implementation of split dictionaries. Classes where the
216instances differ either in the exact set of attributes, or in the order in
217which those attributes are set, can still share keys. This should have no
218observable effect on users of Python or the C-API. Patch by Mark Shannon.
219
220..
221
222.. bpo: 44050
223.. date: 2021-09-08-00-30-09
224.. nonce: mFI15u
225.. section: Core and Builtins
226
227Extensions that indicate they use global state (by setting ``m_size`` to -1)
228can again be used in multiple interpreters. This reverts to behavior of
229Python 3.8.
230
231..
232
233.. bpo: 44525
234.. date: 2021-06-28-22-23-59
235.. nonce: sSvUKG
236.. section: Core and Builtins
237
238Setup initial specialization infrastructure for the ``CALL_FUNCTION``
239opcode. Implemented initial specializations for C function calls:
240
241* ``CALL_FUNCTION_BUILTIN_O`` for ``METH_O`` flag.
242
243* ``CALL_FUNCTION_BUILTIN_FAST`` for ``METH_FASTCALL`` flag without keywords.
244
245* ``CALL_FUNCTION_LEN`` for ``len(o)``.
246
247* ``CALL_FUNCTION_ISINSTANCE`` for ``isinstance(o, t)``.
248
249..
250
251.. bpo: 44511
252.. date: 2021-06-26-16-55-08
253.. nonce: k8sMvV
254.. section: Core and Builtins
255
256Improve the generated bytecode for class and mapping patterns.
257
258..
259
260.. bpo: 43706
261.. date: 2021-04-03-02-44-15
262.. nonce: jjsXlT
263.. section: Core and Builtins
264
265Speed up calls to ``enumerate()`` by using the :pep:`590` ``vectorcall``
266calling convention. Patch by Dong-hee Na.
267
268..
269
270.. bpo: 45679
271.. date: 2021-10-30-21-11-37
272.. nonce: Dq8Cpu
273.. section: Library
274
275Fix caching of multi-value :data:`typing.Literal`. ``Literal[True, 2]`` is
276no longer equal to ``Literal[1, 2]``.
277
278..
279
280.. bpo: 42064
281.. date: 2021-10-27-13-28-52
282.. nonce: UK4jgV
283.. section: Library
284
285Convert :mod:`sqlite3` to multi-phase initialisation (PEP 489). Patches by
286Erlend E. Aasland.
287
288..
289
290.. bpo: 45438
291.. date: 2021-10-27-10-05-39
292.. nonce: Xz5lGU
293.. section: Library
294
295Fix typing.Signature string representation for generic builtin types.
296
297..
298
299.. bpo: 45613
300.. date: 2021-10-26-14-29-54
301.. nonce: 55Ie3c
302.. section: Library
303
304:mod:`sqlite3` now sets :attr:`sqlite3.threadsafety` based on the default
305threading mode the underlying SQLite library has been compiled with. Patch
306by Erlend E. Aasland.
307
308..
309
310.. bpo: 45574
311.. date: 2021-10-22-23-06-33
312.. nonce: svqA84
313.. section: Library
314
315Fix warning about ``print_escape`` being unused.
316
317..
318
319.. bpo: 45581
320.. date: 2021-10-22-21-57-02
321.. nonce: rlH6ay
322.. section: Library
323
324:meth:`sqlite3.connect` now correctly raises :exc:`MemoryError` if the
325underlying SQLite API signals memory error. Patch by Erlend E. Aasland.
326
327..
328
329.. bpo: 45557
330.. date: 2021-10-21-16-18-51
331.. nonce: 4MQt4r
332.. section: Library
333
334pprint.pprint() now handles underscore_numbers correctly. Previously it was
335always setting it to False.
336
337..
338
339.. bpo: 44019
340.. date: 2021-10-21-10-14-22
341.. nonce: Xk4Ncr
342.. section: Library
343
344Add :func:`operator.call` to ``operator.__all__``. Patch by Kreusada.
345
346..
347
348.. bpo: 42174
349.. date: 2021-10-19-01-30-57
350.. nonce: O2w9bi
351.. section: Library
352
353:meth:`shutil.get_terminal_size` now falls back to sane values if the column
354or line count are 0.
355
356..
357
358.. bpo: 35673
359.. date: 2021-10-18-18-12-47
360.. nonce: KOkHWe
361.. section: Library
362
363Improve the introspectability of the ``__loader__`` attribute for namespace
364packages.  :class:`importlib.machinery.NamespaceLoader` is now public, and
365implements the :class:`importlib.abc.InspectLoader` interface.
366``_NamespaceLoader`` is kept for backward compatibility.
367
368..
369
370.. bpo: 45515
371.. date: 2021-10-18-14-52-48
372.. nonce: aXdvm_
373.. section: Library
374
375Add references to :mod:`zoneinfo` in the :mod:`datetime` documentation,
376mostly replacing outdated references to ``dateutil.tz``. Change by Paul
377Ganssle.
378
379..
380
381.. bpo: 45475
382.. date: 2021-10-18-10-46-47
383.. nonce: sb9KDF
384.. section: Library
385
386Reverted optimization of iterating :class:`gzip.GzipFile`,
387:class:`bz2.BZ2File`, and :class:`lzma.LZMAFile` (see bpo-43787) because it
388caused regression when user iterate them without having reference of them.
389Patch by Inada Naoki.
390
391..
392
393.. bpo: 45489
394.. date: 2021-10-16-23-46-39
395.. nonce: QB0rhG
396.. section: Library
397
398Update :class:`~typing.ForwardRef` to support ``|`` operator. Patch by
399Dong-hee Na.
400
401..
402
403.. bpo: 42222
404.. date: 2021-10-15-11-30-11
405.. nonce: hdHyac
406.. section: Library
407
408Removed deprecated support for float arguments in *randrange()*.
409
410..
411
412.. bpo: 45428
413.. date: 2021-10-14-18-04-17
414.. nonce: mM2War
415.. section: Library
416
417Fix a regression in py_compile when reading filenames from standard input.
418
419..
420
421.. bpo: 45467
422.. date: 2021-10-14-13-31-19
423.. nonce: Q7Ma6A
424.. section: Library
425
426Fix incremental decoder and stream reader in the "raw-unicode-escape" codec.
427Previously they failed if the escape sequence was split.
428
429..
430
431.. bpo: 45461
432.. date: 2021-10-14-00-19-02
433.. nonce: 4LB_tJ
434.. section: Library
435
436Fix incremental decoder and stream reader in the "unicode-escape" codec.
437Previously they failed if the escape sequence was split.
438
439..
440
441.. bpo: 45239
442.. date: 2021-10-13-17-52-48
443.. nonce: 7li1_0
444.. section: Library
445
446Fixed :func:`email.utils.parsedate_tz` crashing with
447:exc:`UnboundLocalError` on certain invalid input instead of returning
448``None``. Patch by Ben Hoyt.
449
450..
451
452.. bpo: 45417
453.. date: 2021-10-12-20-35-06
454.. nonce: gQM-O7
455.. section: Library
456
457Fix quadratic behaviour in the enum module: Creation of enum classes with a
458lot of entries was quadratic.
459
460..
461
462.. bpo: 45249
463.. date: 2021-10-10-16-14-33
464.. nonce: xqLliz
465.. section: Library
466
467Fix the behaviour of :func:`traceback.print_exc` when displaying the caret
468when the ``end_offset`` in the exception is set to 0. Patch by Pablo Galindo
469
470..
471
472.. bpo: 45416
473.. date: 2021-10-10-09-42-34
474.. nonce: n35O0_
475.. section: Library
476
477Fix use of :class:`asyncio.Condition` with explicit :class:`asyncio.Lock`
478objects, which was a regression due to removal of explicit loop arguments.
479Patch by Joongi Kim.
480
481..
482
483.. bpo: 20028
484.. date: 2021-10-10-00-25-36
485.. nonce: bPx4Z8
486.. section: Library
487
488Empty escapechar/quotechar is not allowed when initializing
489:class:`csv.Dialect`. Patch by Vajrasky Kok and Dong-hee Na.
490
491..
492
493.. bpo: 44904
494.. date: 2021-10-09-18-42-27
495.. nonce: RlW5h8
496.. section: Library
497
498Fix bug in the :mod:`doctest` module that caused it to fail if a docstring
499included an example with a ``classmethod`` ``property``. Patch by Alex
500Waygood.
501
502..
503
504.. bpo: 45406
505.. date: 2021-10-08-19-24-48
506.. nonce: Qh_Mz4
507.. section: Library
508
509Make :func:`inspect.getmodule` catch ``FileNotFoundError`` raised by
510:'func:`inspect.getabsfile`, and return ``None`` to indicate that the module
511could not be determined.
512
513..
514
515.. bpo: 45411
516.. date: 2021-10-08-11-29-29
517.. nonce: 4jR--U
518.. section: Library
519
520Add extensions for files containing subtitles - .srt & .vtt - to the
521mimetypes.py module.
522
523..
524
525.. bpo: 10716
526.. date: 2021-10-08-04-11-55
527.. nonce: QSRVK2
528.. section: Library
529
530Migrated pydoc to HTML5 (without changing the look of it). Side effect is to
531update xmlrpc's ``ServerHTMLDoc`` which now uses the CSS too. cgitb now
532relies less on pydoc (as it can't use the CSS file).
533
534..
535
536.. bpo: 27580
537.. date: 2021-10-07-21-11-48
538.. nonce: tGcBTH
539.. section: Library
540
541Add support of null characters in :mod:`csv`.
542
543..
544
545.. bpo: 45262
546.. date: 2021-10-07-14-04-10
547.. nonce: HqF71Z
548.. section: Library
549
550Prevent use-after-free in asyncio. Make sure the cached running loop holder
551gets cleared on dealloc to prevent use-after-free in get_running_loop
552
553..
554
555.. bpo: 45386
556.. date: 2021-10-07-00-05-05
557.. nonce: q9ORpA
558.. section: Library
559
560Make :mod:`xmlrpc.client` more robust to C runtimes where the underlying C
561``strftime`` function results in a ``ValueError`` when testing for year
562formatting options.
563
564..
565
566.. bpo: 20028
567.. date: 2021-10-03-21-14-37
568.. nonce: zBA4RK
569.. section: Library
570
571Improve error message of :class:`csv.Dialect` when initializing. Patch by
572Vajrasky Kok and Dong-hee Na.
573
574..
575
576.. bpo: 45343
577.. date: 2021-10-01-23-07-02
578.. nonce: ixmctD
579.. section: Library
580
581Update bundled pip to 21.2.4 and setuptools to 58.1.0
582
583..
584
585.. bpo: 45328
586.. date: 2021-09-30-08-22-44
587.. nonce: 8Z-Q0B
588.. section: Library
589
590Fixed :class:`http.client.HTTPConnection` to work properly in OSs that don't
591support the ``TCP_NODELAY`` socket option.
592
593..
594
595.. bpo: 45243
596.. date: 2021-09-20-01-25-09
597.. nonce: 0pJf0U
598.. section: Library
599
600Add :meth:`~sqlite3.Connection.setlimit` and
601:meth:`~sqlite3.Connection.getlimit` to :class:`sqlite3.Connection` for
602setting and getting SQLite limits by connection basis. Patch by Erlend E.
603Aasland.
604
605..
606
607.. bpo: 45320
608.. date: 2021-09-15-10-21-10
609.. nonce: 4qaf5x
610.. section: Library
611
612Removed from the :mod:`inspect` module:
613
614* the ``getargspec`` function, deprecated since Python 3.0;
615    use :func:`inspect.signature` or :func:`inspect.getfullargspec` instead.
616
617* the ``formatargspec`` function, deprecated since Python 3.5;
618  use the :func:`inspect.signature` function and :class:`Signature` object
619  directly.
620
621* the undocumented ``Signature.from_callable`` and ``Signature.from_function``
622  functions, deprecated since Python 3.5; use the
623  :meth:`Signature.from_callable() <inspect.Signature.from_callable>` method
624  instead.
625
626Patch by Hugo van Kemenade.
627
628..
629
630.. bpo: 45192
631.. date: 2021-09-14-15-52-47
632.. nonce: DjA-BI
633.. section: Library
634
635Fix the ``tempfile._infer_return_type`` function so that the ``dir``
636argument of the :mod:`tempfile` functions accepts an object implementing the
637``os.PathLike`` protocol.
638
639Patch by Kyungmin Lee.
640
641..
642
643.. bpo: 45160
644.. date: 2021-09-11-14-47-05
645.. nonce: VzMXbW
646.. section: Library
647
648When tracing a tkinter variable used by a ttk OptionMenu, callbacks are no
649longer made twice.
650
651..
652
653.. bpo: 25625
654.. date: 2021-09-10-12-53-28
655.. nonce: SzcBCw
656.. section: Library
657
658Added non parallel-safe :func:`~contextlib.chdir` context manager to change
659the current working directory and then restore it on exit. Simple wrapper
660around :func:`~os.chdir`.
661
662..
663
664.. bpo: 24139
665.. date: 2021-08-30-23-10-48
666.. nonce: e38czf
667.. section: Library
668
669Add support for SQLite extended result codes in :exc:`sqlite3.Error`. Patch
670by Erlend E. Aasland.
671
672..
673
674.. bpo: 24444
675.. date: 2021-08-30-00-19-23
676.. nonce: Ki4bgz
677.. section: Library
678
679Fixed an error raised in :mod:`argparse` help display when help for an
680option is set to 1+ blank spaces or when *choices* arg is an empty
681container.
682
683..
684
685.. bpo: 44547
686.. date: 2021-08-20-10-52-40
687.. nonce: eu0iJq
688.. section: Library
689
690Implement ``Fraction.__int__``, so that a :class:`fractions.Fraction`
691instance ``f`` passes an ``isinstance(f, typing.SupportsInt)`` check.
692
693..
694
695.. bpo: 40321
696.. date: 2021-07-22-21-25-56
697.. nonce: gBlFmw
698.. section: Library
699
700Adds support for HTTP 308 redirects to :mod:`urllib`. See :rfc:`7538` for
701details. Patch by Jochem Schulenklopper.
702
703..
704
705.. bpo: 41374
706.. date: 2020-07-27-19-21-05
707.. nonce: cd-kFL
708.. section: Library
709
710Ensure that ``socket.TCP_*`` constants are exposed on Cygwin 3.1.6 and
711greater.
712
713..
714
715.. bpo: 35970
716.. date: 2019-02-11-19-06-10
717.. nonce: ZRvh51
718.. section: Library
719
720Add help flag to the base64 module's command line interface. Patch
721contributed by Robert Kuska.
722
723..
724
725.. bpo: 45726
726.. date: 2021-11-05-12-15-24
727.. nonce: GwRr7e
728.. section: Documentation
729
730Improve documentation for :func:`functools.singledispatch` and
731:class:`functools.singledispatchmethod`.
732
733..
734
735.. bpo: 45680
736.. date: 2021-11-03-14-51-03
737.. nonce: 9_NTFU
738.. section: Documentation
739
740Amend the docs on ``GenericAlias`` objects to clarify that non-container
741classes can also implement ``__class_getitem__``. Patch contributed by Alex
742Waygood.
743
744..
745
746.. bpo: 45618
747.. date: 2021-10-31-20-35-06
748.. nonce: RTcNXF
749.. section: Documentation
750
751Update Sphinx version used to build the documentation to 4.2.0. Patch by
752Maciej Olko.
753
754..
755
756.. bpo: 45655
757.. date: 2021-10-28-19-22-55
758.. nonce: aPYGaS
759.. section: Documentation
760
761Add a new "relevant PEPs" section to the top of the documentation for the
762``typing`` module. Patch by Alex Waygood.
763
764..
765
766.. bpo: 45604
767.. date: 2021-10-26-10-00-45
768.. nonce: Dm-YhV
769.. section: Documentation
770
771Add ``level`` argument to ``multiprocessing.log_to_stderr`` function docs.
772
773..
774
775.. bpo: 45516
776.. date: 2021-10-22-21-57-42
777.. nonce: 7_RMEX
778.. section: Documentation
779
780Add protocol description to the :class:`importlib.abc.TraversableResources`
781documentation.
782
783..
784
785.. bpo: 45464
786.. date: 2021-10-20-16-26-53
787.. nonce: mOISBs
788.. section: Documentation
789
790Mention in the documentation of :ref:`Built-in Exceptions
791<bltin-exceptions>` that inheriting from multiple exception types in a
792single subclass is not recommended due to possible memory layout
793incompatibility.
794
795..
796
797.. bpo: 45449
798.. date: 2021-10-19-01-41-40
799.. nonce: fjHZJc
800.. section: Documentation
801
802Add note about :pep:`585` in :mod:`collections.abc`.
803
804..
805
806.. bpo: 45516
807.. date: 2021-10-18-20-12-18
808.. nonce: EJh4K8
809.. section: Documentation
810
811Add protocol description to the :class:`importlib.abc.Traversable`
812documentation.
813
814..
815
816.. bpo: 20692
817.. date: 2021-10-13-00-42-54
818.. nonce: K5rGtP
819.. section: Documentation
820
821Add Programming FAQ entry explaining that int literal attribute access
822requires either a space after or parentheses around the literal.
823
824..
825
826.. bpo: 45678
827.. date: 2021-11-04-20-03-32
828.. nonce: 1xNMjN
829.. section: Tests
830
831Add tests for scenarios in which :class:`functools.singledispatchmethod` is
832stacked on top of a method that has already been wrapped by two other
833decorators. Patch by Alex Waygood.
834
835..
836
837.. bpo: 45578
838.. date: 2021-10-30-19-00-25
839.. nonce: bvu6X2
840.. section: Tests
841
842Add tests for :func:`dis.distb`
843
844..
845
846.. bpo: 45678
847.. date: 2021-10-30-13-12-20
848.. nonce: bKrYeS
849.. section: Tests
850
851Add tests to ensure that ``functools.singledispatchmethod`` correctly wraps
852the attributes of the target function.
853
854..
855
856.. bpo: 45668
857.. date: 2021-10-29-17-18-56
858.. nonce: MfAw4i
859.. section: Tests
860
861PGO tests now pass when Python is built without test extension modules.
862
863..
864
865.. bpo: 45577
866.. date: 2021-10-22-19-44-13
867.. nonce: dSaNvK
868.. section: Tests
869
870Add subtests for all ``pickle`` protocols in ``test_zoneinfo``.
871
872..
873
874.. bpo: 45566
875.. date: 2021-10-22-12-05-21
876.. nonce: 2gQ3ZB
877.. section: Tests
878
879Fix ``test_frozen_pickle`` in ``test_dataclasses`` to check all ``pickle``
880versions.
881
882..
883
884.. bpo: 43592
885.. date: 2021-10-21-17-22-26
886.. nonce: kHRsra
887.. section: Tests
888
889:mod:`test.libregrtest` now raises the soft resource limit for the maximum
890number of file descriptors when the default is too low for our test suite as
891was often the case on macOS.
892
893..
894
895.. bpo: 39679
896.. date: 2021-10-18-16-18-41
897.. nonce: F18qcE
898.. section: Tests
899
900Add more test cases for `@functools.singledispatchmethod` when combined with
901`@classmethod` or `@staticmethod`.
902
903..
904
905.. bpo: 45410
906.. date: 2021-10-08-14-03-20
907.. nonce: Ex9xe2
908.. section: Tests
909
910When libregrtest spawns a worker process, stderr is now written into stdout
911to keep messages order. Use a single pipe for stdout and stderr, rather than
912two pipes. Previously, messages were out of order which made analysis of
913buildbot logs harder Patch by Victor Stinner.
914
915..
916
917.. bpo: 45402
918.. date: 2021-10-07-13-43-01
919.. nonce: jlQvep
920.. section: Tests
921
922Fix test_tools.test_sundry() when Python is built out of tree: fix how the
923freeze_modules.py tool locates the _freeze_module program. Patch by Victor
924Stinner.
925
926..
927
928.. bpo: 45403
929.. date: 2021-10-07-13-27-12
930.. nonce: 7QiDvw
931.. section: Tests
932
933Fix test_sys.test_stdlib_dir() when Python is built outside the source tree:
934compare normalized paths. Patch by Victor Stinner.
935
936..
937
938.. bpo: 45400
939.. date: 2021-10-07-13-11-45
940.. nonce: h3iT7V
941.. section: Tests
942
943Fix test_name_error_suggestions_do_not_trigger_for_too_many_locals() of
944test_exceptions if a directory name contains "a1" (like "Python-3.11.0a1"):
945use a stricter regular expression. Patch by Victor Stinner.
946
947..
948
949.. bpo: 10572
950.. date: 2021-01-07-01-25-38
951.. nonce: gEEZ9z
952.. section: Tests
953
954Rename :mod:`sqlite3` tests from ``test_sqlite`` to ``test_sqlite3``, and
955relocate them to ``Lib/test/test_sqlite3``. Patch by Erlend E. Aasland.
956
957..
958
959.. bpo: 43158
960.. date: 2021-11-01-12-51-46
961.. nonce: fghS6w
962.. section: Build
963
964``setup.py`` now uses values from configure script to build the ``_uuid``
965extension module. Configure now detects util-linux's ``libuuid``, too.
966
967..
968
969.. bpo: 45666
970.. date: 2021-10-29-12-54-53
971.. nonce: w2G63u
972.. section: Build
973
974Fix warning of ``swprintf`` and ``%s`` usage in ``_testembed.c``
975
976..
977
978.. bpo: 45548
979.. date: 2021-10-28-14-47-22
980.. nonce: mdCBxB
981.. section: Build
982
983``Modules/Setup`` and ``Modules/makesetup`` have been improved. The
984``Setup`` file now contains working rules for all extensions. Outdated
985comments have been removed. Rules defined by ``makesetup`` track
986dependencies correctly.
987
988..
989
990.. bpo: 45548
991.. date: 2021-10-24-21-49-49
992.. nonce: UWx0UC
993.. section: Build
994
995The :mod:`math` and :mod:`cmath` implementation now require a C99 compatible
996``libm`` and no longer ship with workarounds for missing acosh, asinh,
997atanh, expm1, and log1p functions.
998
999..
1000
1001.. bpo: 45595
1002.. date: 2021-10-24-11-02-43
1003.. nonce: WI_5YU
1004.. section: Build
1005
1006``setup.py`` and ``makesetup`` now track build dependencies on all Python
1007header files and module specific header files.
1008
1009..
1010
1011.. bpo: 45571
1012.. date: 2021-10-22-15-28-29
1013.. nonce: yY8NsJ
1014.. section: Build
1015
1016``Modules/Setup`` now use ``PY_CFLAGS_NODIST`` instead of ``PY_CFLAGS`` to
1017compile shared modules.
1018
1019..
1020
1021.. bpo: 45570
1022.. date: 2021-10-22-14-45-40
1023.. nonce: 61gM2A
1024.. section: Build
1025
1026:mod:`pyexpat` and :mod:`_elementtree` no longer define obsolete macros
1027``HAVE_EXPAT_CONFIG_H`` and ``USE_PYEXPAT_CAPI``. ``XML_POOR_ENTROPY`` is
1028now defined in ``expat_config.h``.
1029
1030..
1031
1032.. bpo: 43974
1033.. date: 2021-10-22-14-00-44
1034.. nonce: HHZtbx
1035.. section: Build
1036
1037``setup.py`` no longer defines ``Py_BUILD_CORE_MODULE``. Instead every
1038module, that uses the internal API, defines the macro.
1039
1040..
1041
1042.. bpo: 45548
1043.. date: 2021-10-20-17-02-56
1044.. nonce: BoggEf
1045.. section: Build
1046
1047Fill in missing entries in Modules/Setup.
1048
1049..
1050
1051.. bpo: 45532
1052.. date: 2021-10-20-16-07-39
1053.. nonce: kyhvis
1054.. section: Build
1055
1056Update :data:`sys.version` to use ``main`` as fallback information. Patch by
1057Jeong YunWon.
1058
1059..
1060
1061.. bpo: 45536
1062.. date: 2021-10-20-12-42-39
1063.. nonce: oQNYHB
1064.. section: Build
1065
1066The ``configure`` script now checks whether OpenSSL headers and libraries
1067provide required APIs. Most common APIs are verified. The check detects
1068outdated or missing OpenSSL. Failures do not stop configure.
1069
1070..
1071
1072.. bpo: 45221
1073.. date: 2021-10-18-10-25-56
1074.. nonce: rnulhf
1075.. section: Build
1076
1077Fixed regression in handling of ``LDFLAGS`` and ``CPPFLAGS`` options where
1078:meth:`argparse.parse_known_args` could interpret an option as one of the
1079built-in command line argument, for example ``-h`` for help.
1080
1081..
1082
1083.. bpo: 45440
1084.. date: 2021-10-12-02-13-08
1085.. nonce: -zYgDb
1086.. section: Build
1087
1088Building Python now requires a C99 ``<math.h>`` header file providing the
1089following functions: ``copysign()``, ``hypot()``, ``isfinite()``,
1090``isinf()``, ``isnan()``, ``round()``. Patch by Victor Stinner.
1091
1092..
1093
1094.. bpo: 45405
1095.. date: 2021-10-11-16-27-38
1096.. nonce: iSfdW5
1097.. section: Build
1098
1099Prevent ``internal configure error`` when running ``configure`` with recent
1100versions of non-Apple clang.  Patch by David Bohman.
1101
1102..
1103
1104.. bpo: 45433
1105.. date: 2021-10-11-16-08-37
1106.. nonce: pVDkMV
1107.. section: Build
1108
1109Avoid linking libpython with libcrypt.
1110
1111..
1112
1113.. bpo: 43652
1114.. date: 2021-11-04-00-41-50
1115.. nonce: RnqV7I
1116.. section: Windows
1117
1118Update Tcl/Tk to 8.6.11, actually this time. The previous update incorrectly
1119included 8.6.10.
1120
1121..
1122
1123.. bpo: 45337
1124.. date: 2021-09-30-23-17-27
1125.. nonce: qg7U_h
1126.. section: Windows
1127
1128venv now warns when the created environment may need to be accessed at a
1129different path, due to redirections, links or junctions. It also now
1130correctly installs or upgrades components when the alternate path is
1131required.
1132
1133..
1134
1135.. bpo: 43851
1136.. date: 2021-04-15-01-23-10
1137.. nonce: qgU0gy
1138.. section: Windows
1139
1140Build SQLite ``SQLITE_OMIT_AUTOINIT`` on Windows. Patch by Erlend E.
1141Aasland.
1142
1143..
1144
1145.. bpo: 44828
1146.. date: 2021-10-25-02-02-21
1147.. nonce: XBdXlJ
1148.. section: macOS
1149
1150Avoid tkinter file dialog failure on macOS 12 Monterey when using the Tk
11518.6.11 provided by python.org macOS installers. Patch by Marc Culler of the
1152Tk project.
1153
1154..
1155
1156.. bpo: 45495
1157.. date: 2021-10-16-17-20-32
1158.. nonce: ST8RFt
1159.. section: IDLE
1160
1161Add context keywords 'case' and 'match' to completions list.
1162
1163..
1164
1165.. bpo: 29103
1166.. date: 2021-10-20-18-41-17
1167.. nonce: CMRLyq
1168.. section: C API
1169
1170:c:func:`PyType_FromSpec* <PyType_FromModuleAndSpec>` now copies the class
1171name from the spec to a buffer owned by the class, so the original can be
1172safely deallocated. Patch by Petr Viktorin.
1173
1174..
1175
1176.. bpo: 45522
1177.. date: 2021-10-19-13-07-46
1178.. nonce: kGAwmZ
1179.. section: C API
1180
1181The internal freelists for frame, float, list, dict, async generators, and
1182context objects can now be disabled.
1183
1184..
1185
1186.. bpo: 35134
1187.. date: 2021-10-19-00-20-40
1188.. nonce: Z0Zk_m
1189.. section: C API
1190
1191Exclude :c:func:`PyWeakref_GET_OBJECT` from the limited C API. It never
1192worked since the :c:type:`PyWeakReference` structure is opaque in the
1193limited C API.
1194
1195..
1196
1197.. bpo: 35081
1198.. date: 2021-10-15-09-29-59
1199.. nonce: 2teFD3
1200.. section: C API
1201
1202Move the ``interpreteridobject.h`` header file from ``Include/`` to
1203``Include/internal/``. It only provides private functions. Patch by Victor
1204Stinner.
1205
1206..
1207
1208.. bpo: 35134
1209.. date: 2021-10-15-00-11-51
1210.. nonce: eX4zqy
1211.. section: C API
1212
1213The non-limited API files ``cellobject.h``, ``classobject.h``,
1214``context.h``, ``funcobject.h``, ``genobject.h`` and ``longintrepr.h`` have
1215been moved to the ``Include/cpython`` directory. Moreover, the ``eval.h``
1216header file was removed. These files must not be included directly, as they
1217are already included in ``Python.h``: :ref:`Include Files <api-includes>`.
1218If they have been included directly, consider including ``Python.h``
1219instead. Patch by Victor Stinner.
1220
1221..
1222
1223.. bpo: 45474
1224.. date: 2021-10-14-22-16-56
1225.. nonce: 1OkJQh
1226.. section: C API
1227
1228The following items are no longer available when ``Py_LIMITED_API`` is
1229defined:
1230
1231* :c:func:`PyMarshal_WriteLongToFile`
1232* :c:func:`PyMarshal_WriteObjectToFile`
1233* :c:func:`PyMarshal_ReadObjectFromString`
1234* :c:func:`PyMarshal_WriteObjectToString`
1235* the ``Py_MARSHAL_VERSION`` macro
1236
1237These are not part of the :ref:`limited API <stable-abi-list>`.
1238
1239Patch by Victor Stinner.
1240
1241..
1242
1243.. bpo: 45434
1244.. date: 2021-10-13-14-42-46
1245.. nonce: INNEEt
1246.. section: C API
1247
1248Remove the ``pystrhex.h`` header file. It only contains private functions. C
1249extensions should only include the main ``<Python.h>`` header file. Patch by
1250Victor Stinner.
1251
1252..
1253
1254.. bpo: 45440
1255.. date: 2021-10-12-02-13-41
1256.. nonce: Gf94rE
1257.. section: C API
1258
1259Remove the ``Py_FORCE_DOUBLE()`` macro. It was used by the
1260``Py_IS_INFINITY()`` macro. Patch by Victor Stinner.
1261
1262..
1263
1264.. bpo: 45434
1265.. date: 2021-10-11-23-03-49
1266.. nonce: tsS8I_
1267.. section: C API
1268
1269``<Python.h>`` no longer includes the header files ``<stdlib.h>``,
1270``<stdio.h>``, ``<errno.h>`` and ``<string.h>`` when the ``Py_LIMITED_API``
1271macro is set to ``0x030b0000`` (Python 3.11) or higher. C extensions should
1272explicitly include the header files after ``#include <Python.h>``. Patch by
1273Victor Stinner.
1274
1275..
1276
1277.. bpo: 41123
1278.. date: 2021-10-11-22-58-33
1279.. nonce: myrlIp
1280.. section: C API
1281
1282Remove ``Py_UNICODE_COPY()`` and ``Py_UNICODE_FILL()`` macros, deprecated
1283since Python 3.3. Use ``PyUnicode_CopyCharacters()`` or ``memcpy()``
1284(``wchar_t*`` string), and ``PyUnicode_Fill()`` functions instead. Patch by
1285Victor Stinner.
1286
1287..
1288
1289.. bpo: 45412
1290.. date: 2021-10-08-15-54-07
1291.. nonce: KHyJCT
1292.. section: C API
1293
1294Remove the following math macros using the ``errno`` variable:
1295
1296* ``Py_ADJUST_ERANGE1()``
1297* ``Py_ADJUST_ERANGE2()``
1298* ``Py_OVERFLOWED()``
1299* ``Py_SET_ERANGE_IF_OVERFLOW()``
1300* ``Py_SET_ERRNO_ON_MATH_ERROR()``
1301
1302Patch by Victor Stinner.
1303
1304..
1305
1306.. bpo: 45395
1307.. date: 2021-10-06-15-54-40
1308.. nonce: yVhdAl
1309.. section: C API
1310
1311Custom frozen modules (the array set to ``PyImport_FrozenModules``) are now
1312treated as additions, rather than replacing all the default frozen modules.
1313Frozen stdlib modules can still be disabled by setting the "code" field of
1314the custom array entry to NULL.
1315
1316..
1317
1318.. bpo: 43760
1319.. date: 2021-09-24-11-12-21
1320.. nonce: Bfxd1-
1321.. section: C API
1322
1323Add new :c:func:`PyThreadState_EnterTracing`, and
1324:c:func:`PyThreadState_LeaveTracing` functions to the limited C API to
1325suspend and resume tracing and profiling. Patch by Victor Stinner.
1326
1327..
1328
1329.. bpo: 44220
1330.. date: 2021-05-24-22-12-40
1331.. nonce: H9CUGl
1332.. section: C API
1333
1334:c:var:`PyStructSequence_UnnamedField` is added to the Stable ABI.
1335