From c7308076966c1c55bc117ce9f7a7f49ac96acfa6 Mon Sep 17 00:00:00 2001 From: Andrew McNulty Date: Mon, 24 Apr 2023 09:52:28 +0200 Subject: Python: Add 'limited_api' kwarg to extension_module This commit adds a new keyword arg to extension_module() that enables a user to target the Python Limited API, declaring the version of the limited API that they wish to target. Two new unittests have been added to test this functionality. --- docs/markdown/Python-module.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs/markdown/Python-module.md') diff --git a/docs/markdown/Python-module.md b/docs/markdown/Python-module.md index f67262abf..05ae57de2 100644 --- a/docs/markdown/Python-module.md +++ b/docs/markdown/Python-module.md @@ -101,6 +101,11 @@ the addition of the following: `/usr/lib/site-packages`. When subdir is passed to this method, it will be appended to that location. This keyword argument is mutually exclusive with `install_dir` +- `limited_api`: *since 1.3.0* A string containing the Python version + of the [Py_LIMITED_API](https://docs.python.org/3/c-api/stable.html) that + the extension targets. For example, '3.7' to target Python 3.7's version of + the limited API. This behavior can be disabled by setting the value of + `python.allow_limited_api`. See [Python module options](Builtin-options.md#python-module). Additionally, the following diverge from [[shared_module]]'s default behavior: -- cgit v1.2.3