From 45452bd35832d3b294e433b868c78b7813408f8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Fri, 20 Sep 2024 07:02:49 +0100 Subject: [PATCH] porting: link to the free-threading unsafe borrowed ref APIs docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe LaĆ­ns --- docs/porting.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/porting.md b/docs/porting.md index 57446d8..ac93d90 100644 --- a/docs/porting.md +++ b/docs/porting.md @@ -555,6 +555,9 @@ bugs in C or C++ code using the C API directly. However, many usages *are* unsafe, and maintaining a borrowed reference to an objects that could be exposed to another thread is unsafe. +A good starting place to find instances of this would be to look for usages of the +[unsafe borrowed reference APIs mentioned in the free-threading compatibility docs](https://docs.python.org/3.14/howto/free-threading-extensions.html#borrowed-references). + ### Adopt `pythoncapi-compat` to use new C API functions Rather than maintaining compatibility shims to use functions added to the C API