@@ -104,21 +104,13 @@ extension to include the new environment marker.
104104Adding ``sys.abi_features `` to the Python Standard Library
105105----------------------------------------------------------
106106
107- The Python standard library already has one mechanism to provide information
108- about the ABI of the interpreter, namely the ``sys.abiflags `` attribute.
109- This attribute is a string that contains a number of flags, such as ``d `` for
110- debug builds, but it is not easily understood and not uniformly available.
111- The new ``sys.abi_features `` attribute is both and is designed to be a superset
112- of the information contained in ``sys.abiflags ``, which is why we chose to
113- include the ``debug `` feature.
114- The established ``sys.abiflags `` also has a direct link to the naming of
115- various filesystem paths. This can be convenient, but precludes its use for the
116- documentation of important ABI features that are *not * intended to impact these
117- paths.
118-
119- The new ``sys.abi_features `` attribute provides a place for this, and because
120- it decouples the information from filesystem paths, it can offer significantly
121- more clarity.
107+ The Python standard library already has mechanisms to provide information about
108+ the ABI of the interpreter, like the :data: `!sys.abiflags ` attribute and the
109+ :mod: `sysconfig ` module, but these do not provide all the `ABI Features `_ that
110+ are relevant for environment markers.
111+ The new attribute :data: `!sys.abi_features ` is a natural extension to the
112+ existing mechanisms, and it is a simple and intuitive way to provide this
113+ information, including the information from :data: `!sys.abiflags `.
122114
123115A Forward Looking View on Free-Threaded Python
124116----------------------------------------------
@@ -229,8 +221,8 @@ All Python interpreters MUST provide the ``sys.abi_features`` attribute as a
229221``frozenset `` of strings, which MUST contain only the `ABI Features `_ that are
230222defined in this PEP or in a subsequent PEP.
231223
232- An example value would be ``sys.abi_features == {"free-threading",
233- "debug", "32-bit"} `` on a free-threaded debug build for win32.
224+ An example value would be ``sys.abi_features == frozenset( {"free-threading",
225+ "debug", "32-bit"}) `` on a free-threaded debug build for win32.
234226
235227Environment Markers
236228'''''''''''''''''''
0 commit comments