Skip to content

Commit 03ea862

Browse files
authored
bpo-45434: Python.h no longer includes <stdlib.h> (GH-28888)
1 parent 7103356 commit 03ea862

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

Doc/whatsnew/3.11.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,10 @@ Porting to Python 3.11
552552

553553
(Contributed by Victor Stinner in :issue:`39573`.)
554554

555+
* The ``<Python.h>`` header file no longer includes ``<stdlib.h>``. C
556+
extensions using ``<stdlib.h>`` must now include it explicitly.
557+
(Contributed by Victor Stinner in :issue:`45434`.)
558+
555559
Deprecated
556560
----------
557561

Include/Python.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#ifdef HAVE_ERRNO_H
2626
# include <errno.h> // errno
2727
#endif
28-
#include <stdlib.h>
2928
#ifndef MS_WINDOWS
3029
# include <unistd.h>
3130
#endif
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
The ``<Python.h>`` header file no longer includes ``<stdlib.h>``. C
2+
extensions using ``<stdlib.h>`` must now include it explicitly. Patch by
3+
Victor Stinner.

0 commit comments

Comments
 (0)