From ce91aae955aaf6aa63969e5eda5d5f39113a74a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Lapeyre?= Date: Fri, 18 Aug 2023 12:54:53 +0200 Subject: [PATCH 1/2] Fix some typos --- pep-0703.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pep-0703.rst b/pep-0703.rst index be2a8e99415..5d0b3926ec3 100644 --- a/pep-0703.rst +++ b/pep-0703.rst @@ -474,7 +474,7 @@ field. Default (``0b00``) """""""""""""""""" -Objects are intitially created in the default state. This is the only +Objects are initially created in the default state. This is the only state that allows for the quick deallocation code path. Otherwise, the thread must merge the local and shared reference count fields, which requires an atomic compare-and-swap. @@ -708,7 +708,7 @@ Additionally, ``PyObject_Malloc`` should be used only for allocating Python objects; it should not be used for allocating buffers, storages, or other data structures that are not PyObjects. -This PEP also imposes restrictions on the pluggable allocator API +This PEP also imposes restrictions on the plugable allocator API (``PyMem_SetAllocator``). When compiling without the GIL, allocators set using this API must eventually delegate the allocation to the corresponding underlying allocator, such as ``PyObject_Malloc``, for @@ -1311,7 +1311,7 @@ The ``PYTHONGIL=0`` override is important because extensions that are not thread-safe can still be useful in multi-threaded applications. For example, one may want to use the extension from only a single thread or guard access by locks. For context, there are already some extensions -that aren not thread-safe even with the GIL, and users already have to +that are not thread-safe even with the GIL, and users already have to take these sorts of steps. The ``PYTHONGIL=1`` override is sometimes useful for debugging. From 0b1a6b792e100fc58eaeae3ae7124a2063db067e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Lapeyre?= Date: Mon, 21 Aug 2023 17:57:17 +0200 Subject: [PATCH 2/2] Update pep-0703.rst --- pep-0703.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pep-0703.rst b/pep-0703.rst index 5d0b3926ec3..b7a0d6cf3cc 100644 --- a/pep-0703.rst +++ b/pep-0703.rst @@ -708,7 +708,7 @@ Additionally, ``PyObject_Malloc`` should be used only for allocating Python objects; it should not be used for allocating buffers, storages, or other data structures that are not PyObjects. -This PEP also imposes restrictions on the plugable allocator API +This PEP also imposes restrictions on the pluggable allocator API (``PyMem_SetAllocator``). When compiling without the GIL, allocators set using this API must eventually delegate the allocation to the corresponding underlying allocator, such as ``PyObject_Malloc``, for