Skip to content

Commit e449c7e

Browse files
authored
PEP 818: Add 'How to Teach' & 'Change History', minor edits, and new Discourse post (#5156)
1 parent 0914c50 commit e449c7e

1 file changed

Lines changed: 29 additions & 6 deletions

File tree

‎peps/pep-0818.rst‎

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@ PEP: 818
22
Title: Adding the Core of the Pyodide Foreign Function Interface to Python
33
Author: Hood Chatham <roberthoodchatham at gmail.com>
44
Sponsor: Łukasz Langa <lukasz at python.org>
5-
Discussions-To: https://discuss.python.org/t/pep-818-upstreaming-the-pyodide-ffi/105530
5+
Discussions-To: https://discuss.python.org/t/pep-818-adding-the-core-of-the-pyodide-foreign-function-interface-to-python-2/109311
66
Status: Draft
77
Type: Standards Track
88
Created: 10-Dec-2025
99
Python-Version: 3.16
10+
Post-History: `05-Jan-2026 <https://discuss.python.org/t/pep-818-upstreaming-the-pyodide-ffi/105530>`__,
11+
`01-Oct-2026 <https://discuss.python.org/t/pep-818-adding-the-core-of-the-pyodide-foreign-function-interface-to-python-2/109311>`__
12+
1013

1114
Abstract
1215
========
@@ -62,10 +65,8 @@ supporting ``urllib3``, ``aiohttp``, and ``httpx`` requires the foreign function
6265
interface.
6366

6467
In order to keep the length of this PEP reasonable, we focus on the "core" of
65-
the foreign function interface. The following areas are left to future PEPs:
66-
67-
1. asyncio
68-
2. a JavaScript interface for managing the Python runtime
68+
the foreign function interface. The JavaScript interface for managing the Python
69+
runtime is left to a future PEP.
6970

7071

7172
Rationale
@@ -1545,6 +1546,28 @@ run on.
15451546
How to Teach This
15461547
=================
15471548

1549+
Pyodide has maintained a user guide for this foreign function interface for
1550+
several years, and the existing `Pyodide type translation documentation
1551+
<https://pyodide.org/en/stable/usage/type-conversions.html>`__ can be adapted to
1552+
form the basis of the CPython documentation.
1553+
1554+
We have substantial experience in teaching users how to use Pyodide and for the
1555+
most part they find it very intuitive. The main area that trips up users is
1556+
memory management of ``PyProxy`` objects. For this reason, we have taken special
1557+
care to design the memory management error messages to be actionable.
1558+
1559+
1560+
Change History
1561+
==============
1562+
1563+
- 30-Sept-2026
1564+
1565+
- Reduced the amount of detail in the specification section.
1566+
- Added support for proxying and conversion of buffers.
1567+
- Added asyncio support, including an event loop, conversion between Python
1568+
and JavaScript awaitables, and deferred destruction for arguments to an
1569+
asynchronous JavaScript function called from Python.
1570+
15481571

15491572
Reference Implementation
15501573
========================
@@ -1555,7 +1578,7 @@ Pyodide, https://github.com/hoodmane/cpython/tree/js-ffi
15551578
Acknowledgments
15561579
===============
15571580

1558-
Mike Droettboom, Roman Yurchak, Gyeongjae Choi, Andrea Giammarchi
1581+
Mike Droettboom, Roman Yurchak, Gyeongjae Choi, Andrea Giammarchi, and Thorsten Beier.
15591582

15601583
Copyright
15611584
=========

0 commit comments

Comments
 (0)