From b230af81ac027af3e0e88ba3f1e206c70faf7008 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 7 Feb 2022 15:17:50 +0100 Subject: [PATCH 1/3] PEP 7: Python 3.11 uses C11 --- pep-0007.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pep-0007.txt b/pep-0007.txt index 39c955d365d..80507b49a40 100644 --- a/pep-0007.txt +++ b/pep-0007.txt @@ -31,13 +31,10 @@ particular rule: C dialect ========= -* Python versions before 3.6 use ANSI/ISO standard C (the 1989 version - of the standard). This means (amongst many other things) that all - declarations must be at the top of a block (not necessarily at the - top of function). +* Python 3.11 and newer versions use C11 without optional features. + The public C API should be compatible with C++. -* Python versions greater than or equal to 3.6 use C89 with several - select C99 features: +* Python 3.6 to 3.10 uses C89 with several select C99 features: - Standard integer types in ```` and ````. We require the fixed width integer types. @@ -50,6 +47,11 @@ C dialect Future C99 features may be added to this list in the future depending on compiler support (mostly significantly MSVC). +* Python versions before 3.6 used ANSI/ISO standard C (the 1989 version + of the standard). This means (amongst many other things) that all + declarations must be at the top of a block (not necessarily at the + top of function). + * Don't use compiler-specific extensions, such as those of GCC or MSVC (e.g. don't write multi-line strings without trailing backslashes). From cd43ebe8667e16d511f754c1801554f67dd10b68 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 25 Feb 2022 00:06:30 +0100 Subject: [PATCH 2/3] Grammar; remove Future C99 features --- pep-0007.txt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pep-0007.txt b/pep-0007.txt index 80507b49a40..960fd3a13ac 100644 --- a/pep-0007.txt +++ b/pep-0007.txt @@ -34,7 +34,7 @@ C dialect * Python 3.11 and newer versions use C11 without optional features. The public C API should be compatible with C++. -* Python 3.6 to 3.10 uses C89 with several select C99 features: +* Python 3.6 to 3.10 use C89 with several select C99 features: - Standard integer types in ```` and ````. We require the fixed width integer types. @@ -44,11 +44,8 @@ C dialect - booleans - C++-style line comments - Future C99 features may be added to this list in the future - depending on compiler support (mostly significantly MSVC). - * Python versions before 3.6 used ANSI/ISO standard C (the 1989 version - of the standard). This means (amongst many other things) that all + of the standard). This meant (amongst many other things) that all declarations must be at the top of a block (not necessarily at the top of function). From 2864440587edb6497cff00fb8a6f457c28a63db0 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 25 Feb 2022 00:08:52 +0100 Subject: [PATCH 3/3] Add link --- pep-0007.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pep-0007.txt b/pep-0007.txt index 960fd3a13ac..d88373f29b3 100644 --- a/pep-0007.txt +++ b/pep-0007.txt @@ -31,7 +31,8 @@ particular rule: C dialect ========= -* Python 3.11 and newer versions use C11 without optional features. +* Python 3.11 and newer versions use C11 without `optional features + `_. The public C API should be compatible with C++. * Python 3.6 to 3.10 use C89 with several select C99 features: