[17:08:40] <agronholm> I'll get that rebase conflict resolved as soon as my brain starts working again (which will require some sleep)
[18:45:29] <yusuket> dstufft: I’m making the changes to https://github.com/pypa/warehouse/pull/299 that you suggested, and I had a couple questions
[18:45:53] <yusuket> 1: I’m wondering what kind of normalization method you were looking for to normalize package naming
[18:46:42] <yusuket> I copied the implementation directly from pypi, so if we change the behaviour in warehouse it’s going to be act differently (just something to be aware of)
[18:47:13] <yusuket> and if we do change it, it doesn’t look like there’s much more required than the method “normalize” you wrote
[18:47:24] <yusuket> Looking at pep426 I found this: http://legacy.python.org/dev/peps/pep-0426/#name
[18:48:14] <yusuket> which makes me think it a package name validator would be the only additional piece of work we need
[18:48:47] <yusuket> mainly because right now, pypi just normalizes out characters that are invalid in the new spec
[18:49:12] <yusuket> thoughts? Also my second question had to do with the merging of noramlize and normalize_package_name
[18:49:29] <yusuket> I noticed FastlyFormatter normalizes all keys, just not those specific to package names
[18:49:47] <yusuket> so I’m not sure if it should share the same normalizer as the package name normalizer
[19:22:06] <dstufft> yusuket: sorry was away for a bit
[19:22:14] <dstufft> the FastlyFormatter only normalizes keys that have a !n
[19:27:59] <dstufft> (like for Warehouse, /simple/foo/ is case insensitive on the foo part, so if you update foo, you also want to purge /simple/Foo/ and /simple/FOO/ and /simple/FoO/ etc
[19:28:06] <dstufft> so tagging makes it way easier
[19:28:33] <dstufft> I should probably document that
[19:28:49] <yusuket> although couldn’t you also have those three routes map to the same cache object? or is that tricky to do?
[19:30:31] <dstufft> So Varnish by default uses the url of the request, and eventually yes we'll use some custom varnish tricks so that it recognizes that the <foo> part is case insensitive so that it only caches one object for all the various spellings
[19:30:44] <dstufft> but it's not just /simple/Foo/, it's also /project/Foo/
[19:31:25] <yusuket> sorry got disconnect for some reason
[19:31:40] <dstufft> [15:30:10] <dstufft> So Varnish by default uses the url of the request, and eventually yes we'll use some custom varnish tricks so that it recognizes that the <foo> part is case insensitive so that it only caches one object for all the various spellings
[19:31:40] <dstufft> [15:30:23] <dstufft> but it's not just /simple/Foo/, it's also /project/Foo/
[19:32:06] <yusuket> yeah right, definitely see the need for a more flexible cache removal method
[19:32:28] <yusuket> so here’s my other question: what did you want to specifically see different about the normalization method?
[19:32:54] <yusuket> I read thread the PEP and it looks like the normalization already does what it needs to (lowercase, ‘_’ -> ‘-‘)
[19:33:20] <yusuket> the only thing that I see we don’t have now is validation that the name doesn’t have illegal characters
[19:33:22] <dstufft> Hmm, the PEP also talks about confusable characters, and I thought I implemented that on PyPI already
[19:33:37] <yusuket> Here’s what I was looking at:
[19:33:58] <dstufft> Index servers MAY consider "confusable" characters (as defined by the Unicode Consortium in TR39: Unicode Security Mechanisms) to be equivalent.
[19:36:14] <yusuket> ok, let me read through that spec
[19:36:14] <dstufft> ah I guess I never implemented that on PyPI yet
[19:36:28] <yusuket> I’m not familiar with this concept so I’ll read up on it
[19:36:34] <dstufft> I did implement this though -> ALTER TABLE packages ADD CONSTRAINT packages_valid_name CHECK (name ~* '^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$'::text);
[19:36:45] <dstufft> to ensure that a package begins and ends with an alpha numeric
[19:37:36] <yusuket> do you think it’s worth it to re-implement that on the server side? My reasoning is it makes it clearer for someone reading the code to understand what the whole spec compliance looks like
[19:43:07] <dstufft> It's been mostly me up till now :] Richard has done some but he's real busy with his job, and my job gives me ~1/2 my time to work on packaging stuff
[19:43:22] <dstufft> If there's anything that confuses you or anything like that, make sure to open up issues to document stuff
[19:43:41] <dstufft> I wrote the bulk of it, so it all makes perfect sense to me :V
[19:44:11] <yusuket> nice, yeah I noticed the bulk of the code comes from you :)
[19:44:29] <yusuket> I actually haven’t encountered anything difficult to understand yet, but I’ve only touched the db code so far
[19:44:53] <yusuket> I’d like to take a crack at implementing the legacy pypi register/package submission apis after this though
[19:46:30] <dstufft> I'm changing the DB stuff around a little bit, the actual classes don't much, but instead of app.db.packaging.get_project(name) it'll be app.query(Packaging).get_project(name)
[19:48:30] <yusuket_> I see, less magic since you’re expicitly passing in the class instead of instantiating it beforehand or instantiating via reflection somewhere?
[19:50:53] <dstufft> basically app is an instance of Warehouse, and it just has a list of classes that it instiates and sticks on app.db in it's __init__
[19:51:26] <dstufft> but you just kind of have to know it does that, and you have to kind of know that app.db.packaging is an instance of warehouse.packaging.db.Database
[19:52:17] <yusuket> yeah, and you want to make it clear that query method are obtained via a class right? and make it clear as to where you can find that class?
[19:52:48] <yusuket> because right now you just know from heuristics that packaging = packaging/db.py
[19:54:06] <dstufft> it also makes testing a lot easier
[19:54:44] <dstufft> https://gist.github.com/dstufft/8562f47203349856f480 vs https://github.com/pypa/warehouse/blob/master/tests/accounts/test_views.py#L45-L85
[20:05:43] <ErikRose> jezdez: dstufft: Doing some reqs.txt 2.0 sketches. Findings so far: YAML is the only off-the-shelf format I like, and it's super complicated. I don't think I'll end up recommending it, but research continues.
[20:06:08] <dstufft> ErikRose: oh I should write down some ideas I had too
[20:06:52] <ErikRose> My current germ of a sketch looks like "somepackage>=3.0" for simple cases but then has indented key-value pairs underneath it for more complicated ones.
[20:06:59] <dstufft> I was thinking of a Python file for requirements 2.0 which "compiles" down to a json lock file. which made some stuff real nice, like implementing groups and such
[20:07:30] <ErikRose> I read all your comments on https://github.com/pypa/pip/issues/1175, if that's what you're repeating.
[20:08:07] <dstufft> trying to find my old examples
[20:08:14] <dstufft> they are burried deep in my gists somewhere
[20:09:05] <ErikRose> I have a preference to make people deal with as few languages as possible.
[20:09:11] <ErikRose> Though that softens if Python is one of them.
[20:10:26] <ErikRose> You were talking about a separate reqsfile (supporting > and <) and lockfile (supporting only ==) in issue 1175. I would very much like one language that handles both, for mental and codebase simplicity.
[20:12:32] <ErikRose> Also, what do you mean by "groups"? Like "stuff for prod" and "stuff for dev"?
[20:12:33] <dstufft> ErikRose: well a human should never touch the lockfile directly
[20:13:27] <ErikRose> You must also have some ideas, then, about additional pip commands and such to create such files. I would be eager to hear them. :-)
[20:13:38] <Ivo> does RTD read pip's docs from master or develop, or?
[20:13:45] <ErikRose> I'm so sorry you couldn't make it to PyCon!
[20:14:31] <dstufft> man this stuff is 2 years old heh
[20:14:36] <dstufft> also I sucked a lot back then
[20:18:38] <dstufft> ErikRose: so the thought about groups, is they are thing likes "production" and "development", you can opt to install them (or not) but they always affective the dependency resolution
[20:31:52] <dstufft> I get mad at package.json constantly
[20:32:06] <dstufft> "whoops added an extra comma LOL ERROR"
[20:32:13] <dstufft> and no support for comments is shitty
[20:32:19] <ErikRose> Not to mention it has nothing to do with Python except that it happens to be in the stdlib
[20:32:48] <dstufft> ErikRose: quick overview of Gemfile // Gemfile.lock, you typically specify ranges in a Gemfile, like "ok this library uses semver and the current version is 1.4.2, so >=1.4.2,<1.5" whereas a Gemfile.lock says "1.4.6 exactly",
[20:32:55] <dstufft> this is powerful because you can do stuff like
[20:33:17] <dstufft> "update my lockfile" and it'll update it to the latest version of whatever you specify in your Gemfile
[20:33:32] <dstufft> so if you are currently on 1.4.6, and 1.4.7 is released, but also 1.5, you'll only update to 1.4.7
[20:33:53] <ErikRose> Sure, sounds like a great feature to aim for.
[20:34:01] <dstufft> it makes your deploys 100% reproduceable via the lockfile, without having to manually manage the lockfile ala requirements.txt
[20:34:21] <ErikRose> (well, it would if somebody added hash-checking to the lockfile :-))
[20:34:29] <dstufft> plus Gemfile you only specify your top level stuff, but lockfiles list the entire dependency tree
[20:35:28] <ErikRose> At the risk of replaying the whole conversation from https://github.com/pypa/pip/issues/1175 again, why not dispense with the non-pinning reqs file and favor setup.py or the upcoming declarative equivalent?
[20:35:32] <dstufft> I see two ways to do it, one is "add it onto the existing stuff" in which case i'd just shoehorn it into the existing #md5=<foo>&sha256=<bar>" stuff that we already support (we support it for #egg and #subdirectory)
[20:35:55] <dstufft> or "get a req 2.0 format figured out"
[20:35:59] <ErikRose> Granted, it would require a real dependency solver to obsolete the use case of "I'm smarter than the resolver, so I did it by hand" use case, but I'm not in a hurry.
[20:36:17] <dstufft> peep isn't really related to the req 2.0 format other than it'll provide a nicer way of specifying that info
[20:37:34] <dstufft> ErikRose: setup.py includes metadata, rquirements files do not, setup.py are "abstract" dependencies (I depend on requests, but I don't know where it's coming from because this is a package not an environment file) whereas requirements are concrete (I depend on requests, and I give an explicit source url of PyPI)
[20:37:35] <ErikRose> Very seldom do I yank something out of version control in a reqs file. Very often do I want to pin the hashes nonetheless.
[20:37:58] <dstufft> ErikRose: I'm pretty sure we don't support that at the moment, but I don't think there's any reason we couldnt is what I mean
[20:38:06] <dstufft> there's an open ticket to support hashes like that already
[20:38:17] <ErikRose> It's probably that one I keep pasting.
[20:38:22] <Ivo> current requirements is just too simple, and bolting on things makes it unwieldly; already a lot of people complain and get confused by needing various --option's for different things in req files, and its not even handled properly everywhere https://github.com/pypa/pip/pull/1720
[20:53:00] <dstufft> I will update master if it's a change to something non-release
[20:53:11] <dstufft> like the docs, or the release scripts
[20:53:43] <Ivo> Maybe I'll leave merging in docs fixes to you guys for now then ^_^
[20:54:49] <qwcode> it would be harmless to merge this really, but for me, I would close it, and just say it's already fixed in develop
[20:56:15] <Ivo> soo... anyone wanna review my PRs for pip? There are actually some that should make testing a lot faster :D
[20:57:03] <Ivo> That Guy dude thought we could cut the time by at least half, so that's exciting..
[20:58:18] <Ivo> dstufft: I take it you're trying to keep your headspace mostly in warehouse atm
[20:58:20] <qwcode> Ivo, for testing (or any "small" changes), feel free to merge yourself if you feel comfortable/confident with it. (my opinion at least)
[20:59:34] <dstufft> Ivo: more or less, though I context switch if I need to :]
[21:04:13] <qwcode> we had conversations in the past about trying to enforce a 2 vote rule or something... but the informal rule now seems to be solo merges are ok for "small" things, and it's a judgement call to bring in votes when you're not sure, or when it's obvious it's a major decision or controversial
[21:04:51] <Ivo> cryptography.io has a gentleman's rule that you can't merge your own PR
[21:05:28] <Ivo> I think a good middleground would be to just look for one other dev's LGTM (i.e code review) before merging
[21:06:29] <Ivo> e.g like https://github.com/pypa/pip/pull/1725
[21:09:45] <dstufft> I think it's hard to get reviews here partially because it's really hard to actually grok what any one change does without a bunch of untangling
[21:09:59] <dstufft> and folks generally don't have time to do that for all the PRs :(
[21:11:42] <dstufft> I think if we actually manage to refactor pip so that it makes sense, reviews would be a lot easier
[21:11:50] <qwcode> looking for old pypa-dev thread from a year ago...
[21:12:24] <dstufft> but part of the problem there is refactoring is hard, our test suite isn't the greatest, and I think I'm the only one who gets time in their day job to do this, so time is short :/
[21:12:28] <qwcode> yea, people are scared to approve stuff they didn't analyze for 3 hours...
[21:12:54] <qwcode> and it's usually only the author who spent 3 hours
[21:13:08] <Ivo> this is also most definitely the case for virtualenv as well, except 1000 times worse
[21:13:10] <dstufft> I think this is also why we are really bad at merging PRs from non contributors too
[21:14:00] <pf_moore> yeah, I try to be a bit more willing to merge PRs from non-contributors than I would be for my own ones, just because it's good to give encouragement
[21:14:42] <dstufft> if I ever finish virtualenv 2.0 it should be way cleaner
[21:14:55] <dstufft> and the hacks should be isolated into one danger area
[21:14:55] <qwcode> back when I was young... https://groups.google.com/forum/#!topic/python-virtualenv/dPDkQWaBXts
[21:15:05] <Ivo> could we merge a whole lot of stuff for virtualenv, and release a beta for a month? I know you were sad that not very many people have tried your pip RCs dstufft but I can't see any other way and there are some fixes that would really help some ppl atm
[21:15:32] <qwcode> wow, I said "and wait for at least 3 votes IMO"
[21:16:00] <dstufft> Ivo: we can merge stuff sure :]
[21:16:08] <dstufft> generally we release virtualenv and pip together
[21:16:15] <dstufft> but I don't really think it'd be bad to decouple those
[21:16:31] <Ivo> isn't it more of a one way relationship?
[21:16:51] <Ivo> if pip comes out there's no reason not to release a patch version for virtualenv as well
[21:17:12] <qwcode> "I agree everyone can solo merge/push simple bugs, fixes and docs"
[21:17:55] <pf_moore> what stuff for virtualenv? A lot of the recent churn seems to be around the activate scripts. I'd be tempted to say they are OK to merge just because they are (somewhat) optional.
[21:18:03] <dstufft> Ivo: I'm just saying we've historically had the virtualenv and pip release cycles aligned
[21:18:17] <dstufft> but I don't really think it'd be a bad idea to say we don't care about that
[21:18:31] <qwcode> hah, "the point of this, is so nobody has to be a super hero solo merger."
[21:18:48] <Ivo> pf_moore: just *fixing* activate scripts for shells, and also there's one that stops virtualenv working on arm atm; off the top of my head
[21:19:20] <pf_moore> dstufft: I think the main thing is not to release virtualenv with pip included then release a new pip a couple of weeks later. Otherwise, it's not a big deal
[21:19:56] <pf_moore> Ivo: yeah, I generally don't comment on those because as a non-Unix guy I don't really have a view
[21:20:09] <Ivo> pf_moore: you need to run a virtualbox more often :)
[21:20:52] <Ivo> I need an rpi/beagleboard to tinker with so I've got an arm thing to test on
[21:21:01] <dstufft> sooner or later we'll convert pf_moore to the dark side
[21:21:02] <pf_moore> I *can* run Unix, it's just that when I do I spend more time getting annoyed at how hard it is to set up Ubuntu or whatever how I like it than actually testing anything ;-)
[21:21:22] <dstufft> (and then pip will never work on Windows ever again because i'm pretty sure the only reason it does is pf_moore
[21:21:25] <qwcode> gotta run, just when it was getting exciting...
[21:29:42] <pf_moore> this is what, as an outsider, I don't understand with Linux
[21:29:53] <pf_moore> It's my PC, why can't I screw it up if I want?
[21:30:18] <dstufft> pf_moore: you can! you just can't install it from the built in installer
[21:30:24] <Ivo> pf_moore: it all comes from the fact they provide all the software for the people that use their OS (where windows gives you a browser and tells you good luck)
[21:33:11] <pf_moore> yeah, but I sort of lose the thread when they complain about /usr/local - I thought that was specifically *for* the local sysadmin to use...
[21:33:32] <dstufft> pf_moore: pip installs to /usr/lib/python/X by default on most Linux systems
[21:36:58] <dstufft> and that annoys debian/fedora/whoever
[21:37:09] <dstufft> and it so happens that pip guides you to doing that
[21:37:18] <dstufft> (sudo pip install is more obvious to do than pip install --user)
[21:37:32] <Ivo> maybe we should change that dstufft
[21:37:39] <pf_moore> well, I'd say that if /usr/local is for me, and installing stuff there breaks the OS, then that's an OS bug (just not the one you'd first think it is)
[21:37:44] <Ivo> make pip install --user more obvious than sudo pip install