Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEP 674: Relationship with the HPy project #2247

Merged
merged 2 commits into from
Jan 18, 2022
Merged

PEP 674: Relationship with the HPy project #2247

merged 2 commits into from
Jan 18, 2022

Conversation

vstinner
Copy link
Member

No description provided.

pep-0674.rst Outdated Show resolved Hide resolved
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
@vstinner vstinner marked this pull request as ready for review January 18, 2022 07:50
@vstinner vstinner merged commit 6c4dd8a into python:main Jan 18, 2022
@vstinner vstinner deleted the pep674_hpy branch January 18, 2022 07:50
@vstinner
Copy link
Member Author

Simon Cross of HPy gave me +1 on IRC "on the section you linked" :-)

The HPy project
---------------

The hope with the HPy project is indeed to provide a C API that is close
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The hope with the HPy project is indeed to provide a C API that is close
The hope with the HPy project is to provide a C API that is close

---------------

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
to the original API to make porting easy and have it perform as close to
to the original APIto make porting easyand 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
details. To ensure this latter property is why the HPy project tries to
details. To ensure this latter property, the HPy project tries to

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for Python 3.8 and older). Porting numpy to HPy is expected to require
for Python 3.8 and older). The beginnings of the NumPy port to HPy already required

@vstinner
Copy link
Member Author

@timfel: I created #2249 since this PR is already merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants