PMXBOT Log file Viewer

Help | Karma | Search:

#pypa-dev logs for Thursday the 3rd of September, 2015

(Back to #pypa-dev overview) (Back to channel listing) (Animate logs)
[12:30:23] <xafer> dstufft, are you planning a pip 8.0 release soon ?
[12:30:30] <dstufft> xafer: No
[12:30:46] <xafer> ok :)
[12:31:01] <dstufft> xafer: It'll be a few months, but I wanted to get the code changes for PEP 470 into pip which require a version bump to 8
[12:32:22] <xafer> does it mean pip 8 will have to wait for the 3 months window of pep470 ?
[12:33:00] <dstufft> xafer: yea
[12:33:29] <dstufft> it's unlikely I was going to be cutting a major release between then and now anyways, I'm mostly focused on warehouse ATM
[12:33:55] <dstufft> it gives people time to yell at us who are using pip from HEAD too.
[12:36:50] <xafer> ok, there are a few things I'd like to see in pip 8, like the download command
[12:37:44] <dstufft> xafer: makes sense, I have to run to the doctors office, if you make a pip 8 milestone and add anything you'd like to see in it to that, I can make sure we don't cut a pip 8 release without them (or without explicitly deciding to move forward without them)
[12:41:32] <xafer> good idea :)
[13:17:23] <xafer> dstufft, I see there is a 7.2 milestone, is it still planned ?
[13:50:16] <pmxbot> jaraco pushed 1 commit to setuptools (https://bitbucket.org/pypa/setuptools/) :
[13:50:17] <pmxbot> Setuptools supports Python 3.5 and 3.6
[14:21:25] <dstufft> xafer: unlikely
[14:21:48] <xafer> k
[14:23:00] <xafer> https://github.com/pypa/pip/pull/3068 could be merged I think
[18:22:58] <ronny> dstufft: ping? is there a way to make pip stop injecting setuptools on its own?
[18:27:15] <dstufft> ronny: No there isn't
[18:28:22] <ronny> dstufft: thats a mallsie mess up then ^^ its impossible to have scripts pull in a new setuptools version with pip install --target
[18:29:08] <dstufft> not sure what you mean by pulling in a new setuptools
[18:29:09] <ronny> dstufft: im currently creating a replacement for ez_setup/install_requires/test_requires that uses the ini file a script and pip install --target .eggs/site-pacakges
[18:29:22] <dstufft> oic
[18:29:38] <dstufft> we won't even try to execute the setup.py unless setuptools is already installed
[18:30:40] <ronny> dstufft: but how do i prevent the injection, i cant propperly override the import paths after the facts because setuptools goes into distutils as well (i suppose i can throw away all related modules)
[18:31:04] <ronny> dstufft: is it enough to simply remove pkg_resources, setuptools and distutils from sys.modules?
[18:32:25] <ronny> also will pip install --target $foo $existingpackage go to the network?
[18:32:31] <dstufft> ronny: to answer your first question, right now you don't prevent the injection. If we were going to go down that road there'd need to be a discussion if wew ant to make it possible to disable the injection or not, as far as what you'd need to delete from sys.modules.. I Don't know. I've never attempted it
[18:32:38] <dstufft> I think it will hit the network yes
[18:33:01] <ronny> i see
[18:53:59] <ronny> dstufft: i just figured, i could actually always run a python -S when i detect setuptools
[18:54:17] <dstufft> that breaks a virtualenv
[18:54:17] <dstufft> fwiw
[19:13:14] <ronny> dstufft: well, sys.executable should be fine?
[19:15:26] <ronny> hmm
[19:15:29] <ronny> oh
[19:15:35] <ronny> hah,
[19:16:05] <ronny> dstufft: would it be acceptable for pip to provide a distribution class which replaces fetch_build_egg/fetch_build_eggs?
[19:17:13] <dstufft> I don't know
[19:17:14] <dstufft> maybe
[19:17:28] <dstufft> I haven't explored the rammifications of that
[19:21:56] <ronny> hmm, the interdependent limitations in pip, setuptools and python packaging in general are quit a pain ^^
[19:23:42] <ronny> i should stay at one item
[20:52:48] <xafer> dstufft, did you take a look at https://github.com/pypa/pip/pull/2812 ?
[20:53:23] <dstufft> I glanced at it but that's it
[20:54:36] <xafer> it seems clean and simple enough
[20:55:35] <dstufft> if it looks good to you, you can merge it :)
[20:56:53] <xafer> I'd rather have a second opinion ^^
[20:58:35] <dstufft> I'm not sure I like splitting on the + instead of just sticking the whole "git+ssh" into the protocol list, but I don't feel strongly about it
[21:03:19] <xafer> but then you'd have to put git/svn/hg/bzr+ssh/https additionnal protocol at least ?
[21:04:40] <dstufft> yea
[21:21:34] <xafer> apparently from https://github.com/pypa/pip/issues/754 I see you can make crazy things with hg :o
[21:21:55] <xafer> so maybe splitting on '+' is the safest
[21:27:52] <xafer> For https://github.com/pypa/pip/pull/2812 where there is no changelog, do you usually add the changelog in the merge commit ? or create an additionnal PR ? or directly commit ?
[21:28:27] <dstufft> I normally do a git diff before I release and look for anything important that didn't get called out
[21:34:07] <ErikRose> jezdez: Parsing hashes out of the reqs.txt file works. :-D Now to make it do something...
[21:42:28] <ErikRose> jezdez: So far, so good: https://github.com/pypa/pip/compare/develop...erikrose:hashing?expand=1
[21:47:25] <dstufft> ErikRose: not that I think it's wrong, but why not support the #sha256=...&md5=... etc that requirements.txt already uses for egg name and sub directory?
[21:48:36] <ErikRose> dstufft: There's quite a bit of back-and-forth in the history (and present) of https://github.com/erikrose/peep/wiki/PipHashing, but the reason I can remember off the top of my head is that it makes the command-line interface and the reqs.txt one the same.
[21:49:11] <dstufft> ErikRose: you can't pass --sha256 on the CLI can you? there's no interface for saying that this particular flag is only for X project?
[21:49:20] <ErikRose> That's to come later.
[21:49:58] <ErikRose> I'd follow the precedent of the find command: pip install SomePackage==1.2.3 --sha256=abcde... OtherPackage==4.5.6 --sha256=12345...
[21:50:15] <ErikRose> Multiple valid hashes can be specified straightforwardly by repeating the option.
[21:50:40] <ErikRose> And it's spelled the same whether the package specifier is a distro name or a URL.
[21:50:48] <dstufft> gotcha, not sure how I feel about it, but I'm not opposed to it :)
[21:51:08] <ErikRose> I think we had really good reasons for it, but those are the reasons I can remember atm. :-)
[21:51:30] <ErikRose> Incidentally and off to the side, md5 is too weak to use for this.
[21:52:08] <dstufft> yea, I just typed it because I'm lazy
[21:52:15] <ErikRose> Yep, I know you know. :-)
[21:52:17] <dstufft> and I can't remember the other number for sha256 that's shorter
[21:52:27] <dstufft> 225?
[21:52:29] <dstufft> something
[21:52:39] <ErikRose> 224
[21:52:44] <lifeless> /dev/random ?
[21:52:48] <dstufft> ah yea
[21:52:50] <dstufft> 224
[21:52:51] <dstufft> I was close
[21:52:56] <ErikRose> To be safe, I started at 256, but we could go down if beneficial.
[21:53:08] <ErikRose> All that stuff's likely to be even. :-)
[21:53:32] <dstufft> yea adjusting which particular hashes is easy given it supports multiple hashes out of the gate
[21:53:33] <ErikRose> My favorite is sha1, which is one bit long. ;-)
[21:53:59] <ErikRose> We can always add hashes; taking away is the hard bit.
[21:55:01] <dstufft> ErikRose: fwiw I plan on switching things to click, I'm not sure if click supports multiple ordered things like that though. Something to consider to see if one syntax will lock us into a particular parsing library or not
[21:55:08] <ErikRose> God I love click.
[21:55:35] <ErikRose> I mean, I can probably hack around it even given optparse.
[21:55:37] <dstufft> I just haven't gotten around to doing it yet
[21:55:47] <dstufft> the refactoring to click
[21:55:49] <dstufft> I mean
[21:55:50] <ErikRose> I converted DXR to click awhile ago and haven't looked back.
[21:55:57] <dstufft> been mostly focused on Warehouse lately
[21:56:02] <ErikRose> Bless you.
[21:57:36] <dstufft> once we kill pypi legacy (or maybe before if I feel like touching pypi legacy's code base) we'll kill the md5 hashes completely off PyPI too
[21:58:11] <ErikRose> Yay.
[21:58:44] <ErikRose> I was so glad somebody did the backward-incompatible patch to support multi-line backslashy reqs.txt lines.
[21:58:57] <ErikRose> Can you imagine cramming 3 sha256 hashes on a single line?
[21:59:05] <dstufft> I think that was qwcode yea?
[21:59:11] <ErikRose> Rings a bell.
[21:59:13] <dstufft> I know he was poking at the requirements.txt
[21:59:35] <ErikRose> Plus this way you can comment them: "this one's for the wheel" "this is for the windows binary" "the sdist"
[21:59:40] <ErikRose> People do that in peep a lot.
[21:59:51] <dstufft> cool
[22:00:30] <dstufft> fwiw reading the wiki
[22:00:38] <dstufft> I'm -1 on --ignore-hashes unless we get enough people whining for it
[22:01:38] <ErikRose> Here's the way I'm leaning atm. I'm very open to argument; I'm not entirely satisfied:
[22:01:42] <ErikRose> "If any hashes are specified, --no-deps and --require-hashes turn on. This is a little surprising, but it fails safe: otherwise, dependencies of hashes packages will install without being hash-verified. If you want to be unsafe, you should say --ignore-hashes explicitly. Or have a --no-require-hashes."
[22:01:55] <ErikRose> hashes→hashed
[22:02:49] <dstufft> I'm not sure if --no-deps is the exactly right thing, but I agree with the sentiment
[22:03:18] <ErikRose> The only thing that makes me waver toward including --ignore-hashes is a future in which people complain they can't do something goofy with some library's reqs.txt file because they're, say, including it from their unhashed one, so the lib maintainer instead rips out all the hashes.
[22:03:51] <ErikRose> I'm pretty sure on --no-deps, so I'm happy to convince you. :-)
[22:04:08] <dstufft> I don't mean do the default behavior
[22:04:29] <ErikRose> ^not that I mean for library authors to start hash-pinning things. I think that would be an antipattern.
[22:04:43] <ErikRose> So yeah, actually, I'm arguing myself away from --ignore-hashes. :-)
[22:04:59] <dstufft> I'm not sure exactly what --no-deps is going to mean as we migrate towards a real resolver and paying attention to what's already installed and such
[22:05:03] <ErikRose> Omit it, and the patterns will naturally converge where they should. :-)
[22:05:14] <dstufft> it may be that --no-deps ends up disabling some sort of dependency checks
[22:05:24] <dstufft> I think it's fine to use it right now, and just add a comment about that though
[22:05:51] <ErikRose> Yes, the what's-already-installed bit is pretty uncharted territory as far as peep's concerned.
[22:06:03] <ErikRose> I wrote it intending to always install into empty venvs,
[22:06:27] <ErikRose> but then people started wanting to reuse deployment venvs, so I made it trust packages that were already installed.
[22:06:29] <dstufft> in particular though, if "foo" depends on "bar" and "frob", you still want install to fail if requirements.txt only contains "foo" and "bar"
[22:06:46] <ErikRose> Absolutely
[22:07:05] <dstufft> so you still want to process dependency information, you just want to refuse to install anything that doesn't have an associated hash with it
[22:07:18] <ErikRose> Ah, yes, right.
[22:07:31] <ErikRose> That would be a better behavior than right now, in which you get an importerror at runtime.
[22:07:46] <ErikRose> I can do this stuff now that I'm inside pip. :-)
[22:08:13] <dstufft> hopefully you have a good therapist for once you're done plumbing the depths of pip
[22:08:21] <ErikRose> "Nothing unhashed gets installed" is the spirit of the thing.
[22:08:30] <dstufft> yea I agree with that seniment
[22:08:32] <dstufft> sentiment
[22:08:35] <ErikRose> I'll make a note on the wiki by --no-deps.
[22:08:43] <dstufft> just not sure that --no-deps is the right mechanism for that
[22:09:58] <dstufft> ErikRose: you'll also want to do something about --egg, either warn about it in the docs, or bomb out if someone passes --egg when "secure mode" is on
[22:12:10] <dstufft> ErikRose: I guess you'll have to stash some extra data for pip freeze --hash, since we don't keep the original dist around to hash it when we do the install
[22:12:19] <dstufft> proposal looks good though
[22:12:30] <dstufft> that's just the stuff I thought of when I just read over it
[22:13:13] <ErikRose> fixed.
[22:13:13] <ErikRose> Alright, lawnmowing time before the storm
[22:13:13] <ErikRose> Next, the fun part: actual hash checking amidst the forest of legacy ifs. Oooo, booga booga booga.
[22:13:13] <ErikRose> btw, click might not be totally hostile to interleaved options: http://click.pocoo.org/5/complex/#interleaved-commands
[22:13:45] <ErikRose> Yes, the freeze stuff will probably come in "1.1".
[22:14:08] <ErikRose> Thanks for looking it over.
[22:14:18] <ErikRose> I have to review what --egg even means. Been awhile.
[22:14:58] <dstufft> ErikRose: it basically means "break tons of pip features because we stop telling setuptools not to install dependencies and instead just let setuptools do a bunch of crap"
[22:15:16] <ErikRose> --go-go-gadget-pje
[22:15:41] <dstufft> I want to kill it but there's some work to be done before we can
[22:15:41] <ErikRose> Sounds good. I'll just throw a fit if --egg is on.
[22:15:44] <dstufft> I think it's a bad option
[22:15:52] <dstufft> --break-my-shit options are bad
[22:17:41] <dstufft> >:[
[22:21:11] <ErikRose> How's -->:[ for spelling? ;-)
[22:23:43] <dstufft> lolol
[22:23:52] <ErikRose> :-)