Skip to content

Commit 77f7b9b

Browse files
zklausAA-Turner
andcommitted
Integrate suggestions from Adam Turner
Co-authored-by: Adam Turner <[email protected]>
1 parent 8f57f17 commit 77f7b9b

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

Doc/library/sys.rst

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,34 @@ always available. Unless explicitly noted otherwise, all variables are read-only
1313

1414
.. data:: abi_info
1515

16+
.. versionadded:: next
17+
1618
An object containing information about the ABI of the currently running
1719
Python interpreter.
18-
It should include information that affect the CPython ABI in ways that require
19-
a specific build of the interpreter chosen from variants that can co-exist on
20-
a single machine. For example, it does not encode the base OS (Linux or
21-
Windows), but does include pointer size since some systems support both 32-
22-
and 64- builds. The available entries are the same on all platforms; e.g.
23-
pointer_size is available even on 64-bit-only architectures.
24-
25-
New entries should be added when needed for a supported platform, or (for
26-
enabling an unsupported one) by core dev consensus. Entries should be removed
27-
following :pep:`387`.
20+
It should include information that affect the CPython ABI in ways that
21+
require a specific build of the interpreter chosen from variants that can
22+
co-exist on a single machine.
23+
For example, it does not encode the base OS (Linux or Windows), but does
24+
include pointer size since some systems support both 32- and 64-bit builds.
25+
The available entries are the same on all platforms;
26+
e.g. *pointer_size* is available even on 64-bit-only architectures.
2827

29-
The following attributes are available in CPython:
28+
The following attributes are available:
3029

3130
*pointer_bits* is the width of pointers in bits, as an integer, equivalent
3231
to ``8 * sizeof(void *)``, i.e. usually ``32`` or ``64``.
3332

34-
*free_threaded* is a boolean indicating whether the interpreter was built
35-
with the GIL disabled, i.e. with the :option:`--disable-gil` option,
36-
aka free-threading.
33+
*free_threaded* is a boolean indicating whether the interpreter supports
34+
running in free-threaded mode (i.e. with the GIL disabled).
35+
This reflects the presence of the :option:`--disable-gil` configure option.
3736

3837
*debug* is a boolean indicating whether the interpreter was built in
39-
:ref:`debug mode <debug-build>`, i.e. with the :option:`--with-pydebug` option.
38+
:ref:`debug mode <debug-build>`.
39+
This reflects the presence of the :option:`--with-pydebug` configure option.
4040

4141
*byteorder* is a string indicating the native byte order, either ``'big'`` or
42-
``'little'``. This is the same as the :data:`byteorder` attribute.
43-
44-
.. versionadded:: next
42+
``'little'``.
43+
This is the same as the :data:`sys.byteorder` attribute.
4544

4645

4746
.. data:: abiflags

Python/sysmodule.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3643,6 +3643,9 @@ make_impl_info(PyObject *version_info)
36433643
static PyObject *
36443644
make_abi_info(void)
36453645
{
3646+
// New entries should be added when needed for a supported platform, or (for
3647+
// enabling an unsupported one) by core dev consensus. Entries should be removed
3648+
// following :pep:`387`.
36463649
int res;
36473650
PyObject *abi_info, *value, *ns;
36483651
abi_info = PyDict_New();

0 commit comments

Comments
 (0)