PMXBOT Log file Viewer

Help | Karma | Search:

#pypa-dev logs for Thursday the 19th of March, 2015

(Back to #pypa-dev overview) (Back to channel listing) (Animate logs)
[00:22:55] <dstufft> lifeless: sorry was picking up my dog from the groomer
[00:33:45] <dstufft> trying to figure out the best way for me to review this refactor, this code is fiddly and the (reasonable) indentation change makes it slightly harder, maybe I'll fake a commit locally that reindents it with a no-op loop
[00:49:17] <dstufft> hey
[00:49:19] <dstufft> that worked
[00:52:34] <dstufft> lifeless: Ok, so reviewing locally, the changes you've got so far look good to me
[01:18:58] <lifeless> dstufft: should I make them a non-WIP PR?
[01:19:08] <lifeless> dstufft: (or do you want to just pull + push them yourself?)
[01:19:22] <dstufft> lifeless: you have a PEP8 error, but I can just merge it locally and fix that
[01:19:25] <lifeless> I'm currently poking around the next reshape in this area
[01:19:54] <dstufft> once the other tests pass, I had to restart some jobs because lolnetworks
[01:21:49] <lifeless> f*ing PEP8 line limits
[01:22:15] <lifeless> dstufft: fixed and pushed
[01:26:35] <dstufft> lifeless: ok, I merged it locally, just waiting on tests to pass before I push it up
[01:44:35] <lifeless> dstufft: q
[01:44:42] <lifeless> dstufft: req_set line 244 (in my patch)
[01:44:52] <lifeless> dstufft: should that check be present in line 179 as well - in locate_file
[01:45:48] <lifeless> e.g. locate_files looks to me like it should be doing 'if self.update or self.force_reinstall
[01:46:48] <lifeless> right now as I read it pip install --no-download --force-reinstall foo bar baz
[01:46:59] <lifeless> will be surprising
[01:47:51] <lifeless> yup
[01:47:52] <lifeless> pip install --force-reinstall --no-download linecache2
[01:47:52] <lifeless> Requirement already satisfied (use --upgrade to upgrade): linecache2 in ./.virtualenvs/test/lib/python2.6/site-packages
[01:47:55] <lifeless> Cleaning up...
[01:48:14] <lifeless> hah
[01:48:21] <lifeless> pip install --force-reinstall linecache2
[01:48:21] <lifeless> Requirement already satisfied (use --upgrade to upgrade): linecache2 in ./.virtualenvs/test/lib/python2.6/site-packages
[01:48:21] <lifeless> Cleaning up...
[01:48:27] <dstufft> --force-reinstall only works with -U
[01:48:28] <lifeless> ^ this is not what I'd expect to happen :)
[01:48:34] <dstufft> (it's not a good UI)
[01:49:05] <dstufft> what you're looking at is a recent change which was designed to make it so pip install foo==1.0 didn't hit PyPI if foo 1.0 was already installed
[01:49:39] <dstufft> it sounds like maybe there's still edge cases that we need to work out with that PR
[01:49:52] <dstufft> er
[01:49:55] <dstufft> I misread that actually
[01:50:08] <dstufft> you were always using --force-reinstall without -U
[01:50:14] <lifeless> I did in those examples
[01:50:23] <lifeless> then I tried -U --force-reinstall --download-only
[01:50:33] <lifeless> followed by -U --force-reinstall --no-download
[01:50:38] <lifeless> erm, --no-install in the first one
[01:50:45] <lifeless> anyhow, it installed it
[01:50:59] <lifeless> I think it works because -U implies --force-reinstall essentially
[01:51:22] <lifeless> I was asking because it was an opportunity to converge locate and prepare
[01:51:47] <dstufft> -U doesn't imply --force-reinstall, -U on it's own won't uninstall + install something, it'll see the version we've discovered is already installed and skip it
[01:52:32] <lifeless> sorry, bad phrasing
[01:52:34] <lifeless> I know that
[01:52:42] <lifeless> I meant the other way around
[01:53:09] <lifeless> and that from a code perspective, a check for -U will always pass where a check for force-reinstall might also be done, pragmatically speaking
[01:53:24] <lifeless> (in terms of assessing whethe rforce-reinstall works for a use case)
[01:53:32] <lifeless> I'm explaining my mental state badly, I'm sure
[01:53:57] <dstufft> ah, --force-reinstall is actually just a no-op if you don't have -U
[01:54:33] <lifeless> right
[01:54:51] <lifeless> its guarded by some self.upgrade checks
[01:54:54] <dstufft> yea
[01:55:03] <dstufft> I think I'm confused about what you're asking
[01:55:22] <lifeless> nvm :)
[01:55:30] <dstufft> ok!
[01:55:36] <lifeless> I'm starting at locate_file
[01:55:44] <lifeless> trying to make it a special case of prepare_file
[01:55:58] <lifeless> or rather some common frobnicate_file
[01:56:07] <dstufft> ah
[01:56:08] <dstufft> I see
[01:56:08] <lifeless> and so questioning all the deltas
[01:56:19] <lifeless> the coarse ones - go download stuff - are obvious
[01:56:24] <lifeless> this one isn't
[01:56:26] <dstufft> I'm not actually sure where locate_file is actually used offhand
[01:56:34] <lifeless> --no-download
[01:56:43] <dstufft> ah
[01:56:59] <lifeless> so one option I'm considering
[01:57:09] <lifeless> is passing a 'download_allowed' boolean into prepare
[01:57:17] <lifeless> and making the 'this bit downloads' calls be guarded.
[01:57:21] <dstufft> I wouldn't actually bother doing that then
[01:57:25] <dstufft> --no-download is deprecated
[01:57:30] <dstufft> it's going to be removed
[01:57:38] <lifeless> oh?
[01:58:38] <dstufft> the workflow for --no-download was: "first do pip install --no-install ..." which will download the thing, and compile it in a staticly named temporary directory, then copy that temp dir onto your prod machines and do ``pip install --no-download ...`` which will "finish" the install
[01:58:49] <dstufft> it was basically a terrible hack that only exists because we didn't have a binary format
[01:59:17] <lifeless> ok
[01:59:25] <lifeless> so should it actually issue a deprecation warning?
[01:59:30] <dstufft> pip 7 I think is when that's scheduled for removal
[01:59:33] <lifeless> cause none is visible in the UI
[01:59:36] <dstufft> hm
[01:59:42] <dstufft> I thought the deprecation warning was in the installc ommand
[01:59:56] <dstufft> yea
[02:00:01] <dstufft> line 209 of pip/commands/install.py
[02:00:04] <lifeless> neither pip install --no-install nor pip install --no-download
[02:00:30] <lifeless> its not showing in the UI
[02:00:41] <lifeless> ah old pip in my test. sec
[02:01:28] <lifeless> thats better
[02:01:50] <dstufft> so yea, I wouldn't worry much about trying to consoldate those
[02:02:09] <lifeless> and yes I found a break
[02:02:11] <lifeless> http://paste.openstack.org/show/193350/
[02:02:26] <dstufft> yea Ijust noticed that too lol
[02:02:54] <dstufft> it doesn't work with wheels
[02:02:54] <lifeless> so I'll leave locate alone now
[02:03:11] <dstufft> yea that seems reasonable
[02:03:20] <dstufft> maybe a comment that def locate_files can be removed in pip 7
[02:03:24] <lifeless> yeah
[02:03:36] <dstufft> so we don't forget to delete it when we kill the options since that's it's only purpose
[02:04:21] <lifeless> pip/commands/install.py l 344 is where its called from - only site
[02:04:30] <lifeless> added a comment to it and to the call site
[02:05:19] <dstufft> lifeless: ^ merged the refactors you did so far
[02:06:00] <lifeless> cool
[02:09:54] <dstufft> ah, you'll probably need another PR, I guess github closed that one
[02:26:25] <lifeless> dstufft: things guarded by is_download can become unconditional in 7 too, right?
[02:27:14] <dstufft> No I don't think so
[02:27:18] <dstufft> I think that's for pip install --download
[02:27:42] <dstufft> which isn't deprecated, that's just the "I want to download the files without installing it" case
[02:28:05] <lifeless> ah, not == --no-install. maddeningly
[02:38:30] <sigmavirus24> lifeless: you still around?
[02:38:45] <lifeless> yes
[02:39:18] <sigmavirus24> dstufft: we were having problems where people were using requests in `python setup.py test` what was happening was that our modifications to sys.meta_path were lingering even though the module (requests and the vendored packages) had been gc'd
[02:39:33] <sigmavirus24> That tends to come back as an attribute error though in so much as NoneType not having an attribute "X"
[02:39:52] <sigmavirus24> Not being able to import some module sounds like the fix that I made to both pip and requests which is a bit more complicated to explain
[02:40:37] <sigmavirus24> What was happening was that a deferred import was happening on py2.x and was being executed as an implicit relative import so people were seeing errors as "failed to import requests.packages.chardet.sys"
[02:41:22] <sigmavirus24> That's fixed in both pip and requests in so much as the VendorAlias now properly knows what modules have been vendored (explicitly) and knows how to say "the import you're looking for needs to be provided by something else"
[02:41:24] <lifeless> sigmavirus24: if you want to poke around, I can give you reproduction instructions
[02:41:41] <sigmavirus24> lifeless: sure. I just read far enough back to get a gist of the conversation
[02:41:48] <sigmavirus24> I'm not entirely clear how __builtins__ is failing
[02:42:00] <dstufft> I managed to trick sigmavirus24 into maintaining my horrible import hack code
[02:42:01] <dstufft> impressive
[02:42:12] <sigmavirus24> dstufft: doesn't take much
[02:42:17] <dstufft> "just put this in requests, it'll be fiiiine"
[02:42:32] <sigmavirus24> one of my coworkers was complaining about something in neutron tonight and I kept itching to pull out my laptop at the bar and look into it
[02:42:51] <sigmavirus24> dstufft: this is why I work so passionately on urllib3 and maintain chardet
[02:43:01] <sigmavirus24> requests depends on it? well someone has to make it work
[02:43:10] <sigmavirus24> not that chardet is good
[02:43:11] <dstufft> sigmavirus24: so all I need is to bundle pip inside of requests
[02:43:12] <sigmavirus24> just that it works
[02:43:17] <sigmavirus24> dstufft: turtles
[02:43:32] <lifeless> sigmavirus24: sec, let me make an issue
[02:44:12] <sigmavirus24> lifeless: while we're here, question for you. Does testr always import all of the discoverable test modules even if you specify a specific one?
[02:44:49] <lifeless> sigmavirus24: https://github.com/pypa/pip/issues/2574
[02:45:55] <lifeless> sigmavirus24: testr doesn't import anything. "python -m subunit.run discover ... --load-list X" does unit test upstream discovery, and then filters the result down by the list (set intersection)
[02:46:05] <lifeless> sigmavirus24: so yes, if you have many thousands of packages, this can be slow
[02:46:11] <lifeless> s/packages/modules/
[02:46:17] <sigmavirus24> lifeless: no it explains behaviour I was seeing
[02:46:28] <sigmavirus24> And I figured it out simply by backwards engineering the behaviour =P
[02:46:38] <sigmavirus24> And now I'm kind of happy I guess semi-correctly
[02:46:43] <lifeless> sigmavirus24: what behaviour were you seeing ?
[02:47:04] <sigmavirus24> A difference between python setup.py testr {args} (roughly) and python -m testtools.run {args}
[02:47:18] <sigmavirus24> so the graduation to oslo.log made debugging into tests in glance impossible for reasons
[02:47:26] <lifeless> oh, python setup.py testr is fugly, I hates it.
[02:47:33] <sigmavirus24> mostly it's glance's fault, but testr was working fine and testtools.run was failing hard
[02:47:35] <lifeless> just use testr directly ffs :)
[02:47:39] <sigmavirus24> lol
[02:47:45] <sigmavirus24> tox.ini, tox.ini
[02:47:53] <lifeless> nah
[02:47:59] <lifeless> testr is more meta than tox
[02:48:11] <lifeless> We need to namespace the DB a little
[02:48:22] <lifeless> then we can run all the tox things in parallel feeding into one testr DB
[02:48:30] <lifeless> and report on failures per environment etc
[02:49:58] <sigmavirus24> so looking at this issue on pip I'm thoroughly confused
[02:50:06] <sigmavirus24> stupid question, but you're developing against master right?
[02:50:11] <dstufft> develop*
[02:50:14] <dstufft> master is stable
[02:50:40] <lifeless> develop :)
[02:51:45] <sigmavirus24> er right
[02:51:55] <sigmavirus24> uh be back in a few. impromptu meeting in the hotel lobby
[02:52:03] <lifeless> so that should cause the same issue for you
[02:52:06] <sigmavirus24> this looks related to what I thought I fixed
[02:52:11] <sigmavirus24> yeah it should
[02:52:30] <lifeless> I'm actually running a slightly different command
[02:52:33] <lifeless> 3 hosts
[02:52:35] <lifeless> many more cores
[02:52:54] <lifeless> but that trivial case fails as per the paste, so sufficient to show the issue
[02:55:12] <lifeless> dstufft: is_wheel && link.scheme in vcs.all_schemes is a logical impossibility, right ?
[02:55:43] <dstufft> pretty sure yea
[02:58:29] <lifeless> huh
[02:58:32] <lifeless> correct me if I'm wrong
[02:58:43] <lifeless> but --download with a vcs makes a zip file
[02:58:56] <lifeless> but *doesn't* appear to build egg info
[02:59:04] <lifeless> and thus get deps ?
[02:59:20] <dstufft> um
[02:59:25] <dstufft> I'm not sure
[02:59:31] <dstufft> it probably *should* get deps
[02:59:33] <dstufft> but it might not
[02:59:38] <lifeless> if self.is_download:
[02:59:49] <lifeless> if not is_wheel: run_egg_info
[02:59:51] <dstufft> lifeless: btw the other PR you sent has failing tests
[02:59:54] <lifeless> if vcs:
[03:00:03] <lifeless> make_an_archive
[03:00:15] <dstufft> so a VCS is not a wheel which'll run the egg_info yea?
[03:00:38] <lifeless> ah, I see now
[03:00:42] <lifeless> its already pulled it down
[03:00:49] <lifeless> we're making an archive as a side effect. got it
[03:01:51] <lifeless> whee thats lovely and red
[03:02:24] <lifeless> does
[03:02:25] <lifeless> AssertionError: temp files not expected
[03:02:30] <lifeless> mean that it leaked temp files ?
[03:03:39] <dstufft> yea
[03:03:52] <dstufft> there were temp files left in the environment that it wasn't expecting
[03:03:58] <lifeless> how weird
[03:04:25] <dstufft> tmp/pip-uabxWr-build
[03:05:05] <dstufft> looks like it's specific to nameless requirements
[03:05:26] <dstufft> which uses a different temporary directory I think
[03:06:07] <lifeless> huh
[03:06:15] <lifeless> only one failure for me
[03:06:21] <lifeless> two in jenkins on the job I looked at
[03:06:43] <lifeless> test_upgrade_to_same_version_from_url fails locally
[03:07:41] <lifeless> oh
[03:07:45] <lifeless> patch was bad.
[03:08:43] <lifeless> its experimental - I haven't run everything locally, but hopefully better version pushed
[03:12:55] <lifeless> dstufft: any objection to calling assert_source_matches_version when doing --download
[03:13:45] <dstufft> lifeless: don't think I have an objection to that
[03:43:23] <lifeless> odd
[03:43:24] <lifeless> _________________ ERROR at setup of test_install_upgrade_editable_depending_on_other_editable __________________
[03:43:32] <lifeless> htf did I break setup
[03:58:41] <lifeless> dstufft: hmm, there's no source_dir for editables?
[03:58:52] <dstufft> lifeless: uhh
[03:58:57] <dstufft> I'm not sure
[03:59:10] <lifeless> IFF its a file:// url
[04:01:17] <lifeless> ok, passes some tests. ship it.
[04:05:46] <lifeless> wow git was confused there
[05:06:46] <lifeless> dstufft: 2575 might be interesting (or awful) depending on your taste
[05:11:15] <dstufft> lifeless: yea I like it, just didn't notice the tests had passed :D
[05:16:48] <lifeless> cool, thanks,
[05:20:57] <dstufft> sadly we don't have a thing where we can go "yup merge if tests pass ;("
[05:21:06] <dstufft> we don't have enough traffic to make it worth it to leaev travis for it
[05:21:28] <lifeless> you could write a little API cronbot
[05:26:16] <lifeless> dstufft: now its starting to get interesting
[05:27:32] <lifeless> I need to go out - parent teacher night - but ^
[05:28:06] <lifeless> the markdown rendering is bong of course, see the raw commit message :)
[06:22:56] <tomprince> lifeless: You could always put markdown in the commit message.
[07:04:11] <dstufft> I just fix up the markdown when I make a PR
[08:45:22] <lifeless> tomprince: aieee.
[08:45:29] <lifeless> dstufft: next time perhaps ;)
[08:48:28] <dstufft> lifeless: I did it for you :D
[10:44:20] <lifeless> dstufft: thanks
[18:11:12] <pmxbot> jaraco pushed 1 commit to setuptools (https://bitbucket.org/pypa/setuptools/) :
[18:11:12] <pmxbot> Replace deprecated usage with preferred usage. Fixes #364.
[19:10:41] <lifeless> dstufft: 2565 passed
[19:10:44] <lifeless> bah
[19:10:46] <lifeless> 2576
[19:37:51] <sigmavirus24> lifeless: I couldn't reproduce that bug =/
[20:14:30] <lifeless> sigmavirus24: oh? it distributed ok for you?
[20:14:47] <sigmavirus24> yeah
[20:15:53] <sigmavirus24> Like I said though, I need to test on linux
[20:16:05] <lifeless> hmm
[20:16:09] <lifeless> python3.4 FWIW
[20:16:13] <lifeless> also starting from a venv
[20:17:28] <sigmavirus24> wait, what?
[20:18:27] <lifeless> well I'm running tox
[20:18:32] <lifeless> and tox is then running py.test in a venv
[20:18:36] <sigmavirus24> tox on py3.4 for a 2.7 venv?
[20:18:38] <lifeless> so you can get closer by just starting from a venv
[20:18:47] <sigmavirus24> right
[20:18:49] <sigmavirus24> That's how I ran it
[20:18:56] <lifeless> so yeah 2.7 venv
[20:18:56] <sigmavirus24> I used the repro steps in the pip issue
[20:19:00] <lifeless> sorry for confusion :)
[20:19:04] <lifeless> tox is installed in 3.4
[20:19:12] <sigmavirus24> yeah that might make a difference
[20:19:20] <sigmavirus24> (I doubt it, but maybe)
[20:19:43] <lifeless> apparently it does
[20:21:09] <lifeless> oh ffs
[20:21:13] <lifeless> now I can't reproduce it
[20:22:13] <lifeless> oh wait
[20:22:26] <lifeless> I reset the tox.ini changes
[20:23:31] <lifeless> so my localhost test wasn't valid anymore
[20:23:36] <lifeless> let me fix that
[20:25:48] <lifeless> sigmavirus24: tried 3.4, fails differently
[20:26:00] <lifeless> sigmavirus24: updated the issue
[20:26:09] <sigmavirus24> lifeless: cool. I'll take a look tonight
[20:26:31] <lifeless> sigmavirus24: what TZ are you in?
[20:27:25] <sigmavirus24> CDT
[20:27:44] <lifeless> thats middle of US right? ok :)
[20:27:51] <sigmavirus24> yep
[20:51:20] <sigmavirus24> lifeless: what're you refactoring?
[20:51:57] <lifeless> prepare_files
[20:54:15] <lifeless> sigmavirus24: working up to being able to do my setup.cfg patch cleanly
[20:54:25] <sigmavirus24> aha
[21:07:50] <qwcode> lifeless, is there a master plan where you're headed? some feature you're trying to add?
[21:08:28] <lifeless> qwcode: yes, there was a long thread recently on distutils-sig :)
[21:09:00] <qwcode> lifeless, so a setup_requires solution?
[21:10:14] <lifeless> qwcode: I started poking directly at that, but in discussion here with dstufft realised that fixing the awfulness of the code first was a good idea
[21:10:33] <lifeless> yes
[21:12:14] <qwcode> lifeless, for the abstraction classes, you said "may grow, or be subsumed into someting else in time".... in your time in working on this feature you mean?
[21:12:27] <lifeless> or someone else yes.
[21:13:22] <qwcode> lifeless, so you're done with those classes right now? just wanted just enough to clear up that routine?
[21:13:52] <lifeless> not yet, the routine is still awful.
[21:14:08] <lifeless> I mean, if you want to move or adjust or whatever we can collaborate together
[21:18:44] <qwcode> everything you're doing looks sharp, just trying to understand if you had master domain model in mind yet. sounds like right now it's more based on what's required to clean up the routine
[21:18:52] <lifeless> yeah
[21:19:12] <lifeless> I want to make the code there understandable
[21:19:19] <lifeless> so that my patch can be reviewed sanely :)
[21:20:50] <dstufft> yea, I think long term we should look real close at these and figure out real good models
[21:21:07] <dstufft> but I don't think that we need to wait off for perfect to get improvements in code that we can easil change later
[21:24:03] <qwcode> roger that. I'll just keep watching the PRs. ditto on someone documenting a long term model at some point at least...
[21:25:24] <lifeless> what do you guys think of find_requirement memoising its results
[21:25:27] <lifeless> or caching
[21:25:28] <lifeless> or some such
[21:25:50] <qwcode> lifeless, is this the "pip take over setup_requires" idea... is that the plan?
[21:25:50] <lifeless> we have a awkward thing where we track with unrelated variables the result from finder.find_requirement
[21:26:15] <lifeless> qwcode: thats the patch I want to be able to write, which this work is cleanup to prepare for
[21:27:27] <qwcode> lifeless, got it. that helps. that would be nice. do you expect to have to add a flag to setuptools to *not* double do what pip is taking over, or would it all work it due to setuptools detecting it's already done?
[21:27:55] <lifeless> qwcode: I think we can let setuptools users decide themselves
[21:28:12] <qwcode> lifeless, but pip is running setuptools
[21:28:12] <lifeless> qwcode: for instance, if you are happy with easy_install
[21:28:19] <lifeless> then you put setup_requires in setup.py too.
[21:28:40] <qwcode> lifeless, maybe I'll just wait for the feature... I won't get ahead of myself here...
[21:28:42] <dstufft> I'd have to think about memoizing find_requirements, off top of my head it sounds like a reasonable thing to do with just a lru cache or something
[21:28:43] <lifeless> if you hate the idea of easy_install, you don't, and your setup.py can avoid all the shenanigans needed to work
[21:28:56] <lifeless> dstufft: yeah
[21:29:02] <dstufft> but I may be forgetting somewhere where we expect it to recall
[21:29:04] <lifeless> dstufft: its going to be two calls in a row, always.
[21:29:15] <lifeless> dstufft: grep for find_requirement in req_set
[21:29:36] <lifeless> dstufft: we try in the archive spot
[21:29:48] <lifeless> dstufft: and then in the 'elif install' branch
[21:29:52] <dstufft> lifeless: yea
[21:30:11] <dstufft> I think it's a reasonable thing, I just don't know offhand if we ever expect find_requirement to return a different result, I can't imagine a sitaution where we do though
[21:30:27] <lifeless> we explicitly try to avoid different results ;)
[21:30:47] <dstufft> so that sounds ok to me
[21:30:50] <lifeless> we call it once from list
[21:30:52] <dstufft> functools.lru_cache ftw
[21:30:56] <lifeless> and twice from req_set
[21:31:10] <lifeless> dstufft: I'm pretty sure lru_cache doesn't cache exceptions
[21:31:31] <dstufft> ah probably not
[21:31:36] <lifeless> dstufft: grep for not_found in req_set to see why
[21:31:49] <lifeless> dstufft: so, I propose to move the not_found caching logic into find_requirement fo rnow
[21:32:01] <lifeless> and we can decorator-enable that as a future step when we need it in more than one place
[21:36:53] <qwcode> dstufft, indirectly related, can the PyPI cdn give different results right after uploads... https://github.com/pypa/pip/issues/2408
[21:37:25] <dstufft> qwcode: sure, after the upload happens we trigger a purge
[21:37:34] <dstufft> but fastly is a distributed global object store basically
[21:37:51] <dstufft> the purge doesn't happen in lock step across the entire cluster
[21:38:58] <qwcode> dstufft, I mean back and forth from the old and new on successive installs, until the upload stabilizes across the CDN
[21:39:19] <qwcode> dstufft, the "random" version the guys was seeing in the issue
[21:40:14] <qwcode> "purge doesn't happen in lock step across the entire cluster", ok then that probably explains what he saw, then?
[21:40:38] <dstufft> if it happened immediately after an upload yea
[21:40:47] <dstufft> also it's possible a cache node got stuck
[21:40:59] <dstufft> and was serving an old copy long past the purge
[21:41:10] <qwcode> he apparently uploaded a series of *many* versions... and then saw "random" versions installed
[21:42:00] <qwcode> any way, just remembered that, and wanted to know.... not that it means we shouldn't cache find_requirement results
[21:43:20] <lifeless> [we already do :)] - I'm just moving the cache into find_requirement itself
[21:54:38] <qwcode> ok, I'm slow, why a lru cache beyond the web cache thing we have?
[21:54:48] <lifeless> its not a web cache
[21:54:56] <lifeless> grep for not_found in req_set
[21:54:58] <lifeless> thats a cache
[21:55:04] <qwcode> the cache adapter
[21:56:25] <qwcode> ok, I'm too slow to understand your answer... : )
[22:03:36] <dstufft> it's just avoiding the expense of recomputing find_requirements
[22:04:10] <dstufft> the HTTP access will be cached (assuming the correct headers) but we still execute a bunch of machinaery that we don't need to (including parsing HTML)
[22:05:27] <qwcode> ok, makes sense, thanks
[22:21:14] <lifeless> dstufft: want to pull https://github.com/pypa/pip/pull/2576 across ?
[22:27:16] <qwcode> seems like for pip to take over setup_requires, it will end up having to pass some kind of "--no-setup-requires" to "python setup.py" (assuming it's using setuptools to parse setup_requires)
[22:29:17] <xafer> lifeless, thanks for the nice refactors in req_set.py :)
[22:30:52] <lifeless> qwcode: one could do that
[22:31:06] <lifeless> qwcode: or just let it be - it will be idempotent
[22:31:42] <qwcode> lifeless, how are you going to parse the setup_requires list initially?
[22:32:08] <lifeless> qwcode: it will be in setup.cfg. So configparser.SafeConfigParser
[22:32:22] <lifeless> xafer: yw
[22:33:23] <dstufft> lifeless: will take a look in a few
[22:33:31] <qwcode> lifeless, oh..... so this is not a plan to let current projects work better... you'd need to configure in setup.cfg?
[22:34:36] <lifeless> qwcode: right
[22:34:55] <lifeless> qwcode: making existing projects Just Work better is possibly doable in a couple of evil ways
[22:35:21] <lifeless> qwcode: we could compile but not run and attempt a constant fold back from the setup() call in the bytecode.
[22:35:54] <lifeless> qwcode: or we could run it with import knobbled and magic mock objects everywhere and setup stubbed out and use that to figure out the setup_requires
[22:36:04] <lifeless> qwcode: neither seem... tasteful
[22:37:04] <lifeless> qwcode: but the basic problem is that executable code has no business installing its own requirements
[22:37:06] <dstufft> I'm still on the fence if the general idea is a good idea for a project to use it, but since it's opt in and when we switch to metabuild system we can just tie it as another legacy quirk of the setuptools builder I don't feel too bad about having the feature
[22:37:09] <qwcode> or add a new command or flag to setuptools, and have pip run setup.py 3 times, instead of just 2... the extra run to get the setup_requires information, but without running the logic to process setup_requires
[22:37:19] <lifeless> qwcode: a new flag won't help.
[22:37:39] <qwcode> a new flag that tells setuptools not to run easy_install....
[22:37:45] <lifeless> qwcode: the canonical example would be this - setuptools is a setup_requires for setuptools.
[22:37:56] <lifeless> qwcode: its implicit, so most folk don't think about it, but it is.
[22:39:38] <dstufft> On the other wise there's always some setup_requires dependency you can't really express
[22:39:41] <dstufft> hand*
[22:39:52] <lifeless> perhaps :)
[22:40:01] <dstufft> there's an implicit setup_requires dependency on python for instance!
[22:40:11] <lifeless> sure, but thats not pip installable :)
[22:40:17] <qwcode> 1) "python setup.py get_setup_requires", 2) pip intalls the setup_requires deps 3) python setup.py egg_info, 4) python setup.py install
[22:40:23] <lifeless> within the universe of pip installable things
[22:40:34] <lifeless> and excluding circular setup_requires dependencies
[22:40:43] <lifeless> which I really don't want to think about
[22:40:54] <lifeless> qwcode: how will 1) work if setup.py isn't importable
[22:41:12] <dstufft> qwcode: you're thinking similar to what I thought, that's the best way if people want to maintain compatability with easy_install and ``setup.py build`` with a clean environment
[22:41:35] <dstufft> apparently people don't care so much about maintaing compat with those things, but they care a lot that having to defer imports in the setup.py makes it harder to write setup.py's
[22:41:56] <qwcode> dstufft yes, I recall you referring to some "3 time execution plan"... maybe in the thread the other day
[22:41:58] <lifeless> in OpenStack for instance we explicitly don't support 'setup.py develop'
[22:42:43] <dstufft> (realistcally easy_install could read the setup.cfg setup_requires too, in which case you'd only be breaking the case where you want to execute setup.py directly
[22:43:34] <lifeless> python -m setuptools setup_requires
[22:43:37] <lifeless> that could work
[22:43:48] <lifeless> but again its a hard requirement on upgrading setuptools
[22:43:52] <qwcode> lifeless, why is setup.py not importable? because it's not written such that imports are nested or delayed you mean?
[22:44:10] <lifeless> qwcode: right.
[22:45:16] <dstufft> in a way it's somewhat of an extension of how I've told people to think about setup.py's for awhile now: setup.py isn't for you to execute, it's for the packaging tools
[22:51:59] <lifeless> so my take here is I think very straight forward: I want pip to be able to figure out what to install without executing any in-tree code. Thats derived from a) don't install /anything/ until all deps are known, b) don't waste a bunch of cycles installing temp environments left right and centre, c) setuptools knows about /building/, pip knows about /installing/
[23:02:59] <qwcode> I agree with a/b/c, at least eventually. also agree that it's mind boggling that setup_requires was a setup arg in the first place. setup.cfg would have made more sense. But just trying to think about existing projects too. maybe do both solutions... something for old and new
[23:03:26] <qwcode> old and new projects that is
[23:04:08] <qwcode> PEP426 intends to cover new projects... but I understand people don't want to wait
[23:04:20] <dstufft> PEP426 doesn't actually handle this
[23:04:46] <qwcode> hold on now... looking at PEP426 again...
[23:05:21] <dstufft> or rather
[23:05:34] <qwcode> so build_requires no good for this... still a setup.py import issue?
[23:05:49] <dstufft> PEP 426 handles it on the installer side, because it eliminates the need for setup.py all together when you're installing a package (much like wheel does)
[23:06:10] <dstufft> but it doesn't effect pip install -e from a git repo
[23:08:05] <qwcode> ok, got it
[23:11:16] <lifeless> or pip install .
[23:11:28] <lifeless> anything where egg_info has not yet been output by a build tool
[23:13:14] <dstufft> yea, PEP 426 solves it at a later stage in the "pipeline"
[23:16:45] <lifeless> also as ncoghlan noted, I'm not aiming at ideal here: just *something* thats unambiguously better, which we can hide under an abstraction later if we don't like it. And folk can opt-in.
[23:22:31] <lifeless> dstufft: why is download_dir distinct from wheel_download_dir ?
[23:22:49] <dstufft> inside the code?
[23:22:53] <dstufft> I dunno
[23:23:06] <lifeless> yeah, inside the code
[23:24:50] <qwcode> if the plan turns out with pip reading setup_requires from setup.cfg, would be nice to have setuptools support it too...
[23:25:07] <lifeless> qwcode: sure, thats what d2to1 did.
[23:25:33] <lifeless> qwcode: and as a future iteration that makes a bunch of sense, for install-require and extras.
[23:25:47] <lifeless> qwcode: I don't think it makes any sense for setup-requires, since we don't /want/ setuptools doing setup-requires :)
[23:26:47] <qwcode> lifeless, many people still use "setup.py develop"
[23:27:46] <qwcode> would just make the pip support seem less ad-hoc
[23:27:55] <qwcode> more standard
[23:28:52] <qwcode> lifeless, I think I was involved in wheel_download_dir.... looking....
[23:29:26] <lifeless> qwcode: OTOH many many many other people don't want setup.py installing stuff ever :).
[23:30:02] <lifeless> qwcode: thanks
[23:35:42] <qwcode> lifeless, when doing "pip wheel", wheel deps may be found that should prevent building them... so they get downloaded into the wheelhouse. although I'm not clear atm, why download_dir wasn't reused
[23:35:58] <lifeless> qwcode: they don't
[23:36:05] <lifeless> qwcode: deps are downloaded but not kept
[23:36:13] <lifeless> qwcode: wheels are downloaded and kept in the wheelhouse
[23:36:20] <lifeless> qwcode: so the wheelhouse ends up with just wheels
[23:36:21] <qwcode> right
[23:36:32] <lifeless> qwcode: deps that are wheels end up in the wheelhouse
[23:36:37] <qwcode> yes
[23:36:43] <lifeless> I'm not sure if thats an important thing to preserve, but i have.
[23:37:13] <qwcode> deps that are wheels ending up in the wheelhouse should definitely be preserved
[23:37:14] <lifeless> I think I could possibly come up with a cleaner way to represent it with a bit of effort, not sure if its worth it
[23:37:37] <lifeless> I mean 'deps that are not wheels not ending up in the wheel house'
[23:37:42] <lifeless> as the thing to preserve
[23:38:17] <qwcode> oh... except it would be the "wheel+other things" house
[23:38:45] <lifeless> anyhow, I've kept the behaviour, and I understand it now
[23:38:51] <lifeless> I have a refactor around it which is marginal
[23:39:06] <lifeless> but you can assess yourself when i push, which I will once dstufft has reviewed the current passing PR
[23:40:25] <qwcode> do you want to chain PRs with different branchs, and just say "depends on PRXXX" vs trying to do all of this in develop?
[23:40:44] <lifeless> I will if my local stack gets too big
[23:41:01] <lifeless> its only a couple local commits pending so far
[23:41:27] <qwcode> lifeless, ok, I'm pretty much done for today.... good luck... : )
[23:41:36] <lifeless> qwcode: thanks, gn!
[23:50:59] <dstufft> lifeless: instead of modifying find_requirement why not just a decorator?
[23:53:36] <lifeless> dstufft: didn't have one at hand, and having one would need twice the testing - not worth it until we have another call site
[23:54:46] <dstufft> okay
[23:55:32] <lifeless> (twice the testing - test the decorator, and test that its used on find_requirements)
[23:56:34] <dstufft> tbh find_requirements should probably return a sentinal value instead of raise exceptions, but that's probably a hard change since I think we use find_requirements all over
[23:56:52] <lifeless> we have three call sites
[23:57:02] <lifeless> it would be easy enough to adjust
[23:57:12] <lifeless> I don't think it would make much difference to the code readability right now