PMXBOT Log file Viewer

Help | Karma | Search:

#pypa-dev logs for Friday the 15th of August, 2014

(Back to #pypa-dev overview) (Back to channel listing) (Animate logs)
[00:49:18] <r1chardj0n3s> looking into https://github.com/pypa/pip/issues/1733 ... the support for XDG is very low, so I think the only thing to do is add support for an /etc/pip.conf
[01:07:06] <dstufft> r1chardj0n3s: for system wide config?
[01:07:26] <dstufft> for system wide config I think we should follow XDG, but just use /etc/pip.conf as the default
[01:07:38] <r1chardj0n3s> sorry, quassel crapped out on me there
[01:08:07] <r1chardj0n3s> I'm currently re-reading through 1733 discussion in detail
[01:08:20] <dstufft> IOW for system wide config we should juse
[01:08:26] <r1chardj0n3s> I think using the XDG env var if set to try that location is good, falling back on /etc/pip.conf
[01:08:46] <dstufft> os.environ.get("XDG_CONFIG_DIRS", "/etc/pip.conf").split(":")
[01:08:47] <r1chardj0n3s> there's the issues around naming - I like /etc/pypa-pip.conf or similar
[01:09:11] <r1chardj0n3s> well, something functionally similar to that yes :)
[01:09:18] <dstufft> er that'd actually be os.environ.get("XDG_CONFIG_DIRS", "/etc/").split(":")
[01:09:22] <dstufft> but you get the idea
[01:09:25] <r1chardj0n3s> but even if XDG is set I like being able to handle an XDG-unaware user just using /etc/
[01:09:54] <dstufft> ok
[01:10:22] <r1chardj0n3s> jezdez is unhappy about xdg ;)
[01:10:36] <dstufft> I'd rather do pypa/pip.conf than pypa-pip.conf, but I think just pip.conf is fine tbh
[01:10:37] <r1chardj0n3s> so supporting non-xdg is important
[01:10:46] <dstufft> unhappy about what part of it
[01:11:01] <r1chardj0n3s> I googled "/etc/pip.conf" and got zero non-pypa-discussion hits :)
[01:13:45] <r1chardj0n3s> just realised that https://github.com/pypa/pip/issues/1736 isn't formally linked from 1733, but then I'm also happy for it to be a whole other post-1.6 thing
[01:14:37] <r1chardj0n3s> the discussion about overrides kinda petered out. To be honest, whole-file-override makes a lot of sense to me (ie. if one file exists, it completely overrides anything in another file)
[01:14:39] <dstufft> heh
[01:15:12] <r1chardj0n3s> but I've not looked into how the virtualenv-vs-~/pip/pip.conf thing works
[01:15:20] <r1chardj0n3s> that's next on my list
[01:15:50] <dstufft> yea I'm not sure how that works, I think that they should be combined :) at least that's how i'd expect things to work
[01:16:10] <r1chardj0n3s> hm, the file paths are just passed to RawConfigParser.read() I wonder what that does? :)
[01:16:11] <dstufft> and yea, I stuck all that under a non version milestone because I didn't want to tie them up to any particularly version
[01:16:25] <r1chardj0n3s> (reading docs)
[01:16:57] <dstufft> the docs aren't very specific
[01:17:03] <dstufft> seem to hint it might combine
[01:17:11] <dstufft> since it's parsing more than one file
[01:17:17] <dstufft> which seems pointless if they aren't combining
[01:17:51] <r1chardj0n3s> I might be missing something, but the docs don't actually say what happens when multiple files are read :)
[01:18:24] <dstufft> yea they only thing it says is it returns the list of all the files that are parsed
[01:18:34] <dstufft> so i'm infering from that it's combining
[01:18:42] <dstufft> since parsing a second file is useless if you're not combining
[01:18:42] <r1chardj0n3s> I'll do some experimentation
[01:18:47] <dstufft> but that's jsut a guess :D
[01:22:29] <r1chardj0n3s> yep, it merges
[01:36:49] <r1chardj0n3s> ok, I finally got through my third re-reading of 1733 (I'm slow sometimes) and I think the "consensus" is to vendor appdirs
[01:37:44] <r1chardj0n3s> but to extend Linux site_config_dir with plain /etc/
[01:41:55] <r1chardj0n3s> though to be honest, using appdirs really blows "one obvious way to do it" out of the water given the existing use of ~/.pip/pip.conf
[01:42:15] <r1chardj0n3s> so we'd be using appdirs for site but not user
[01:42:18] <r1chardj0n3s> hm
[01:43:35] <r1chardj0n3s> oh. and then there's https://github.com/ActiveState/appdirs/blob/master/appdirs.py#L28
[01:43:36] <r1chardj0n3s> lol
[01:44:07] <r1chardj0n3s> dstufft: so I guess if pip's being run under jython we just assume non-windows eh? :)
[01:44:56] <dstufft> we don't acutally use appdirs directly
[01:45:05] <dstufft> we vendor parts of it sort of, but they are modified already
[01:45:18] <dstufft> pip/appdirs.py
[01:45:46] <dstufft> IOW we decided we didn't like the defaults of appdirs and we just copied stuff
[01:48:37] <dstufft> https://github.com/pypa/pip/blob/develop/pip/appdirs.py
[01:50:49] <r1chardj0n3s> ah, ok
[01:50:57] <r1chardj0n3s> totally missed that, soz
[01:52:30] <dstufft> we don't actually run under Jythin right now :D
[01:52:38] <r1chardj0n3s> \o/
[01:52:45] <dstufft> but jim is fixing that
[01:52:58] <dstufft> and someone else is working on IronPython
[01:53:00] <r1chardj0n3s> ok, Imma add stuffs to appdata in pip to do the site stuffs
[01:53:08] <r1chardj0n3s> copypasta mostly
[01:53:37] <r1chardj0n3s> (with pip modifications)
[01:54:07] <dstufft> +1
[01:54:27] <dstufft> PEP 453 basically meant suddenly a lot of people cared a lot more about getting pip to work on non CPython/PyPy
[02:02:13] <r1chardj0n3s> yup :)
[02:10:07] <r1chardj0n3s> ok, code written, now to attempt to write the user guide for it lol ;)
[05:48:49] <jezdez> dstufft: unhappy about the weirdness of the standard. looking at other software on my ubuntu machine only very few use XDG so I’m not sure why we should. pip isn’t particularly married to the X desktop after all
[05:50:55] <dstufft> jezdez: interesting, I don't find the standard wierd at all except the default to /etc/xdg/ instead of just /etc/, what parts do you find wierd?
[05:52:05] <jezdez> dstufft: it seems like a non-standard to me, why isn’t everyone else using /etc/xdg/<foo> but instead /etc/<foo>?
[05:52:26] <dstufft> /etc/xdg/ seems to be the most ignored part of the standard, the rest of it seems to be followed
[05:52:45] <dstufft> git follows XDG for instance
[05:53:33] <jezdez> and git is a good example for pip to follow?
[05:53:59] <jezdez> http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html is laughable as a standard
[05:54:59] <dstufft> I'm not sure how to answer the git question fully, I don't think git is a bad example for pip to follow, certainly some parts of git I don't think we should, but a lot of git is well designed and well thought out and is definitely a good example
[05:55:16] <dstufft> I'm also not sure how to answer some of the questions that XDG answers elsewise
[05:55:26] <dstufft> without just making shit up
[05:55:37] <dstufft> where do you put a per user cache at for instance
[05:56:22] <jezdez> IIRC others use ~/.<foo>/cache for stuff like that
[05:56:34] <jezdez> I don’t follow why we can’t do that as well
[05:58:03] <dstufft> partially because that's a kind of crappy "standard" in general. You generally don't want to backup or version control a cache directory, but doing it that way means I need to ensure that various ~/.<foo>/cache directories are excluded from that vs excluding all of ~/.cache
[05:58:41] <dstufft> I mean that's the just make shit up angle, which means that for someone trying to do something for _all_ of their software, they need to investigate each one individually
[05:59:31] <jezdez> understood and I sympathise for those people having to exclude the pip cache folder from their backup
[06:00:28] <jezdez> what strikes me as particularly bad is the naming of /etc/xdg I think
[06:00:39] <jezdez> ~/.config/ I can get behind
[06:01:08] <jezdez> I guess /etc/config/ seemed a bit weird
[06:01:19] <dstufft> Yes I don't particularly like that, and in my investigation a lot of things simply don't bother to follow that rule as a default and they just default to /etc/, or they default to "/etc/:/etc/xdg/"
[06:01:40] <jezdez> can we do the latter as well?
[06:01:52] <jezdez> config parser does support multiple locations, right?
[06:02:17] <dstufft> yes, and that was my understanding of what we were actually going to do, becuase I don't particually like the /etc/xdg thing either and nor did other people in that thread :)
[06:02:49] <dstufft> I mean even if we move our config to ~/.config/, we'll still support the "old" location too
[06:02:52] <dstufft> for backwards compat
[06:02:59] <jezdez> okay in that case I think we just wasted each others time, we’re on the same page :)
[06:03:04] <dstufft> :D
[06:03:05] <jezdez> lemme put this in a comment on the PR
[06:03:39] <jezdez> to me stuff like this is why linuxland is just hostile to users btw
[06:03:51] <jezdez> how the hell haven’t they come up with an official standard for this
[06:04:18] <jezdez> the LSB doesn’t say anything about that, btw?
[06:05:19] <jezdez> I guess that would piss off the bsd people
[06:05:41] <dstufft> Not that i'm aware of
[06:06:05] <dstufft> but yea, this is a constant problem with linux where it's really a whole bunch of vendors who all have their own opinions on things
[06:06:24] <dstufft> vs OSX/Wiondows where you have one vendor who makes the rules
[06:07:21] <r1chardj0n3s> ohai pypa-dev :_
[06:07:27] <r1chardj0n3s> :) even
[06:08:37] <dstufft> hai :D
[06:08:52] <r1chardj0n3s> hey dstufft: just looking at documenting the config changes and adding something about the virtualenv changes; the current get_config_files() has the per-user config file (~/.pip/pip.conf) overriding the virtualenv one in precedence whereas I'd have it the other way around (virtualenv > user > site)
[06:09:14] <dstufft> virtualenv > user > site sounds correct to me
[06:09:22] <dstufft> most specific to least specific
[06:09:33] <r1chardj0n3s> kewl, will change that then
[06:09:45] <r1chardj0n3s> hm, assuming you're ok that that change comes in at the same time as the site change?
[06:09:48] <r1chardj0n3s> in the same PR that is?
[06:10:11] <r1chardj0n3s> I'm just gonna read the IRC log you and jezdez have generated now :)
[06:10:19] <jezdez> teehee :)
[06:10:21] <jezdez> hi r1chardj0n3s!
[06:10:28] <r1chardj0n3s> hihi jezdez :)
[06:10:30] <jezdez> r1chardj0n3s: see my comment, https://github.com/pypa/pip/issues/1733#issuecomment-52277092
[06:11:08] <dstufft> r1chardj0n3s: personally? yea I'm fine with the change happening at the same time, different commits might be nice but I'm not too fussed either way
[06:11:11] <r1chardj0n3s> jezdez: my implementation uses XDG if the var is defined, but also always includes bare /etc/ as a location as well
[06:11:18] <dstufft> someone else might complain I dunno
[06:11:26] <jezdez> r1chardj0n3s: ok
[06:11:52] <dstufft> r1chardj0n3s: probably we want to check for /etc/xdg if the var isn't defined too
[06:12:00] <dstufft> just incase
[06:12:00] <r1chardj0n3s> hm
[06:12:05] <dstufft> it doesn't hurt to check for it
[06:14:04] <r1chardj0n3s> hm, ok
[06:14:34] <r1chardj0n3s> I'm not going to *document* that explicit /etc/xdg path though
[06:14:43] <r1chardj0n3s> '''* On Unix the file may be located in any of the paths set in
[06:14:43] <r1chardj0n3s> $XDG_CONFIG_DIRS (if it exists) or in :file:`/etc/pip.conf`
[06:14:43] <r1chardj0n3s> '''
[06:15:02] <jezdez> r1chardj0n3s: nah, do document it, people will come back with questions otherwise
[06:15:14] <r1chardj0n3s> ugh, too many un-obvious ways to do it!
[06:15:18] <r1chardj0n3s> :P
[06:15:24] <jezdez> sigh
[06:15:30] <dstufft> it's ~linux~
[06:15:34] <r1chardj0n3s> lol
[06:16:13] <jezdez> brb, gotta reboot because the vpn shut me out of all mozilla domains
[06:16:18] <jezdez> computers..
[06:17:07] <r1chardj0n3s> ugh VPNs :P
[06:17:13] <dstufft> the rackspace VPN is the WORST
[06:17:18] <r1chardj0n3s> yes it is
[06:18:11] <r1chardj0n3s> """On Unix the file may be located in in :file:`/etc/pip.conf`. Alternatively
[06:18:11] <r1chardj0n3s> it may be in a "pip" subdirectory of any of the paths set in
[06:18:11] <r1chardj0n3s> $XDG_CONFIG_DIRS (if it exists), for example
[06:18:11] <r1chardj0n3s> :file:`/etc/xdg/pip/pip.conf`."""
[06:18:53] <r1chardj0n3s> and then I'll explicitly add /etc/xdg/pip to the paths if it's not in there
[06:19:32] <dstufft> sounds good to me
[06:20:46] <r1chardj0n3s> "I hope we'll never have to discuss this again." :)
[06:21:31] <r1chardj0n3s> yay, that "rogue" distribution guy has responded with basically "oops" :)
[06:21:50] <dstufft> agronholm: ^^
[06:23:28] <r1chardj0n3s> so if PIP_CONFIG_FILE is set to /dev/null *no* config file will be used
[06:23:43] <r1chardj0n3s> that's not documented
[06:23:49] <jezdez> hah
[06:23:57] <dstufft> that was intentionally not documented IIRC
[06:24:01] <r1chardj0n3s> yep
[06:24:04] <r1chardj0n3s> just checking
[06:24:14] <dstufft> it was a hack for ensurepip until we implemented an "isolation mode"
[06:24:31] <jezdez> what happens if we set it to /dev/random?
[06:25:01] <dstufft> something random!
[06:25:07] <jezdez> d'oh
[06:25:21] <dstufft> (truthfully it'll probably just block forever and/or raise an exception)
[06:25:41] <r1chardj0n3s> configparser will throw a hissy, surely?
[06:26:19] <r1chardj0n3s> hm, that term may be a little Aussie
[06:26:20] <Alex_Gaynor> maybe, but not before it eats all your ram probably
[06:26:36] <r1chardj0n3s> "config parser will fall about laughing, surely?"
[06:26:52] <r1chardj0n3s> ohai Alex_Gaynor, master at all things that eat ram!
[06:27:03] <dstufft> I'm pretty sure that fall about laughing is more Aussie than hissy
[06:27:15] <Alex_Gaynor> https://www.irccloud.com/pastebin/g9nrfYnC
[06:27:29] <dstufft> at least I'm pretty sure that yourself and Nick are the only people I've ever heard say the laughing thing :D
[06:27:45] <r1chardj0n3s> we're a jovial bunch
[06:27:55] <dstufft> Alex_Gaynor: so it'd fail unless you happened to get a [ as the first random character :V
[06:28:06] <r1chardj0n3s> then you're in trouble ;)
[06:28:06] <Alex_Gaynor> dstufft: 1/256 shot
[06:42:30] <jezdez> Alex_Gaynor: thanks for volunteering your computer :)
[07:08:29] <r1chardj0n3s> pip functional tests take too long yolo not gonna run them any more
[07:09:14] <r1chardj0n3s> (that might actually be the first time I've every typed "yolo" ... welp)
[07:12:57] <jezdez> hah
[07:13:09] <jezdez> isn’t travis running those?
[07:13:38] <jezdez> speaking of tests, I recently dabbled with appveyor for running tests for envdir on windows
[07:13:50] <jezdez> it’s quite neat https://ci.appveyor.com/project/jezdez/envdir
[07:14:19] <jezdez> should I spend some time to build a config for pip?
[07:17:32] <r1chardj0n3s> jezdez: this is my pre-PR test run :)
[07:17:56] <jezdez> r1chardj0n3s: you can push the branch to your fork and it’s tested on travis as well
[07:18:22] <jezdez> just so you know
[07:18:26] <r1chardj0n3s> jezdez: hm, do I get that in my own account? I thought it'd only be tested once PR'ed to the pip project
[07:18:51] <jezdez> yeah, login on travis and enable your fork repo
[07:18:59] <jezdez> then it’s the same as the main repo
[07:19:04] <r1chardj0n3s> oh, ok
[07:19:15] <r1chardj0n3s> I'm such a hubgit noob
[07:19:21] <jezdez> https://travis-ci.org/jezdez/kuma/
[07:19:24] <jezdez> for example
[07:20:19] <r1chardj0n3s> got it, thanks
[07:29:43] <r1chardj0n3s> there, PR submitted :)
[07:29:56] <r1chardj0n3s> and that's me done for the day. I'll be lurking.
[07:46:34] <r1chardj0n3s_afk> goddamn E128
[07:46:40] <r1chardj0n3s_afk> gonne be the death of me
[09:05:42] <agronholm> r1chardj0n3s_afk: re: rogue distro -- cheers
[09:05:51] <agronholm> and thanks
[13:53:55] <pmxbot> jaraco pushed 1 commit to setuptools (https://bitbucket.org/pypa/setuptools/) :
[13:53:55] <pmxbot> Use MemoizedZipManifests for all operations. Fixes #240.
[13:57:52] <pmxbot> jaraco pushed 2 commits to setuptools (https://bitbucket.org/pypa/setuptools/) :
[13:57:52] <pmxbot> Added tag 5.7 for changeset 37ed55fd310d
[13:57:52] <pmxbot> Bumped to 5.8 in preparation for next release.