Skip to content

Commit a874397

Browse files
committed
Merge branch 'main' into gh-120321-gen-atomic
2 parents 8a86ce0 + 6a4f103 commit a874397

File tree

75 files changed

+2362
-1012
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+2362
-1012
lines changed

Doc/c-api/intro.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,46 @@ header files properly declare the entry points to be ``extern "C"``. As a result
107107
there is no need to do anything special to use the API from C++.
108108

109109

110+
.. _capi-system-includes:
111+
112+
System includes
113+
---------------
114+
115+
:file:`Python.h` includes several standard header files.
116+
C extensions should include the standard headers that they use,
117+
and should not rely on these implicit includes.
118+
The implicit includes are:
119+
120+
* ``<assert.h>``
121+
* ``<intrin.h>`` (on Windows)
122+
* ``<inttypes.h>``
123+
* ``<limits.h>``
124+
* ``<math.h>``
125+
* ``<stdarg.h>``
126+
* ``<wchar.h>``
127+
* ``<sys/types.h>`` (if present)
128+
129+
The following are included for backwards compatibility, unless using
130+
:ref:`Limited API <limited-c-api>` 3.13 or newer:
131+
132+
* ``<ctype.h>``
133+
* ``<unistd.h>`` (on POSIX)
134+
135+
The following are included for backwards compatibility, unless using
136+
:ref:`Limited API <limited-c-api>` 3.11 or newer:
137+
138+
* ``<errno.h>``
139+
* ``<stdio.h>``
140+
* ``<stdlib.h>``
141+
* ``<string.h>``
142+
143+
.. note::
144+
145+
Since Python may define some pre-processor definitions which affect the standard
146+
headers on some systems, you *must* include :file:`Python.h` before any standard
147+
headers are included.
148+
149+
110150
Useful macros
111151
=============
112152

Doc/deprecations/pending-removal-in-3.20.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Pending removal in Python 3.20
22
------------------------------
33

4-
* The ``__version__`` attribute has been deprecated in these standard library
5-
modules and will be removed in Python 3.20.
6-
Use :py:data:`sys.version_info` instead.
4+
* The ``__version__``, ``version`` and ``VERSION`` attributes have been
5+
deprecated in these standard library modules and will be removed in
6+
Python 3.20. Use :py:data:`sys.version_info` instead.
77

88
- :mod:`argparse`
99
- :mod:`csv`
@@ -24,6 +24,9 @@ Pending removal in Python 3.20
2424
- :mod:`tkinter.font`
2525
- :mod:`tkinter.ttk`
2626
- :mod:`wsgiref.simple_server`
27+
- :mod:`xml.etree.ElementTree`
28+
- :mod:`!xml.sax.expatreader`
29+
- :mod:`xml.sax.handler`
2730
- :mod:`zlib`
2831

2932
(Contributed by Hugo van Kemenade and Stan Ulbrych in :gh:`76007`.)

0 commit comments

Comments
 (0)