guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [core-updates-frozen] Different variants of Python packages in the s


From: Ricardo Wurmus
Subject: Re: [core-updates-frozen] Different variants of Python packages in the same profile?
Date: Sun, 21 Nov 2021 19:02:39 +0000
User-agent: mu4e 1.6.6; emacs 27.2


Lars-Dominik Braun <lars@6xq.net> writes:

Hello Ricardo,

So… since numpy 1.20 is the exception here, could we perhaps … rename it? And then have python-numba import that renamed module “totally-not-numpy” instead of “numpy”? Could we thus avoid this conflict? If renaming is an option — how would it be done? Is it enough to rename the “numpy” directory with “numpy-1.20”, the “numpy.py” file with “numpy-1.20.py”, and then update all “import” statements both by numpy itself and by python-numba?
I feel this is a dangerous idea. Python is dynamically typed and if we – somehow – end up with objects from both, numpy 1.20 and numpy 1.21 in the same program, which can still happen when renaming, things may go wrong very badly. [1] says versions 1.* are ABI compatible, but the API changes between releases, which is probably why numba cannot be used
with a newer numpy.

Can we rewrite the entire graph to use numpy 1.20 whenever a package
imports numba?

After a quick discussion on IRC we decided to make 1.20 the default and keep 1.21 as python-numpy-next. Let’s hope we can switch to 1.21 for good soon.

--
Ricardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]