summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d/3.9.0a4.rst
blob: ca0eb2abf1d654594874298f1ef228744711f641 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
.. bpo: 39184
.. date: 2020-02-07-23-54-18
.. nonce: v-ue-v
.. release date: 2020-02-25
.. section: Security

Add audit events to functions in ``fcntl``, ``msvcrt``, ``os``, ``resource``,
``shutil``, ``signal`` and ``syslog``.

..

.. bpo: 39401
.. date: 2020-01-28-20-54-09
.. nonce: he7h_A
.. section: Security

Avoid unsafe DLL load at startup on Windows 7 and earlier.

..

.. bpo: 39184
.. date: 2020-01-07-00-42-08
.. nonce: fe7NgK
.. section: Security

Add audit events to command execution functions in os and pty modules.

..

.. bpo: 39382
.. date: 2020-02-18-01-40-13
.. nonce: OLSJu9
.. section: Core and Builtins

Fix a use-after-free in the single inheritance path of ``issubclass()``,
when the ``__bases__`` of an object has a single reference, and so does its
first item. Patch by Yonatan Goldschmidt.

..

.. bpo: 39573
.. date: 2020-02-14-10-08-53
.. nonce: BIIX2M
.. section: Core and Builtins

Update clinic tool to use :c:func:`Py_IS_TYPE`. Patch by Donghee Na.

..

.. bpo: 39619
.. date: 2020-02-13-07-35-00
.. nonce: inb_master_chroot
.. section: Core and Builtins

Enable use of :func:`os.chroot` on HP-UX systems.

..

.. bpo: 39573
.. date: 2020-02-13-01-30-22
.. nonce: uTFj1m
.. section: Core and Builtins

Add :c:func:`Py_IS_TYPE` static inline function to check whether the object
*o* type is *type*.

..

.. bpo: 39606
.. date: 2020-02-11-23-59-07
.. nonce: a72Sxc
.. section: Core and Builtins

Fix regression caused by fix for bpo-39386, that prevented calling
``aclose`` on an async generator that had already been closed or exhausted.

..

.. bpo: 39579
.. date: 2020-02-07-15-18-35
.. nonce: itNmC0
.. section: Core and Builtins

Change the ending column offset of ``Attribute`` nodes constructed in
``ast_for_dotted_name`` to point at the end of the current node and not at the
end of the last ``NAME`` node.

..

.. bpo: 1635741
.. date: 2020-02-07-12-57-40
.. nonce: ySW6gq
.. section: Core and Builtins

Port _crypt extension module to multiphase initialization (:pep:`489`).

..

.. bpo: 1635741
.. date: 2020-02-06-09-00-35
.. nonce: oaxe1j
.. section: Core and Builtins

Port _contextvars extension module to multiphase initialization
(:pep:`489`).

..

.. bpo: 39510
.. date: 2020-02-04-10-27-41
.. nonce: PMIh-f
.. section: Core and Builtins

Fix segfault in ``readinto()`` method on closed BufferedReader.

..

.. bpo: 39502
.. date: 2020-01-30-14-36-31
.. nonce: IJu0rl
.. section: Core and Builtins

Fix :func:`time.localtime` on 64-bit AIX  to support years before 1902 and
after 2038. Patch by M Felt.

..

.. bpo: 39492
.. date: 2020-01-30-01-14-42
.. nonce: eTuy0F
.. section: Core and Builtins

Fix a reference cycle in the C Pickler that was preventing the garbage
collection of deleted, pickled objects.

..

.. bpo: 39453
.. date: 2020-01-25-23-51-17
.. nonce: xCOkYk
.. section: Core and Builtins

Fixed a possible crash in :meth:`list.__contains__` when a list is changed
during comparing items. Patch by Donghee Na.

..

.. bpo: 39434
.. date: 2020-01-24-01-07-04
.. nonce: S5ehj9
.. section: Core and Builtins

:term:`floor division` of float operation now has a better performance. Also
the message of :exc:`ZeroDivisionError` for this operation is updated. Patch
by Donghee Na.

..

.. bpo: 1635741
.. date: 2020-01-19-11-06-30
.. nonce: 0mjsfm
.. section: Core and Builtins

