PEP 674: Address Tim Felgentreff's review (#2249)

This commit is contained in:
Victor Stinner 2022-01-19 11:22:37 +01:00 committed by GitHub
parent 4a3a9932cb
commit 8388db260f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -290,12 +290,12 @@ Relationship with the HPy project
The HPy project
---------------
The hope with the HPy project is indeed to provide a C API that is close
to the original API to make porting easy and have it perform as close to
The hope with the HPy project is to provide a C API that is close
to the original API—to make porting easy—and have it perform as close to
the existing API as possible. At the same time, HPy is sufficently
removed to be a good "C extension API" (as opposed to a stable subset of
the CPython implementation API) that does not leak implementation
details. To ensure this latter property is why the HPy project tries to
details. To ensure this latter property, the HPy project tries to
develop everything in parallel for CPython, PyPy, and GraalVM Python.
HPy is still evolving very fast. Issues are still being solved while
@ -335,11 +335,11 @@ which is clearily identified as causing practical issues: macros used as
l-values. This PEP only requires to update a minority of C extensions,
and usually only a few lines need to be changed in impacted extensions.
For example, numpy 1.22 is made of 307,300 lines of C code, and adapting
numpy to the this PEP only modified 11 lines (use Py_SET_TYPE and
For example, NumPy 1.22 is made of 307,300 lines of C code, and adapting
NumPy to the this PEP only modified 11 lines (use Py_SET_TYPE and
Py_SET_SIZE) and adding 4 lines (to define Py_SET_TYPE and Py_SET_SIZE
for Python 3.8 and older). Porting numpy to HPy is expected to require
modifying more lines than that.
for Python 3.8 and older). The beginnings of the NumPy port to HPy
already required modifying more lines than that.
Right now, it's hard to bet which approach is the best: fixing the
current C API, or focusing on HPy. It would be risky to only focus on