Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #9121 > unrolled thread

PEP 384 (limited ABI)

Started byDmitry Shachnev <mitya57@debian.org>
First post2016-12-31 17:10 +0100
Last post2017-01-06 22:40 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.debian.maint.python


Contents

  PEP 384 (limited ABI) Dmitry Shachnev <mitya57@debian.org> - 2016-12-31 17:10 +0100
    Re: PEP 384 (limited ABI) Stefano Rivera <stefanor@debian.org> - 2016-12-31 19:00 +0100
      Re: PEP 384 (limited ABI) Dmitry Shachnev <mitya57@debian.org> - 2017-01-01 20:40 +0100
        Re: PEP 384 (limited ABI) Dmitry Shachnev <mitya57@debian.org> - 2017-01-06 22:40 +0100

#9121 — PEP 384 (limited ABI)

FromDmitry Shachnev <mitya57@debian.org>
Date2016-12-31 17:10 +0100
SubjectPEP 384 (limited ABI)
Message-ID<sUuoh-58u-9@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Hi all, and happy holidays!

The new releases of SIP and PyQt are using the limited set of Python ABI [1]
defined in PEP 384 [2], so that the same .so files work with different Python
versions.

As there seems to be no PEP 384 support in dh_python3, I wonder if I should:

A) Build with only one Python 3 version and install the .so files with
   foo.abi3.so filenames (so no rebuilds will be needed for Python updates);
B) Do not change anything: build for all supported Python 3 versions and
   let dh_python3 rename the files;
C) Anything else?

I could not find any discussion of this PEP in Debian except a couple of
messages from 2010 [3].

[1]: https://www.riverbankcomputing.com/news/sip-419
[2]: https://www.python.org/dev/peps/pep-0384/
[3]: https://lists.debian.org/debian-python/2010/05/msg00103.html

--
Dmitry Shachnev

[toc] | [next] | [standalone]


#9122

FromStefano Rivera <stefanor@debian.org>
Date2016-12-31 19:00 +0100
Message-ID<sUw6K-60Z-9@gated-at.bofh.it>
In reply to#9121
Hi Dmitry (2016.12.31_18:07:17_+0200)

cffi modules will also now use the limited ABI, where possible, so I've
played with them a bit.

> A) Build with only one Python 3 version and install the .so files with
>    foo.abi3.so filenames (so no rebuilds will be needed for Python updates);

I think dh_python3 already has the necessary support for that.

Just one thing to watch out for: python3-dbg builds will also use
abi3.so, but aren't actually compatible.

https://bugs.python.org/issue28401

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  +1 415 683 3272

[toc] | [prev] | [next] | [standalone]


#9123

FromDmitry Shachnev <mitya57@debian.org>
Date2017-01-01 20:40 +0100
Message-ID<sUU93-4tl-11@gated-at.bofh.it>
In reply to#9122

[Multipart message — attachments visible in raw view] — view raw

Hi Stefano!

On Sat, Dec 31, 2016 at 07:42:39PM +0200, Stefano Rivera wrote:
> cffi modules will also now use the limited ABI, where possible, so I've
> played with them a bit.
>
> > A) Build with only one Python 3 version and install the .so files with
> >    foo.abi3.so filenames (so no rebuilds will be needed for Python updates);
>
> I think dh_python3 already has the necessary support for that.

I don’t see any mentions of this in dh-python code, apart from the tests…

Also, I think there is no (easy) way for dh_python3 to detect whether a built
.so file is using the limited ABI, so the renaming should be done manually.

> Just one thing to watch out for: python3-dbg builds will also use
> abi3.so, but aren't actually compatible.
>
> https://bugs.python.org/issue28401

Thanks for the link!

So, the debug interpreter tries to load the extensions from files prefixed
with abi3, but is not really compatible with abi3? That looks like upstream
bug…

If the debug interpreters do not support normal abi3, maybe we can have
another prefix for them, like abi3d?

Building for one normal interpreter and for all debug interpreters looks a
bit inconsistent to me (especially for PyQt where the build takes quite a
long time).

--
Dmitry Shachnev

[toc] | [prev] | [next] | [standalone]


#9143

FromDmitry Shachnev <mitya57@debian.org>
Date2017-01-06 22:40 +0100
Message-ID<sWKoV-7NO-17@gated-at.bofh.it>
In reply to#9123

[Multipart message — attachments visible in raw view] — view raw

On Sun, Jan 01, 2017 at 10:31:56PM +0300, Dmitry Shachnev wrote:
> If the debug interpreters do not support normal abi3, maybe we can have
> another prefix for them, like abi3d?

It looks like I got it wrong, and there is no such thing as limited API/ABI
for debug interpreters:

/usr/include/python3.5dm/object.h:65:2: error:
 #error Py_LIMITED_API is incompatible with Py_DEBUG, Py_TRACE_REFS, and Py_REF_DEBUG

So if a package is building extensions for debug interpreters, rebuilds for
new Python versions will be still needed.

--
Dmitry Shachnev

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web