Port _codecs extension module to multiphase initialization (:pep:`489`).

..

.. bpo: 1635741
.. date: 2020-01-18-11-06-28
.. nonce: OKROOt
.. section: Core and Builtins

Port _bz2 extension module to multiphase initialization (:pep:`489`).

..

.. bpo: 1635741
.. date: 2020-01-16-12-00-04
.. nonce: fuqoBG
.. section: Core and Builtins

Port _abc extension module to multiphase initialization (:pep:`489`).

..

.. bpo: 39320
.. date: 2020-01-15-15-50-22
.. nonce: oWARyk
.. section: Core and Builtins

Replace two complex bytecodes for building dicts with two simpler ones. The
new bytecodes ``DICT_MERGE`` and ``DICT_UPDATE`` have been added The old
bytecodes ``BUILD_MAP_UNPACK`` and ``BUILD_MAP_UNPACK_WITH_CALL`` have been
removed.

..

.. bpo: 39219
.. date: 2020-01-05-13-36-08
.. nonce: uHtKd4
.. section: Core and Builtins

Syntax errors raised in the tokenizer now always set correct "text" and
"offset" attributes.

..

.. bpo: 36051
.. date: 2019-12-30-15-56-07
.. nonce: imaVlq
.. section: Core and Builtins

Drop the GIL during large ``bytes.join`` operations. Patch by Bruce Merry.

..

.. bpo: 38960
.. date: 2019-12-03-16-41-22
.. nonce: kvoFM0
.. section: Core and Builtins

Fix DTrace build issues on FreeBSD. Patch by David Carlier.

..

.. bpo: 37207
.. date: 2019-06-09-10-54-31
.. nonce: bLjgLR
.. section: Core and Builtins

Speed up calls to ``range()`` by about 30%, by using the PEP 590
``vectorcall`` calling convention. Patch by Mark Shannon.

..

.. bpo: 36144
.. date: 2019-03-02-23-03-34
.. nonce: LRl4LS
.. section: Core and Builtins

:class:`dict` (and :class:`collections.UserDict`) objects now support PEP
584's merge (``|``) and update (``|=``) operators. Patch by Brandt Bucher.

..

.. bpo: 32856
.. date: 2018-02-16-10-44-24
.. nonce: UjR8SD
.. section: Core and Builtins

Optimized the idiom for assignment a temporary variable in comprehensions.
Now ``for y in [expr]`` in comprehensions is as fast as a simple assignment
``y = expr``.

..

.. bpo: 30566
.. date: 2020-02-24-03-45-28
.. nonce: qROxty
.. section: Library

Fix :exc:`IndexError` when trying to decode an invalid string with punycode
codec.

..

.. bpo: 39649
.. date: 2020-02-23-21-27-10
.. nonce: qiubSp
.. section: Library

Remove obsolete check for ``__args__`` in ``bdb.Bdb.format_stack_entry``.

..

.. bpo: 39648
.. date: 2020-02-22-12-49-04
.. nonce: Y-9N7F
.. section: Library

Expanded :func:`math.gcd` and :func:`math.lcm` to handle multiple arguments.

..

.. bpo: 39681
.. date: 2020-02-21-13-58-40
.. nonce: zN8hf0
.. section: Library

Fix a regression where the C pickle module wouldn't allow unpickling from a
file-like object that doesn't expose a readinto() method.

..

.. bpo: 35950
.. date: 2020-02-21-02-42-41
.. nonce: 9G3-wl
.. section: Library

Raise :exc:`io.UnsupportedOperation` in :meth:`io.BufferedReader.truncate`
when it is called on a read-only :class:`io.BufferedReader` instance.

..

.. bpo: 39479
.. date: 2020-02-18-12-37-16
.. nonce: j3UcCq
.. section: Library

Add :func:`math.lcm` function: least common multiple.

..

.. bpo: 39674
.. date: 2020-02-18-12-31-24
.. nonce: S_zqVM
.. section: Library

