From 407907757514c2957745738474e83f4a78ed3a60 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 18 May 2025 02:57:00 +0000 Subject: [PATCH 1/2] chore(deps): update pre-commit hook igorshubovych/markdownlint-cli to v0.45.0 --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ab06ad323..066474524 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -66,7 +66,7 @@ repos: - id: committed - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.44.0 + rev: v0.45.0 hooks: - id: markdownlint exclude: | From d343451b4b1b94982bb2053d8b7be96c5777ae22 Mon Sep 17 00:00:00 2001 From: JP-Ellis Date: Mon, 2 Jun 2025 15:39:50 +1000 Subject: [PATCH 2/2] chore(docs): fix markdown lints Signed-off-by: JP-Ellis --- README.md | 2 +- .../2024/05-02 integrating rust ffi with pact python.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index efebabdc1..5ba0a2a63 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ This readme provides a high-level overview of the Pact Python library. For detai - [Provider testing](docs/provider.md) - [Examples](examples/README.md) -Documentation for the API is generated from the docstrings in the code which you can view [here](https://pact-foundation.github.io/pact-python/pact). Please be aware that only the [`pact.v3` module][pact.v3] is thoroughly documented at this time. +Documentation for the API is generated from the docstrings in the code which you can view at [`pact-foundation.github.io/pact-python/pact`](https://pact-foundation.github.io/pact-python/pact). Please be aware that only the [`pact.v3` module][pact.v3] is thoroughly documented at this time. ### Need Help diff --git a/docs/blog/posts/2024/05-02 integrating rust ffi with pact python.md b/docs/blog/posts/2024/05-02 integrating rust ffi with pact python.md index 54515dad3..8289964be 100644 --- a/docs/blog/posts/2024/05-02 integrating rust ffi with pact python.md +++ b/docs/blog/posts/2024/05-02 integrating rust ffi with pact python.md @@ -19,12 +19,12 @@ In this blog post, I will delve into how this is all achieved. From explaining h Python, known for its dynamic typing and automated memory management, is fundamentally an interpreted language. Despite not having innate capabilities to directly interact with binary libraries, most Python interpreters bridge this gap efficiently. For instance, CPython—the principal interpreter—enables the creation of binary extensions[^binary_extension] and similarly, PyPy—a widely-used alternative—offers comparable functionalities[^pypy]. -[^binary_extension]: You can find extensive documentation on building extensions for CPython [here](https://docs.python.org/3/extending/extending.html). -[^pypy]: PyPy extension-building documentation is available [here](https://doc.pypy.org/en/latest/extending.html). +[^binary_extension]: You can find extensive documentation on building extensions for CPython [in the official documentation](https://docs.python.org/3/extending/extending.html). +[^pypy]: Refer to the [PyPy extension-building documentation](https://doc.pypy.org/en/latest/extending.html). However, each interpreter has a distinct API tailored for crafting these binary extensions, which unfortunately leads to a lack of universal solutions across different environments. Furthermore, interpreters like [Jython](https://jython.org) and [Pyodide](https://pyodide.org/en/stable/), which are based on Java and WebAssembly respectively, present unique challenges that often preclude the straightforward use of such extensions due to their distinct runtime architectures.[^pyodide] -[^pyodide]: It would appear that Pyodide can support C extensions as explained [here](https://pyodide.org/en/stable/development/new-packages.html), though by and large Pyodide appears to be intended for pure Python packages. +[^pyodide]: It would appear that Pyodide [can support C extensions](https://pyodide.org/en/stable/development/new-packages.html), though by and large Pyodide appears to be intended for pure Python packages. While it is possible for the extension to contain all the logic, our specific requirement is merely to provide a bridge between Python and the Rust core library. This is the niche that [Python C Foreign Function Interface (CFFI)](https://cffi.readthedocs.io/en/stable/) fills. By parsing a C header file, CFFI automates the generation of extension code needed for Python to interface with the binary library. Consequently, this library can be imported into Python as if it were any standard module—streamlining development and potentially improving performance by leveraging optimized native code.