[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: |
Lars-Dominik Braun |
Subject: |
Re: [core-updates-frozen] Different variants of Python packages in the same profile? |
Date: |
Sun, 21 Nov 2021 09:51:09 +0100 |
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?
Cheers,
Lars
[1] https://numpy.org/devdocs/user/depending_on_numpy.html