Revert "Do not expose abstract collection classes in the collections module"
change (bpo-25988). Aliases to ABC like collections.Mapping are kept in
Python 3.9 to ease transition from Python 2.7, but will be removed in Python
3.10.

..

.. bpo: 39104
.. date: 2020-02-16-18-49-16
.. nonce: cI5MJY
.. section: Library

Fix hanging ProcessPoolExcutor on ``shutdown(wait=False)`` when a task has
failed pickling.

..

.. bpo: 39627
.. date: 2020-02-13-18-14-15
.. nonce: Q0scyQ
.. section: Library

Fixed TypedDict totality check for inherited keys.

..

.. bpo: 39474
.. date: 2020-02-12-12-01-26
.. nonce: RZMEUH
.. section: Library

Fixed starting position of AST for expressions like ``(a)(b)``, ``(a)[b]``
and ``(a).b``.

..

.. bpo: 21016
.. date: 2020-02-12-10-04-39
.. nonce: bFXPH7
.. section: Library

The :mod:`pydoc` and :mod:`trace` modules now use the :mod:`sysconfig`
module to get the path to the Python standard library, to support uncommon
installation path like ``/usr/lib64/python3.9/`` on Fedora. Patch by Jan
Matějek.

..

.. bpo: 39590
.. date: 2020-02-09-05-51-05
.. nonce: rf98GU
.. section: Library

Collections.deque now holds strong references during deque.__contains__ and
deque.count, fixing crashes.

..

.. bpo: 39586
.. date: 2020-02-08-13-37-00
.. nonce: nfTPxX
.. section: Library

The distutils ``bdist_msi`` command is deprecated in Python 3.9, use
``bdist_wheel`` (wheel packages) instead.

..

.. bpo: 39595
.. date: 2020-02-07-23-14-14
.. nonce: DHwddE
.. section: Library

Improved performance of zipfile.Path for files with a large number of
entries. Also improved performance and fixed minor issue as published with
`importlib_metadata 1.5
<https://importlib-metadata.readthedocs.io/en/latest/history.html#v1-5-0>`_.

..

.. bpo: 39350
.. date: 2020-02-06-13-34-52
.. nonce: wRwup1
.. section: Library

Fix regression in :class:`fractions.Fraction` if the numerator and/or the
denominator is an :class:`int` subclass. The :func:`math.gcd` function is
now used to normalize the *numerator* and *denominator*. :func:`math.gcd`
always return a :class:`int` type. Previously, the GCD type depended on
*numerator* and *denominator*.

..

.. bpo: 39567
.. date: 2020-02-06-10-23-32
.. nonce: VpFBxt
.. section: Library

Added audit for :func:`os.walk`, :func:`os.fwalk`, :meth:`pathlib.Path.glob`
and :meth:`pathlib.Path.rglob`.

..

.. bpo: 39559
.. date: 2020-02-05-18-29-14
.. nonce: L8i5YB
.. section: Library

Remove unused, undocumented argument ``getters`` from :func:`uuid.getnode`

..

.. bpo: 38149
.. date: 2020-02-05-11-24-16
.. nonce: GWsjHE
.. section: Library

:func:`sys.audit` is now called only once per call of :func:`glob.glob` and
:func:`glob.iglob`.

..

.. bpo: 39546
.. date: 2020-02-03-15-12-51
.. nonce: _Kj0Pn
.. section: Library

Fix a regression in :class:`~argparse.ArgumentParser` where
``allow_abbrev=False`` was ignored for long options that used a prefix
character other than "-".

..

.. bpo: 39450
.. date: 2020-02-02-14-46-34
.. nonce: 48R274
.. section: Library

Striped whitespace from docstring before returning it from
:func:`unittest.case.shortDescription`.

..

.. bpo: 12915
.. date: 2020-02-02-10-08-25
.. nonce: d6r50-
.. section: Library

A new function ``resolve_name`` has been added to the ``pkgutil`` module.
This resolves a string of the form ``'a.b.c.d'`` or ``'a.b:c.d'`` to an
object. In the example, ``a.b`` is a package/module and ``c.d`` is an object
within that package/module reached via recursive attribute access.

..

