[00:54:18] <lifeless> dstufft: is there an existing test that would be a good basis for copying and editing to make a functional test around setup-requires ?
[00:55:12] <dstufft> you're probably going to want one of the ones in functional/test_install.py
[01:30:53] <dstufft> and pip can install from Wheels without setuptools being present
[01:31:06] <dstufft> it's only when installing from an sdist that setuptools is required
[01:31:36] <tomprince> Sure, but this is for setup_requires, which seems to imply installing from sdist, hence depending on setuptools.
[01:31:56] <dstufft> yea, but it's a setup_requires that's in a setup.cfg, so it's a wholly new feature
[01:32:25] <dstufft> there's severeal hundred thousand sdists that don't have a setup.cfg that lists setuptools as a setup_requires
[01:36:06] <tomprince> I'm recalling <dstufft> But the ideal future is that pip itself no longer depends on setuptools, and for all th legacy stuff, pip just assumes the builder is ``setup.py install`` + setuptools in abscence of the sdist 2.0/wheel features that tells it to use something else, then end users won't even have to know setuptools exists, if pip needs it, it'll go out and get it, otherwise it won't, and if
[01:36:08] <tomprince> $RANDOMPACKAGE doesn't want to use setuptools, they don't have to
[01:38:06] <tomprince> It seems, if pip is handling setup_requires, that it should implictly add setuptools to it.
[01:38:20] <dstufft> pip isn't handling setup_requires across the board
[01:38:42] <dstufft> the feature lifeless is added is an opt in, per package where you can specify your setup_requires inside of a setup.cfg
[01:39:15] <dstufft> for every sdist that doesn't use the opt in feature lifeless is adding, we still need an error for not having setuptools
[01:39:40] <tomprince> Or, just implicitly install setuptools?
[01:40:12] <dstufft> It would be reasoanble for the "you need setuptools" error to be modified so it only occurs if there's not a setup.cfg with setup_requires" or an another change could implicit install setuptools though i'd rather that be in a different pull request
[01:46:11] <tomprince> I'm just imagining that, in the new codepath, instead of defaulting to an empty list with the setup.cfg's setup_requires, it is ['setuptools'] + setup.cfg's setup_requires.
[01:47:37] <tomprince> So, it simplifies the code slightly, in that it always runs, instead of being conditional.
[01:48:49] <dstufft> that could work, though it has the danger of forcing a setuptools upgrade of -U is used so we'd want to be careful about that
[01:49:47] <dstufft> IOW we wouldn't want the implicit setuptools requirement to cause setuptools to get reuqired because you did ``pip install -U thing-that-is-a-sdist``
[01:52:33] <dstufft> (that could be done by just conditionally adding the implicit setuptools to the list of things to be installed if it's not already installed)
[02:37:32] <dstufft> pip fundamentally works by first building up a list of everything it needs to install, and then, once that list is built, installing everything
[02:39:18] <dstufft> one of the reasons pip did that is because part of the problem with easy_install was that if you did ``easy_install foo`` it would start installing things before it had the entire dependency list, which meant if the install failed half way through you could easily end up in a half installed situation
[02:41:08] <lifeless> any single thing should be either fully installed or not (moduleo ctrl-C)
[02:41:20] <dstufft> lifeless: I think either it's going to need to install the new setup_requires into a temporary location (at least for executing egg_info itself) or it's going to need to insist that you specify the install_requires too. In both situations if we fail at any time during collection we've not installed anything new (or uninstalled anything)
[02:41:50] <dstufft> ontop of that you can potentionally add the setup_requires stuff into the global list of things to be installed
[02:42:01] <dstufft> so that they get installed into the non temporary location
[02:42:12] <lifeless> I think insisting both sets of reqs is probably cleanest
[02:42:23] <lifeless> we'll add setup_requires to be installed
[02:42:40] <lifeless> and have to take care to order the install
[02:43:08] <dstufft> but I think it's important that we do not install or uninstall anything from the target environment until we've collected the entire list of dependencies to install
[02:44:30] <lifeless> is line 447 where the install_requirements are added ?
[02:46:12] <dstufft> 447 is where it gets added to the list (actually a dictionary of package name: specifiers IIRC) of things to install, also 445 does it in another branch
[02:46:24] <dstufft> 444 is where it gets added to the list of things to process for further dependencies
[03:19:06] <lifeless> how would you feel about a hack-n-refactor patch to req_set.py as part of this
[03:19:23] <lifeless> since if X elif Y elif Z just cries out for an abstraction to me
[03:20:02] <dstufft> refactors are good, if possible trying to split them into their own patches is better. This code is not super well tested so there's an ihnereient risk to that sadly :/
[03:20:07] <dstufft> but yea it's real bad and needs a refactor
[23:01:14] <dstufft> yea, that's our hack to make it possible for distros to unbundle our bundled things without having to go through and change all the imports
[23:01:36] <dstufft> requests has the same thing now (taken from us, though I think sigmavirus24_awa has modified that and idk if that's been synced back to pip yet or not)
[23:01:43] <lifeless> ok, well I probably need to ping hpk and whinge
[23:01:51] <lifeless> since this seems entirely opaque and undiagnosable
[23:02:08] <dstufft> the failing to import __butilin__ might be similar to an issue that sigmavirus24_awa fixed in requests metapath hackery if that hasn't been brought back over to pip yet
[23:26:17] <lifeless> I like you knowing what I'm hacking on
[23:26:31] <dstufft> doing it has some problems with notifications which we've worked around on pip, but PRs are nice anyways since you can review the code before it's "done" easier
[23:32:14] <Wooble> (I mostly prefer it because I seem to mess up every PR I ever try to create :) )
[23:42:03] <lifeless> dstufft: so, just to get a taste - have a look at the pr diff
[23:43:45] <lifeless> dstufft: its a big diff because of the indent shift :(
[23:44:08] <lifeless> dstufft: but there's only one change in the indented code - accumulate to more_reqs and return that
[23:46:01] <lifeless> dstufft: also I'm going to keep a bunch of small commits - so if the little commits look good, I can split out targeted PR's for just the ones that are ready
[23:46:16] <lifeless> dstufft: e.g. if you like this unification of the iteration, I'll push that to a dedicated branch+PR now
[23:46:39] <lifeless> dstufft: I'd like to keep the aggregate pending work small