aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2022-11-21 11:39:47 +0200
committerMatti Picus <matti.picus@gmail.com>2022-11-21 11:39:47 +0200
commit55c65ec03f5d70ce1f4419b7c55ae8769729ffa6 (patch)
tree3fec478cad88e3daa52bcd716463aa8cc48e031c
parentfix more places where generic_cpy_call can leak memory on error, cleanup imports (diff)
parentupdate release note (diff)
downloadpypy-55c65ec03f5d70ce1f4419b7c55ae8769729ffa6.tar.gz
pypy-55c65ec03f5d70ce1f4419b7c55ae8769729ffa6.tar.bz2
pypy-55c65ec03f5d70ce1f4419b7c55ae8769729ffa6.zip
merge default
-rw-r--r--pypy/doc/architecture.rst2
-rw-r--r--pypy/doc/cpython_differences.rst33
-rw-r--r--pypy/doc/project-ideas.rst4
-rw-r--r--pypy/doc/pypy.h.rst2
-rw-r--r--pypy/doc/release-v7.3.10.rst7
-rw-r--r--pypy/doc/release-v7.3.9.rst4
6 files changed, 43 insertions, 9 deletions
diff --git a/pypy/doc/architecture.rst b/pypy/doc/architecture.rst
index dd1571f7c5..c820db2413 100644
--- a/pypy/doc/architecture.rst
+++ b/pypy/doc/architecture.rst
@@ -1,7 +1,7 @@
Goals and Architecture Overview
===============================
-.. contents::
+.. _contents:
This document gives an overview of the goals and architecture of PyPy. If you're
interested in :ref:`using PyPy <using-pypy>` or hacking on it,
diff --git a/pypy/doc/cpython_differences.rst b/pypy/doc/cpython_differences.rst
index 7b54bce7f5..bda63eb126 100644
--- a/pypy/doc/cpython_differences.rst
+++ b/pypy/doc/cpython_differences.rst
@@ -296,6 +296,33 @@ that there is a total order on floats, but that is wrong for NaNs).
.. __: https://foss.heptapod.net/pypy/pypy/issue/1974/different-behaviour-for-collections-of
+Permitted ABI tags in extensions
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+CPython supports the limited C-API with modules that have an ``abi3`` ABI tag,
+and will also import extension modules with no ABI or platform tags. This can
+be seen by comparing ``_imp.extension_suffix()`` calls (on Python3.9, x86_64,
+linux):
+
+========== ===================================== ==============
+python _imp.extension_suffixes() notes
+========== ===================================== ==============
+cpython3.9 [".cpython-39-x86_64-linux-gnu.so", normal [#f1]_
+.. ".abi3.so", limited C-API
+.. ".so"] bare extension
+pypy3.9 ['.pypy39-pp73-x86_64-linux-gnu.so'] normal [#f1]_
+========== ===================================== ==============
+
+.. rubric:: Footnotes
+
+.. [#f1] normal extensions use <python-tag>-<abi-tag>-<platform-tag>
+
+CMake will `support the correct suffix`_ for PyPy3.9 in release 3.26, scheduled for early 2023
+
+.. _support the correct suffix: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7917
+
+.. _cpyext:
+
C-API Differences
-----------------
@@ -316,6 +343,12 @@ on CPython will result in the old function being called for ``x.__int__()``
(via slot lookup). On PyPy we will always call the __new__ function, not the
old, this quirky behaviour is unfortunately necessary to fully support NumPy.
+The cpyext layer `adds complexity`_ and is slow. If possible, use cffi_ or HPy_.
+
+.. _adds complexity: https://www.pypy.org/posts/2018/09/inside-cpyext-why-emulating-cpython-c-8083064623681286567.html
+.. _cffi: https://cffi.readthedocs.io/en/latest/
+.. _HPy: https://hpyproject.org/
+
Performance Differences
-------------------------
diff --git a/pypy/doc/project-ideas.rst b/pypy/doc/project-ideas.rst
index e328d0d3fd..b81a93b63f 100644
--- a/pypy/doc/project-ideas.rst
+++ b/pypy/doc/project-ideas.rst
@@ -307,7 +307,3 @@ good work that needs to be finished:
**pygame** https://github.com/CTPUG/pygame_cffi
Status: Last release was in 2017
-
-Work has begun on HPy_ to enable a faster C-API.
-
-.. _HPy: https://hpy.readthedocs.io/en/latest/
diff --git a/pypy/doc/pypy.h.rst b/pypy/doc/pypy.h.rst
index 64e2976261..4a479def49 100644
--- a/pypy/doc/pypy.h.rst
+++ b/pypy/doc/pypy.h.rst
@@ -1,3 +1,5 @@
+:orphan:
+
.. code-block:: c
#ifndef _PYPY_H_
diff --git a/pypy/doc/release-v7.3.10.rst b/pypy/doc/release-v7.3.10.rst
index 053ff73a7e..492a564f88 100644
--- a/pypy/doc/release-v7.3.10.rst
+++ b/pypy/doc/release-v7.3.10.rst
@@ -3,7 +3,7 @@ PyPy v7.3.10: release of python 2.7, 3.8, and 3.9
=================================================
..
- Changelog up to commit 8841aa1c9a3e
+ Changelog up to commit 2f756054f919
.. note::
This is a pre-release announcement. When the release actually happens, it
@@ -256,8 +256,8 @@ Speedups and enhancements shared across versions
C-API (cpyext) and C-extensions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-We are no longer backporting changes to the ``cpyext`` compatibility layer to
-PyPy2.7.
+- Make sure ``decref`` is being called even if a c-level call raises an
+ exception (issue 3854_)
Python 3.8+
-----------
@@ -406,6 +406,7 @@ Python 3.9+ C-API
.. _3746: https://foss.heptapod.net/pypy/pypy/-/issues/3746
.. _3669: https://foss.heptapod.net/pypy/pypy/-/issues/3669
.. _3845: https://foss.heptapod.net/pypy/pypy/-/issues/3845
+.. _3854: https://foss.heptapod.net/pypy/pypy/-/issues/3854
.. _bpo34953: https://bugs.python.org/issue34953
.. _cpython-91851: https://github.com/python/cpython/issues/91851
.. _cpython-97514: https://github.com/python/cpython/issues/97514
diff --git a/pypy/doc/release-v7.3.9.rst b/pypy/doc/release-v7.3.9.rst
index 7068f0c0fe..47820a5190 100644
--- a/pypy/doc/release-v7.3.9.rst
+++ b/pypy/doc/release-v7.3.9.rst
@@ -135,7 +135,7 @@ Python 3.8+ C-API (cpyext) fixes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Fix overflow return value in ``PyNumber_AsSsize_t`` on windows
- Adopted `PEP 3123`_ declarations to avoid `-Wstrict-aliasing` compiler
- warnings
+ warnings (issue 3706_)
- Allocate a ``wrapperbase`` struct and assign it to ``d_base`` of
``PyWrapperDescrObject``
@@ -155,6 +155,8 @@ Python 3.9+ fixes
.. _3703: https://foss.heptapod.net/pypy/pypy/-/issues/3703
.. _3714: https://foss.heptapod.net/pypy/pypy/-/issues/3714
.. _3649: https://foss.heptapod.net/pypy/pypy/-/issues/3649
+.. _3706: https://foss.heptapod.net/pypy/pypy/-/issues/3706
.. _bpo35545: https://bugs.python.org/issue35545
.. _errcheck: https://docs.python.org/3/library/ctypes.html#ctypes._FuncPtr.errcheck
.. _`speed regression`: https://foss.heptapod.net/pypy/pypy/-/issues/3649
+.. _PEP 3123: https://peps.python.org/pep-3123/