.. bpo: 39353
.. date: 2020-01-30-09-07-16
.. nonce: wTl9hc
.. section: Library

The :func:`binascii.crc_hqx` function is no longer deprecated.

..

.. bpo: 39493
.. date: 2020-01-30-01-13-19
.. nonce: CbFRi7
.. section: Library

Mark ``typing.IO.closed`` as a property

..

.. bpo: 39491
.. date: 2020-01-29-22-47-12
.. nonce: tdl17b
.. section: Library

Add :data:`typing.Annotated` and ``include_extras`` parameter to
:func:`typing.get_type_hints` as part of :pep:`593`. Patch by Till
Varoquaux, documentation by Till Varoquaux and Konstantin Kashin.

..

.. bpo: 39485
.. date: 2020-01-29-14-58-27
.. nonce: Zy3ot6
.. section: Library

Fix a bug in :func:`unittest.mock.create_autospec` that would complain about
the wrong number of arguments for custom descriptors defined in an extension
module returning functions.

..

.. bpo: 38932
.. date: 2020-01-25-13-41-27
.. nonce: 1pu_8I
.. section: Library

Mock fully resets child objects on reset_mock(). Patch by Vegard Stikbakke

..

.. bpo: 39082
.. date: 2020-01-24-13-24-35
.. nonce: qKgrq_
.. section: Library

Allow AsyncMock to correctly patch static/class methods

..

.. bpo: 39432
.. date: 2020-01-23-16-08-58
.. nonce: Cee6mi
.. section: Library

Implement PEP-489 algorithm for non-ascii "PyInit\_..." symbol names in
distutils to make it export the correct init symbol also on Windows.

..

.. bpo: 18819
.. date: 2020-01-20-10-06-19
.. nonce: H4qsoS
.. section: Library

Omit ``devmajor`` and ``devminor`` fields for non-device files in
:mod:`tarfile` archives, enabling bit-for-bit compatibility with GNU
``tar(1)``.

..

.. bpo: 39349
.. date: 2020-01-19-04-12-34
.. nonce: 7CV-LC
.. section: Library

Added a new *cancel_futures* parameter to
:meth:`concurrent.futures.Executor.shutdown` that cancels all pending
futures which have not started running, instead of waiting for them to
complete before shutting down the executor.

..

.. bpo: 39274
.. date: 2020-01-15-23-13-03
.. nonce: lpc0-n
.. section: Library

``bool(fraction.Fraction)`` now returns a boolean even if (numerator != 0)
does not return a boolean (ex: numpy number).

..

.. bpo: 34793
.. date: 2019-12-09-17-24-29
.. nonce: D82Dyu
.. section: Library

Remove support for ``with (await asyncio.lock):`` and ``with (yield from
asyncio.lock):``.  The same is correct for ``asyncio.Condition`` and
``asyncio.Semaphore``.

..

.. bpo: 25597
.. date: 2019-09-12-12-11-05
.. nonce: mPMzVx
.. section: Library

Ensure, if ``wraps`` is supplied to :class:`unittest.mock.MagicMock`, it is
used to calculate return values for the magic methods instead of using the
default return values. Patch by Karthikeyan Singaravelan.

..

.. bpo: 36350
.. date: 2019-03-18-16-17-59
.. nonce: udRSWE
.. section: Library

``inspect.Signature.parameters`` and ``inspect.BoundArguments.arguments`` are
now dicts instead of OrderedDicts. Patch contributed by Rémi Lapeyre.

..

.. bpo: 35727
.. date: 2019-01-12-20-39-34
.. nonce: FWrbHn
.. section: Library

Fix sys.exit() and sys.exit(None) exit code propagation when used in
multiprocessing.Process.

..

.. bpo: 32173
.. date: 2017-12-04-10-14-23
.. nonce: e0C5dF
.. section: Library

* Add ``lazycache`` function to ``__all__``.
* Use ``dict.clear`` to clear the cache.
* Refactoring ``getline`` function and ``checkcache`` function.

..

.. bpo: 17422
.. date: 2020-02-19-11-13-47
.. nonce: g7_9zz
.. section: Documentation

The language reference now specifies restrictions on class namespaces.
Adapted from a patch by Ethan Furman.

..

.. bpo: 39572
.. date: 2020-02-18-18-37-07
.. nonce: CCtzy1
.. section: Documentation

Updated documentation of ``total`` flag of ``TypedDict``.

..

.. bpo: 39654
.. date: 2020-02-18-07-42-20
.. nonce: MoT1jI
.. section: Documentation

In pyclbr doc, update 'class' to 'module' where appropriate and add
readmodule comment. Patch by Hakan Çelik.

..

.. bpo: 39153
.. date: 2020-01-27-22-24-51
.. nonce: Pjl8jV
.. section: Documentation

Clarify refcounting semantics for the following functions: -
PyObject_SetItem - PyMapping_SetItemString - PyDict_SetItem -
PyDict_SetItemString

..

.. bpo: 39392
.. date: 2020-01-27-18-18-42
.. nonce: oiqcLO
.. section: Documentation

Explain that when filling with turtle, overlap regions may be left unfilled.

..

.. bpo: 39369
.. date: 2020-01-17-13-59-21
.. nonce: Bx5yE3
.. section: Documentation

Update mmap readline method description. The fact that the readline method
does update the file position should not be ignored since this might give
the impression for the programmer that it doesn't update it.

..

.. bpo: 9056
.. date: 2018-09-28-18-13-08
.. nonce: -sFOwU
.. section: Documentation

Include subsection in TOC for PDF version of docs.

..

.. bpo: 38325
.. date: 2020-02-11-00-38-32
.. nonce: HgmfoE
.. section: Tests

Skip tests on non-BMP characters of test_winconsoleio.

..

.. bpo: 39502
.. date: 2020-01-30-15-04-54
.. nonce: chbpII
.. section: Tests

Skip test_zipfile.test_add_file_after_2107() if :func:`time.localtime` fails
with :exc:`OverflowError`. It is the case on AIX 6.1 for example.

..

.. bpo: 39489
.. date: 2020-01-29-19-17-02
.. nonce: HKPzv-
.. section: Build

Remove ``COUNT_ALLOCS`` special build.

..

.. bpo: 39553
.. date: 2020-02-04-19-50-53
.. nonce: _EnweA
.. section: Windows

Delete unused code related to SxS manifests.

..

.. bpo: 39439
.. date: 2020-01-24-03-15-05
.. nonce: sFxGfR
.. section: Windows

Honor the Python path when a virtualenv is active on Windows.

..

.. bpo: 39393
.. date: 2020-01-20-23-42-53
.. nonce: gWlJDG
.. section: Windows

Improve the error message when attempting to load a DLL with unresolved
dependencies.

..

.. bpo: 38883
.. date: 2020-01-11-22-53-55
.. nonce: X7FRaN
.. section: Windows

:meth:`~pathlib.Path.home()` and :meth:`~pathlib.Path.expanduser()` on
Windows now prefer :envvar:`USERPROFILE` and no longer use :envvar:`HOME`,
which is not normally set for regular user accounts. This makes them again
behave like :func:`os.path.expanduser`, which was changed to ignore
:envvar:`HOME` in 3.8, see :issue:`36264`.

..

.. bpo: 39185
.. date: 2020-01-02-01-11-53
.. nonce: T4herN
.. section: Windows

The build.bat script has additional options for very-quiet output (-q) and
very-verbose output (-vv)

..

.. bpo: 39663
.. date: 2020-02-17-21-09-03
.. nonce: wexcsH
.. section: IDLE

Add tests for pyparse find_good_parse_start().

..

.. bpo: 39600
.. date: 2020-02-10-17-09-48
.. nonce: X6NsyM
.. section: IDLE

In the font configuration window, remove duplicated font names.

..

.. bpo: 30780
.. date: 2020-01-27-16-44-29
.. nonce: nR80qu
.. section: IDLE

Add remaining configdialog tests for buttons and highlights and keys tabs.

..

.. bpo: 39388
.. date: 2020-01-25-02-26-45
.. nonce: x4TQNh
.. section: IDLE

IDLE Settings Cancel button now cancels pending changes

..

