[04:27:40] <McSinyx[m]> hi, I'm just curious, why would the oldest numpy help?
[04:28:33] <McSinyx[m]> btw it'd be easier to debug if we know what's with the line errored out
[10:45:44] <PSFSlack> <deveshkusingh> As per https://github.com/numpy/numpy/pull/432 , this seems to have been fixed with newer versions of numpy
[14:05:33] <abadger1999> Hey, I've run across a problem with pip in software that we're packaging that I've heard has occurred with other projects before but I can't find an open issue... Just wanted to ask if anyone here knows about a prior issue before I open a new one.
[14:05:54] <abadger1999> The prior occurrence I know about is about docker and docker-py.
[14:06:26] <abadger1999> The one I'm dealing with now can reproduced by pip install ansible==2.9.10 ; pip install ansible==2.10.0a1
[14:07:06] <abadger1999> What's happening in both cases is that files are being moved around from one package to another.
[14:07:41] <abadger1999> And pip is running an uninstall of the old package after the new package is installed, so the install ends up in a broken state.
[14:08:21] <abadger1999> The ansible package case isn't obvious from just the pip install commands... Here's what's going on behind those two commands:
[14:10:16] <abadger1999> ansible-2.9.10 is a large package that's been split into two packages for ansible-2.10.0... one package is named ansible-base and contains the bin scripts (these are not entrypoints) and the library in site-packages/ansible. The other package retains the ansible package name and contains all of the addons to the ansible package. It has a requirement on the ansible-base package.
[14:11:09] <FFY00> and they both install to site-packages/ansible?
[14:11:47] <abadger1999> FFY00: No.... for the 2.10 packages, ansible-base installs to site-packages/ansible ; ansible installs the addons to site-package/ansible_collections/
[14:12:08] <abadger1999> FFY00: But the ansible-2.9.10 package does use site-package/ansible.
[14:12:17] <abadger1999> (which is where the bug lies)
[14:13:58] <abadger1999> So what's happening is that 2.9.10 owns site-packages/ansible and bin/ansible*. pip installs ansible-base which is the new dependency of ansible-2.10.0a1. ansible-base gets placed into site-packages/ansible and into bin/ansible*. Then pip installs ansible-2.10.0a1 and uninstalls ansible-2.9.10
[14:17:21] <abadger1999> the way the system package managers I know fix this is they know that some files are owned by multiple packages. So when the uninstall ansible-2.9.10 happens, the files owned by both the new ansible-base and the old ansible-2.9.10 will be left on the filesystem as there's still a package which owns them.
[14:19:39] <FFY00> if the same files are owned by both packages then this is a bug
[14:20:30] <abadger1999> They should be ownable by both packages during the pip "transaction" but the state after the transaction finishes should be that only one package owns them.
[14:21:36] <abadger1999> my definition of transaction here is roughly "while pip is handling install and erase of all the packages to install the package that the user requested on the cli"
[14:22:21] <FFY00> IMO if both packages own the same file pip should error out with file conflicts
[14:23:16] <abadger1999> (Tangent: system package managers allow multiple packages to own a file after the transaction finishes but only if both packages contain the exact same version of the file)
[14:23:39] <abadger1999> (Tangent: system package managers allow multiple packages to own a file after the transaction finishes but only if both packages contain the exact same version of the file)
[14:24:06] <abadger1999> FFY00: how would you do package splits and package renames, then?
[14:26:13] <FFY00> looks like we are missing a ansible-2.10.0b1, which should be compatible with ansible-base-2.10.0b1
[14:26:44] <abadger1999> I don't think that pacman would be able to handle package splits or package renames without this.... so if you can tell me how pacman does it, I can stand corrected ;-)
[14:26:59] <abadger1999> no.. ansible-2.10.0a1 and ansible-base-2.10.0b1 are compatible.
[14:32:26] <FFY00> anyway, I seems to be able to install both packages
[14:32:35] <FFY00> and they do not seem to have conflicts
[14:32:37] <abadger1999> FFY00: yes.... So the things to check...
[14:33:02] <FFY00> since ansible-base installs to ansible and ansible installs to ansible_collections
[14:33:13] <FFY00> so what is really the problem :D?
[14:33:40] <abadger1999> (1) did you install ansible==2.9.10 before insalling ansible==2.10.0a1 ? (2) When you try to use ansible, have some of the files been removed? (can you do bin/ansible --version ? Is there a site-packages/ansible/__init__.py ?)
[14:34:03] <abadger1999> pip installs the pacakges, but corrupts the installation.
[14:34:33] <abadger1999> When it removes ansible-2.9.10, it ends up removing files that are owned by ansible-base-2.10.0b1
[14:35:00] <abadger1999> (the files are owned by both that older version of ansible and the new version of ansible-base)
[14:38:12] <abadger1999> I saw that there's an Obsoletes-dist metadata tag in one of the packaging PEPs but pip doesn't do anything with that yet. (That might have helped here... Don't know without the pip implementation)
[14:38:31] <FFY00> ansible-base would require ansible>=2.10
[14:38:42] <FFY00> that should make pip behave properly
[14:39:14] <FFY00> it would make sure you don't install ansible-base with an older ansible version
[14:39:17] <abadger1999> <nod> Yeah... Our purpose in splitting the packages, though, was to allow people to just install ansible-base if that's all they need in their environment.
[14:39:52] <FFY00> unfortunately I am not seeing any other solution :(
[14:40:09] <abadger1999> Okay, well, I'll open a pip bug and we'll do the documentation thing.... I just wanted to see if anyone knew of an existing bug before I did that.
[14:40:24] <FFY00> I would definitely open a bug in pip if it is not preventing you from installing packages with file conflicts
[14:40:39] <abadger1999> (docker and coker-py ran into this before so I would have thought there was a pip bug but I couldn't come up with any search terms that found one)
[14:50:10] <FFY00> abadger1999, this is a bit unrelated but I would recommend you to also upload wheels, instead of just sdists (tarballs)
[14:52:20] <FFY00> well, actually I think it might be worth trying to install via wheels, since they contain a file list and pip might be checking that
[14:52:53] <FFY00> if pip just does setup.py install, it had no information about what files will be installed
[15:07:27] <abadger1999> FFY00: I can do that for the ansible-2.10.x package but I can't for the ansible-2.9.x or the ansible-base-2.10.x package (which is where the problem is occuring :-(
[15:08:08] <FFY00> well, you can still upload right now
[15:08:23] <abadger1999> FFY00: Those packages need to install symlinks which setuptools and pip don't yet understand so they use scripted code in setup.py to achieve that.
[15:08:45] <FFY00> if I am correct, installing wheels in 2.10 should be enough