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


Groups > linux.debian.maint.python > #16254

Upcoming NumPy 2.x transition

Path csiph.com!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Timo Röhling <roehling@debian.org>
Newsgroups linux.debian.maint.python
Subject Upcoming NumPy 2.x transition
Date Thu, 05 Sep 2024 15:30:01 +0200
Message-ID <JjkIF-a8tL-7@gated-at.bofh.it> (permalink)
X-Mailbox-Line From debian-python-request@lists.debian.org Thu Sep 5 13:23:00 2024
Old-Return-Path <roehling@debian.org>
X-Amavis-Spam-Status No, score=-111.301 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, BODY_8BITS=1.5, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FOURLA=0.1, LDO_WHITELIST=-5, PGPSIGNATURE=-5, RCVD_IN_DNSWL_MED=-2.3, SARE_MSGID_LONG45=0.893, SARE_MSGID_LONG50=0.726, T_SCC_BODY_TEXT_LINE=-0.01, UNPARSEABLE_RELAY=0.001, USER_IN_DKIM_WELCOMELIST=-0.01, USER_IN_DKIM_WHITELIST=-100] autolearn=ham autolearn_force=no
Mail-Followup-To debian-python@lists.debian.org, debian-science@lists.debian.org
Organization The Debian Project
MIME-Version 1.0
Content-Type multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="7oowxkci2gszf33q"
Content-Disposition inline
X-Debian-User roehling
X-Mailing-List <debian-python@lists.debian.org> archive/latest/22307
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/6nlv2ymp35jdbfawznn2jo7umbciiha3i7emuzdu5iuvxwfsfu@efge5orl45bg
Approved robomod@news.nic.it
Lines 98
Sender robomod@news.nic.it
X-Original-Cc debian-science@lists.debian.org
X-Original-Date Thu, 5 Sep 2024 15:22:41 +0200
X-Original-Message-ID <6nlv2ymp35jdbfawznn2jo7umbciiha3i7emuzdu5iuvxwfsfu@efge5orl45bg>
Xref csiph.com linux.debian.maint.python:16254

Show key headers only | View raw


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

Dear fellow Debian Python and Science maintainers,


I am pleased to announce that I am almost ready to start the
transition to NumPy 2. A preliminary release of NumPy 2.1.0 is in 
experimental already, I'm just waiting for the resolution of 
#1076236 [1] and the necessary NEW roundtrip before I request a 
transition slot from the Release Team for the required rebuild of 
all binary extensions.

[1] https://bugs.debian.org/1076236

I have a few remarks for the maintainers of NumPy reverse 
dependencies; everyone else feel free to skip the rest of this 
email.

a) I expect that many upstream releases are NumPy 2 ready at this 
point, but needless to say, the major version bump comes with 
extensive cleanup of legacy APIs. Old stuff might break.

b) For binary Python extensions, the NumPy developers have reset the 
ABI counter: the latest NumPy 1 ABI 9 is succeeded by NumPy 2 ABI 0. 
This is reflected in a new virtual package name, python3-numpy2-abi0 
(note the additional "2" in the name). The API counter, on the other 
hand, has not been reset and just bumped to 19.

c) Speaking of ABI breakage, while binary extensions built against 
NumPy 1.x will not work with NumPy 2, everything rebuilt against 
NumPy 2 is currently binary compatible with NumPy 1.25 and newer. 
Therefore, ${numpy3:Depends} will usually resolve to 
"python3-numpy2-abi0 | python3-numpy-abi9" for binary extensions.

d) Related to the previous point, I deliberately dropped the 
constraint "python3-numpy (>= min-api-version)" for binary 
extensions. In my experience, the C API version has very little 
bearing on whether or not a module can be imported with a particular 
NumPy version; in fact, arch:all packages never had a version 
restriction for "python3-numpy" despite the Python API being much 
more exposed than the C API. As corroborating evidence, the SciPy 
1.13.1-5 package rebuilt against NumPy 2 still passes its test suite 
with the trixie autopkgtest and NumPy 1. Nevertheless, dh_numpy3 in 
strict mode will continue to add a dependency for the current API 
version, and you can always add an explicit versioned dependency on 
"python3-numpy" to your binary package if need be.


Cheers
Timo

-- 
⢀⣴⠾⠻⢶⣦⠀   ╭────────────────────────────────────────────────────╮
⣾⠁⢠⠒⠀⣿⡁   │ Timo Röhling                                       │
⢿⡄⠘⠷⠚⠋⠀   │ 9B03 EBB9 8300 DF97 C2B1  23BF CC8C 6BDD 1403 F4CA │
⠈⠳⣄⠀⠀⠀⠀   ╰────────────────────────────────────────────────────╯

Back to linux.debian.maint.python | Previous | Next | Find similar | Unroll thread


Thread

Upcoming NumPy 2.x transition Timo Röhling <roehling@debian.org> - 2024-09-05 15:30 +0200

csiph-web