.. bpo: 38792
.. date: 2019-11-13-23-51-39
.. nonce: xhTC5a
.. section: IDLE

Close an IDLE shell calltip if a :exc:`KeyboardInterrupt` or shell restart
occurs.  Patch by Zackery Spytz.

..

.. bpo: 35081
.. date: 2020-02-12-21-38-49
.. nonce: 5tj1yC
.. section: C API

Move the ``bytes_methods.h`` header file to the internal C API as
``pycore_bytes_methods.h``: it only contains private symbols (prefixed by
``_Py``), except of the ``PyDoc_STRVAR_shared()`` macro.

..

.. bpo: 35081
.. date: 2020-02-12-21-24-02
.. nonce: at7BjN
.. section: C API

Move the ``dtoa.h`` header file to the internal C API as ``pycore_dtoa.h``:
it only contains private functions (prefixed by ``_Py``). The :mod:`math`
and :mod:`cmath` modules must now be compiled with the ``Py_BUILD_CORE``
macro defined.

..

.. bpo: 39573
.. date: 2020-02-07-10-41-53
.. nonce: EG9VDI
.. section: C API

Add :c:func:`Py_SET_SIZE` function to set the size of an object.

..

.. bpo: 39500
.. date: 2020-02-07-09-35-43
.. nonce: xRAEgX
.. section: C API

:c:func:`PyUnicode_IsIdentifier` does not call :c:func:`Py_FatalError`
anymore if the string is not ready.

..

.. bpo: 39573
.. date: 2020-02-07-03-39-03
.. nonce: Oa8cL1
.. section: C API

Add :c:func:`Py_SET_TYPE` function to set the type of an object.

..

.. bpo: 39573
.. date: 2020-02-07-00-23-44
.. nonce: nRD1q7
.. section: C API

Add a :c:func:`Py_SET_REFCNT` function to set the reference counter of an
object.

..

.. bpo: 39542
.. date: 2020-02-05-13-14-20
.. nonce: 5mleGX
.. section: C API

Convert :c:func:`PyType_HasFeature`, :c:func:`PyType_Check` and
:c:func:`PyType_CheckExact` macros to static inline functions.

..

.. bpo: 39542
.. date: 2020-02-05-12-40-51
.. nonce: si-_Zq
.. section: C API

In the limited C API, ``PyObject_INIT()`` and ``PyObject_INIT_VAR()`` are
now defined as aliases to :c:func:`PyObject_Init` and
:c:func:`PyObject_InitVar` to make their implementation opaque. It avoids to
leak implementation details in the limited C API. Exclude the following
functions from the limited C API: ``_Py_NewReference()``,
``_Py_ForgetReference()``, ``_PyTraceMalloc_NewReference()`` and
``_Py_GetRefTotal()``.

..

.. bpo: 39542
.. date: 2020-02-05-12-00-18
.. nonce: RJCUKR
.. section: C API

Exclude trashcan mechanism from the limited C API: it requires access to
PyTypeObject and PyThreadState structure fields, whereas these structures
are opaque in the limited C API.

..

.. bpo: 39511
.. date: 2020-01-31-16-35-21
.. nonce: nv9yEn
.. section: C API

The :c:func:`PyThreadState_Clear` function now calls the
:c:member:`PyThreadState.on_delete` callback. Previously, that happened in
:c:func:`PyThreadState_Delete`.

..

.. bpo: 38076
.. date: 2020-01-17-11-37-05
.. nonce: cxfw2x
.. section: C API

Fix to clear the interpreter state only after clearing module globals to
guarantee module state access from C Extensions during runtime destruction

..

.. bpo: 39245
.. date: 2020-01-07-13-46-40
.. nonce: G7wog6
.. section: C API

The Vectorcall API (PEP 590) was made public, adding the functions
``PyObject_Vectorcall``, ``PyObject_VectorcallMethod``,
``PyVectorcall_Function``, ``PyObject_CallOneArg``,
``PyObject_CallMethodNoArgs``, ``PyObject_CallMethodOneArg``,
``PyObject_FastCallDict``, and the flag ``Py_TPFLAGS_HAVE_VECTORCALL``.