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 │
⠈⠳⣄⠀⠀⠀⠀ ╰────────────────────────────────────────────────────╯
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEmwPruYMA35fCsSO/zIxr3RQD9MoFAmbZsKAACgkQzIxr3RQD 9Mrn8RAAmCBilUkrHn0HvnZzZFUoi87DkLneOgvnsDSXTACzx8qm3sCyANOhR+iy Ck36stuLn/5n2NkF2JHg9kzezeLf4u7r1ujgiSuLqemN3uUrQfdTIwlFIC6XJtxX TrEE99CwnGm1jfwnJAVcHrggx8MMBsqbyd4zQ8o5EfhKgoHzv5+FiU86QWnc+Fa1 JAMePcjCLP8t3/8az/1113qe5p1DiA8n1+ISlBjCXCwd47pYrnvq9xAGg7gSxRkX dkLwNXUyCV5/eIr6/ZaxLDa7k9rkOlHUZ+wbHHVqpR8s1E885gYUjqVNHURgwORZ 8nlJAUG1BANwNgAcCJ9U/RkdoXOv2fP7HkE2Wsf3LVq