[17:39:18] <dstufft> jaraco: I know we talked about it before, but I forget what the outcome was, how did we decide to handle PEP 440 in setuptools? something makes me think it was just copy/pasting the regexes from the packaging lib into pkg_resources and modifying the APIs to use them... but I may be wrong
[17:39:38] <jaraco> I don't think we talked about a specific implementation.
[17:39:53] <jaraco> I haven't put much thought into the specific implementation, but I'm happy to review pull requests.
[21:02:43] <jaraco> dstufft: I slightly prefer bitbucket because it keeps the history in one place. Github is nicer for travis integration. I'll accept a PR on either.
[21:03:03] <jaraco> For you, use whatever's easiest for you.
[21:03:10] <dstufft> ok, I'll probably do github then because everytime I use hg I end up getting frustrated :D
[22:47:09] <jaraco> Is the plan to adapt the current implementation to match pep440? Why not have pkg_resources use a reference implementation entirely?
[22:49:54] <dstufft> jaraco: so the main reason is that the api that pkg_resources provides is "lower level" (in a way) than packaging, int hat pkg_resources.parse_version returns the compare key, whereas packaging has a Version class... if you're OK with it returning classes instead of tuples I can totally do that though
[22:50:07] <dstufft> or well I suppose I could return the internal sort key
[22:50:13] <dstufft> that the class in packaging uses
[22:51:08] <jaraco> Does Version implement __iter__ ?
[22:51:35] <jaraco> If it did, then it could be a drop-in replacement for a tuple.
[22:52:01] <jaraco> And if __iter__ returns _cmp_key, and if _cmp_key items are strings, then that would be completely compatible with parse_version.
[22:53:40] <dstufft> it does not implement __iter__, the API it provides is mostly opaque in that you give it a version, and it treats itself as the reprenstation of that version, you can turn it back into a string, or compare them, or get the public or local part of the version, or test if it's a pre-release
[22:55:33] <jaraco> Is _cmp_key a tuple of strings, similar to the result of parse_version?
[22:56:42] <dstufft> it's a tuple of integers, other tuples (which can contain integers or strings), and a special Infinity/NegativeInfinity objects
[22:57:55] <jaraco> Are Versions sortable against each other (i.e. implement __lt__)?
[22:59:03] <jaraco> It's more important that packaging tools start using the same structures.
[23:01:08] <dstufft> there's one other part in this all, Version can only handle things which are parseable as PEP 440 versions, historically parse_version would parse _anything_, Version only handles PEP 440, there is LegacyVersion which handles anything, but you cannot compare a Version and a LegacyVersion at the moment - Though perhaps that should change so the LegacyVersion is always considered < Version
[23:05:28] <jaraco> That is, by deprecating broken versions, do we break those packages in indexes where they're hosted?
[23:08:35] <dstufft> it does, but I'll be modifying it to use packaging itself too
[23:09:26] <jaraco> I guess I worry about other indexes like devpi or chishop - if they rely on pkg_resources and can no longer host packages, that might be a problem.