[12:12:33] <ronny> dstufft: this weekend i'll try to prototype a new packaging tool, target is to have something that can generate universal wheels and setuptools using sdists, but no more scripts to declare the packages, stricter layout with src/tests
[12:14:25] <dstufft> ronny: ok :D I'm excited to see what you come up with
[12:15:00] <ronny> dstufft: i'd like to run the basic idea trough you once before starting with code in order to get some thins more solid
[12:15:48] <ronny> right now is bad tho, im still at work ^^
[12:16:11] <ronny> and i suppose you also have a workday ahead?
[12:17:47] <dstufft> yea, though half my time is packaging so me being at work doesn't preclude me from talking about packaging things :) But I have a bunch of phone calls to make this morning anyways
[12:18:10] <ronny> dstufft: i'll poke you after my workday then
[13:58:26] <nanonyme> dstufft, you're a pro at how pip is packaged under Debian, right?
[13:59:02] <nanonyme> Just noticed: /usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py -> module' object has no attribute 'PROTOCOL_SSLv3: who tries to use SSLv3 and why?
[13:59:36] <nanonyme> This is for the just-to-be-released Debian 8
[13:59:45] <dstufft> nanonyme: You're on Debian unstable yea? or did they migrate that patch to Jessie?
[14:15:08] <nanonyme> Does it also handle encodings sanely?
[14:16:33] <ronny> restkit already has propper socket pooling and http parser layering since years
[14:16:47] <nanonyme> I thought urllib3 has just fine pooling
[14:16:50] <dstufft> heh, it uses http-parser, I looked at that and hated it and started writing my own :V
[14:16:56] <dstufft> urllib3 does connection pooling yes
[14:17:01] <ronny> nanonyme: i cant replace sockets with something else there
[14:17:19] <nanonyme> Eh, what would you want to replace sockets with in HTTP?
[14:17:36] <ronny> i once needed something that replaced sockets with something that communicateds with a ssh'd python process so i could simulate port forwarding via ssh where it was forbidden
[14:18:28] <ronny> with restkit that was possible trivially, with the httplib/urllib3 mess its impossible to do due to rorally broken layering
[14:21:28] <dstufft> we use that in pip to make file:// urls work
[14:21:43] <dstufft> and cachecontrol uses it to provide transparent caching
[14:23:37] <ronny> dstufft: still has a rotten core, kenneth deliberately ignored libs with much better layering when he made requests - it will take ages to propperly fix the mess, and it will likely never get propper layering
[14:24:55] <dstufft> the layering in requests doesn't bother me at all *shrug*. The layering in httplib is pretty bad, (and urllib3 then inheriets that)
[14:25:30] <tos9> how about the complete lack of tests
[14:25:31] <ronny> dstufft: well, it hardly matters, until you need to cahgne something, and realize its impossible because of the bad layering
[14:25:38] <dstufft> it wouldn't be very dificult to make requests use http-parser and things similarly to what rest-kit does
[14:25:38] <tos9> and the way that that really really correlates with requests often being broken :/
[14:26:13] <ronny> dstufft: requests feels like the setuptools of http libs ^^
[14:27:13] <dstufft> I'm more concerned with the fact it doesn't appear that restkit validates TLS by default
[14:27:25] <dstufft> at least I don't see where it'd be doing that in the code
[14:27:29] <nanonyme> ronny, IOW the thing that everyone uses but which has a lot of quirks?
[14:29:44] <dstufft> also it looks like restkit leaks authentication data when a redirect crosses an authentication boundary
[14:31:26] <ronny> dstufft: still i'd rather fix missing logic bugs in a well layered base than frag on a rotten base
[14:31:39] <doismellburning> this is why I avoid Python
[14:32:08] <ronny> but im draging on something pointless
[14:38:23] <nanonyme> Hmm, I guess the pip in Debian 8 is barely new enough to support wheels by default old so old that it will reinstall already installed packages with --upgrade
[14:39:11] <dstufft> ronny: I'm not going to open an issue for the other issue because I don't have a setup to demonstrate the issue or the time to fully investigate it fwiw
[14:39:34] <ronny> dstufft: can you shoot me an email about it
[14:40:30] <nanonyme> doismellburning, you've picked a funny channel to lurk in if you avoid Python ;)
[14:40:52] <dstufft> ronny: https://github.com/kennethreitz/requests/issues/1885 talks about it, stripping auth headers on a redirect to ensure you don't leak auth info to a different host
[14:48:23] <ronny> dstufft: will validate after work, thanks
[14:52:13] <nanonyme> dstufft, do you think it makes sense that you keep upgrading setuptools and pip as --user on machines CI machines for the CI user?
[14:52:35] <nanonyme> Ie that you don't touch system stuff but keep packaging tools up-to-date for the user
[14:53:08] <nanonyme> I already have latest virtualenv periodically be installed as --user for the CI user so you can just build a new virtualenv in a build job and install whatever you want there
[14:53:30] <nanonyme> Well, under the assumption that headers exist :)
[14:54:13] <dstufft> nanonyme: probably that'd be fine
[22:20:01] <wsanchez> So, I'm using --system-site-packages when I create mine, because on OS X I'd rather use the pyobjc built into the OS than build my own. But That's really the only reason. I don't suppose there's a way to say that for only one package?
[22:20:44] <dstufft> wsanchez: not really, unless you use symlinks
[22:20:45] <wsanchez> The problem I'm running into is that I want it to install (a newer) Twisted into the VE and not use the system one.
[22:21:16] <dstufft> Is there a particular reason you want to use the pyobjc built into the system? Does it have something the one on pypi doesn't have?
[22:22:11] <wsanchez> Well… mostly because it's a giant thing and because I can blame the OS folks if it doesn't work. :-)
[22:25:13] <dstufft> wsanchez: Do you know anyone who can fix Python on OSX to not shove the apple pre-installed packages before site-packages? :/ It breaks things for anyone who wants to upgrade their system packages (like setuptools :(()
[22:28:54] <wsanchez> dstufft: I'm guess you mean the "Extras" stuff
[22:29:20] <dstufft> wsanchez: https://github.com/pypa/pip/issues/1480 (That's was fromw hen setuptools was still 0.6.wahtever, glyph installed a newer setuptools into --user but the OSX packages are put before everything but the stdlib) thee's also https://github.com/pypa/pip/issues/2468 and
[22:30:35] <dstufft> I think this issue is the same thing https://github.com/pypa/pip/issues/2156
[22:31:57] <dstufft> wsanchez: in unmodified Python, --user comes before site-packages, in Apple Python Extras comes before them both. The closer match upstream sticking Extras after site-packages would be reasonable, but if they want it first to protect against people breaking things, at least putting --user before Extras would allow us to tell people to use --user to not modify their system
[22:32:27] <dstufft> (pip is going to default to --user soon too, so there will be some rails to get people towads doing that instead of sudo)
[22:32:35] <wsanchez> <rdar://problem/20144107> Update Python setuptools package from 1.1.6 to 14.0 or later
[22:34:40] <dstufft> wsanchez: also, I have no idea what inside apple is like, but if pip/setuptools/virtualenv/any of the packaging tools cause Apple some pain, If they're willing to tell me about the pain we might be able to fix things for them. I don't know if that's something apple would never do or whatever
[22:34:59] <dstufft> (inclduing if we do things that make people break their computers)
[22:35:23] <wsanchez> So I'm clear, the default is user -> site-packages -> stdlib and Apple's is Extras -> user -> site-packages -> stdlib, right?
[22:36:49] <dstufft> The default is stdlib > user > site-packages, and apple is stdlib > Extras > user > site-packages (sort of, There is acutally multiple stdlib directories, and apple stick Extras in the middle of them so some parts of stdlib are > Extras, and some part of stdlib is < Extras
[22:38:26] <wsanchez> I'll pretend I don't know that
[22:40:04] <dstufft> wsanchez: https://gist.github.com/dstufft/6066bc86eae344a230eb might be helpful, that's whjat the sys.path is on my system (I don't use apple python, so it's more or less unmodified)
[22:40:29] <wsanchez> Thanks. I think I tweaked mine on accident a while ago.
[22:40:53] <dstufft> dunno what they did that stuck PyObjc in between --user and site-packages, but if they move Extras to right there, that would make --user work and we can just tell people that apple doesn't support upgrading things shipped with the OS without --user
[22:42:54] <dstufft> wsanchez: updated the gist to include my unmodified Python that I install into my homedir too
[22:52:05] <ionelmc> dstufft: why doesn't pypi allow local version?
[22:52:38] <ionelmc> i don't see anything about it in pep440 - did i miss it?
[22:52:50] <dstufft> the answer about convetntions is basically "it would break compat with what setuptools did and what a lot of people are doing"
[22:54:05] <dstufft> PEP 440 was mostly "restrict the syntax setuptools already was using, and add small tweaks where it made sense"
[22:54:52] <dstufft> ionelmc: from PEP 440: "As the Python Package Index is intended solely for indexing and hosting upstream projects, it MUST NOT allow the use of local version identifiers. "
[22:56:27] <dstufft> you're the upstream as far as PyPI is concerned :) We optimize for that use case, and since you can't have multiple layers of local versions, if you used a local version, othe rpeople couldn't make a local version of your local versions
[22:56:33] <wsanchez> <rdar://problem/20144204> Python "Extras" should not come in sys.path before user packages and site-packages
[22:57:02] <ionelmc> dstufft: then i think postN is ok, upstream won't have those
[23:31:21] <tdsmith> oh, the Extras thing is a problem for the scipy stack too, fixing that would be great
[23:37:53] <dstufft> wsanchez: I've never used rdar, is there any way for me to subscribe to that? or is it all internal? (I tried clicking the link but I guess there's no program installed that understands them)