PMXBOT Log file Viewer

Help | Karma | Search:

#pypa-dev logs for Tuesday the 9th of June, 2015

(Back to #pypa-dev overview) (Back to channel listing) (Animate logs)
[00:09:29] <lifeless> dstufft: ^
[00:09:36] <lifeless> it might blow up in tests, dunno :)
[07:20:53] <tomprince> lifeless: Nothing very interesting. We use a version of versioneer that doesn't support PEP440 and we have tooling that parses the version.
[07:22:07] <tomprince> The non-matching version comes from new setuptools/pip using === for non-pep440 versions and/org old setuptools mangling versions that don't match its idea of what a version can be.
[07:23:41] <tomprince> (re: https://github.com/pypa/pip/issues/2867#issuecomment-110167217)
[07:52:55] <lifeless> tomprince: thanks
[07:53:09] <lifeless> tomprince: so I've put a patch up; it works in tests but be glad to know it works in practice :)
[08:19:01] <anthony25> hi
[08:21:34] <anthony25> for my project, I'm using a little program coded in C to interact with iptables where I do a setuid(0) (because I don't want it to run as root), so I have to add the +s flag to the executable
[08:21:48] <anthony25> how can I include that in my setup.py using setuptools ?
[08:22:14] <anthony25> or if you think about another solution about how could I do that outside the setup.py
[08:51:02] <lifeless> you could use sudo
[08:51:29] <lifeless> or you could run as root and drop privileges immediately, forking off a process to do stuff you need to do as root
[08:51:40] <lifeless> angus lees has an example for that in Neutron, for instance
[08:54:24] <anthony25> I used sudo, but I find that way a bit dirty, doesn't it ?
[08:54:50] <lifeless> sudo gives fine grained control
[08:54:55] <lifeless> setuid less so
[08:55:21] <anthony25> ok, thanks
[17:01:34] <maxking> dstufft: Oh sorry! I totally forgot I pinged you on other channel.
[17:01:46] <maxking> my bad.
[17:03:00] <dstufft> maxking: no problem :)
[17:04:27] <maxking> dstufft: I am trying to install docker and docker-compose.
[17:04:37] <dstufft> maxking: what OS are you on?
[17:06:09] <maxking> dstufft: I am on debian sid, following this guide http://docs.docker.com/installation/debian/
[17:06:39] <dstufft> sid might have new enough versions in it's apt repos already
[17:07:06] <dstufft> docker.io on sid is 1.6.2
[17:07:35] <maxking> dstufft: yeah.
[17:08:04] <dstufft> I think you should just be able to apt-get install docker.io docker-compose
[17:08:32] <maxking> dstufft: Yep, already done that.
[17:09:03] <dstufft> I think just docker-compose build && docker-compose up in the root of the Warehouse repo will give you warehouse running then
[17:09:26] <maxking> dstufft: I have a slow connection, It will take some time to get everything on my machine running.
[17:09:32] <dstufft> makes sense
[17:09:48] <dstufft> unless you change dependencies on Warehouse, you shouldn't need to build again
[17:09:49] <maxking> Can you point me to some easy bugs to get started?
[17:09:56] <dstufft> (or someone else changes dependencies)
[17:10:02] <dstufft> so it should all be cached after that
[17:10:27] <dstufft> https://github.com/pypa/warehouse/issues?q=is%3Aopen+is%3Aissue+label%3Aeasy there's a few things I tagged easy
[17:12:30] <dstufft> https://github.com/pypa/warehouse/milestones/Become%20PyPI is everything we need to deploy to pypi.python.org fwiw
[17:13:08] <maxking> dstufft: There are quite a few of them.
[17:14:04] <maxking> dstufft: Are there any other people actively developing warehouse apart from you?
[17:14:53] <dstufft> I am the main contributor, you can see who has commits landed here https://github.com/pypa/warehouse/graphs/contributors (or use the drop down to use any other metric that suits you)
[17:23:42] <maxking> dstufft: I will try my best to help with speeding up the release to PyPi.
[17:24:35] <dstufft> maxking: awesome!
[17:36:05] <hargup> Hell dstufft, maxking I'm an intern at Continuum Analytics and I'm working on automatically creating conda packages from PyPI
[17:36:10] <hargup> oops
[17:36:14] <hargup> s/Hell/Hello
[17:39:55] <dstufft> hargup: hello
[18:29:27] <lifeless> dstufft: hai; I'd like a) a gist with what you want to make pbr compatible with pip's needs - e.g. 'implementation non-specific make X happen and I'll seriously consider using pbr'
[18:29:45] <lifeless> dstufft: such as 'sdists that don't have setup-requires'
[18:30:01] <lifeless> dstufft: secondly, I'd like to make a supported interface for parsing requirements files
[18:30:45] <lifeless> dstufft: I think the current one is stable-enough (req.req_file.parse_requirements) - what do you think? [we parse requirements files in some openstack meta-tooling, and do it badly]
[18:32:31] <sigmavirus24> lifeless: IMO, if we need something to parse requirements it should be pulled out into a separate library
[18:32:43] <sigmavirus24> And then pip can consume that and so can whomever else needs it
[18:32:50] <lifeless> sigmavirus24: well, I can understand the argument, but
[18:32:52] <sigmavirus24> like pip-missing-reqs or whatever that package is
[18:33:07] <lifeless> sigmavirus24: pip defined and owns this, and we're fine with that - we're not trying to define it as a new external thing
[18:33:22] <sigmavirus24> Right but pip is an application, not a library
[18:33:38] <lifeless> sigmavirus24: dstufft has previously said he's fine defining stable bits in the library when folk ask for it
[18:34:07] <lifeless> sigmavirus24: but that the default is as you say, consenting adults territory
[18:34:23] <sigmavirus24> Yeah except pip is never able to consent when people use its internals
[18:34:31] <sigmavirus24> It hasn't been a consenting party previously
[18:34:34] <lifeless> unless they ask
[18:34:40] <lifeless> thus, asking :)
[18:34:59] <sigmavirus24> I understand why you're asking
[18:35:05] <lifeless> I think putting InstallRequirement into a separate library would be high friction for low benefit
[18:35:41] <lifeless> and we don't have a pure data thing to parse into at this point
[18:35:42] <sigmavirus24> I think there's a lot of benefit: Namely a backwards compatibility guarantee
[18:36:12] <sigmavirus24> I know you're asking for that here, but I feel weird about pip being forced to export stable APIs when it may need to change them
[18:36:21] <lifeless> how would that add such a guarantee? it would be still subject to making changes, and it would be vendored into pip so it could easily do api breaks without affecting pip
[18:36:42] <lifeless> so any guarantee would be a matter of policy
[18:37:16] <lifeless> and - pip does major releases too, its not like I'm asking pip to never break it, just to be aware that there are users for that api and please be a litle bit gentle around its evolution
[18:38:02] <dstufft> I don't think we can make the parser a stable public API as it is without also making PipSession a stable API
[18:39:21] <sigmavirus24> lifeless: except the reaction to pip's major releases while overwhelmingly positive have had some very loud people (including people in OpenStack) complaining even though they are major releases
[18:39:54] <sigmavirus24> So there are some (artificial) expectations around pip that would probably be even stricter if pip started exporting APIs
[18:41:13] <lifeless> ok, so lets wind back all the terms
[18:41:17] <lifeless> here's what I want to do
[18:41:24] <lifeless> and what I'd like the pip 'core' to do
[18:41:48] <lifeless> I'd like to call parse_requirements('global-requirements.txt') rather than what we currently do that is broken.
[18:42:05] <lifeless> its a maintenance burden on openstacks side *either way*
[18:42:15] <lifeless> either we write new code everytime the format changes
[18:42:31] <lifeless> or we tweak the code we use to evaluate the parsed response.
[18:42:54] <lifeless> I'd rather tweak high level code than be in the business of chasing a parser with no formal definition in a separate codebase
[18:43:13] <lifeless> I'd like the pip code to put in mild backwards-compat effort on changes to the signature of parse_requirements
[18:43:37] <lifeless> rather than assuming it has no users outside the codebase
[18:44:00] <lifeless> ^- bundle that up with whatever labels-for-the-outside; it seems a reasonable request to me. If its not, thats ok.
[18:44:06] <lifeless> But I hope it is
[18:47:49] <dstufft> lifeless: I don't have a problem with the concept of creating a stable API for parsing requirements files, but the problem I see is that the API as it is right now is that exposing parse_requirements as a stable API requires exposing a bunch of other things too because it has a bunch of layering violations (as does most of pip)
[18:48:13] <lifeless> sure, I understand :)
[18:48:16] <dstufft> parse_requirements takes a finder as an input, a session, an options dictionary, a wheel cache thing
[18:48:21] <dstufft> and returns InstallRequirements
[18:48:26] <lifeless> much of those can be None
[18:48:33] <lifeless> (and it works when they are)
[18:53:24] <dstufft> it "works" in that it doesn't raise an exception, but if you don't pass in a finder it just flat out ignores a bunch of stuff from the requirements files (--find-links, --index-url, --allow-unverified, --allow-external, --binary, maybe others), if you don't pass in the others it ignores other things
[18:53:55] <lifeless> yah
[18:54:02] <lifeless> for our dataset thats ok
[18:54:43] <lifeless> http://logs.openstack.org/50/189250/1/check/check-requirements-integration-dsvm/e53b7f4/logs/devstacklog.txt.gz#_2015-06-08_10_37_25_988
[18:58:08] <dstufft> lifeless: I think the best thing to do is open an issue about stablizing that API. I know tox was looking to use the same API
[18:58:24] <dstufft> and I think it's the part of pip that other people are using too
[19:00:19] <lifeless> will do
[19:01:46] <dstufft> I don't want to expose an API that you need to use other, non exposed parts of pip to do useful things with that people want to do. So it's likely we'll need to refactor the API to remove the layering violations (likely make it so it takes a filename (or a string) and returns the parsed information and have the caller responsible for mutating finders and sessions and such instead of having the parser do it
[19:03:52] <dstufft> the other question is whether we want to expose parts of pip as an API at all or not. So far we've avoided that question (more or less) by splitting parts out of pip into their own libraries (via packaging). It'll effect how we do vendoring (there's problems with our current solution where it fails in certain situations, but we don't run into those situations very often because we don't support being called as a library)
[19:04:16] <dstufft> requests stole our vendoring shenagins for a version or two, and had to ultimately rip it out because it just broke too much
[19:04:24] <dstufft> when requests was used as a library
[19:05:09] <sigmavirus24> We have new vendoring shenanigans
[19:05:20] <dstufft> yay new vendoring shenangins
[19:05:29] <sigmavirus24> Much much much simpler
[19:05:40] <dstufft> are they helpful shenagins
[19:06:06] <dstufft> the goal of our old shenagins was to remove the need (or reduce it) to have random downstreams patch our sources
[19:06:10] <dstufft> to update import statements
[19:06:16] <sigmavirus24> https://github.com/kennethreitz/requests/pull/2567
[19:07:09] <dstufft> ah
[19:07:20] <dstufft> just try to import locally, and fallback to global
[19:08:32] <sigmavirus24> Yeah
[19:08:38] <sigmavirus24> And update sys.modules appropriately
[19:12:07] <dstufft> I'm gonna get barry to look at it too
[19:18:28] <maxking> dstufft: So, I have everything installed and running.
[19:18:42] <maxking> I can see the warehouse page on my browser :D
[19:20:08] <tomprince> lifeless: I think a good long-term result would be for pip to become a shallow wrapper around other libraries.
[19:20:10] <sigmavirus24> Thanks @dstufft
[19:20:19] <tomprince> Which suggests moving this kind of stuff out of pip.
[19:20:33] <tomprince> I don't know if that is compatible with dstufft's plans, though.
[19:20:35] <sigmavirus24> == tomprince
[19:22:47] <tomprince> In that scenario, pip probably wouldn't ever grow stable APIs, but all the APIs people care about would be come stable apis of the underlying libraries.
[19:23:51] <dstufft> it's roughly equivalent to my idealized plans yea.
[19:25:15] <lifeless> anyhwo enough rathole
[19:25:19] <lifeless> I'll open a ticket
[19:25:34] <lifeless> I still want that gist of high level needs to use pbr
[19:25:51] <lifeless> so I can see if I can come up with a design for them that doesn't squick me :)
[19:28:13] <maxking> dstufft: How to create a user account ? The sign up button does not work
[19:29:28] <dstufft> lifeless: I'll write something up later today that has what I want in a system and what the things pbr does or doesn't do that holds me back from using it
[19:29:46] <dstufft> maxking: we don't have sign up working yet, you can login with dstufft // password though
[19:29:56] <lifeless> dstufft: thanks
[19:32:31] <maxking> dstufft: I see no change even after logging in, is that normal?
[19:32:45] <maxking> Both Sign In and Sign Up buttons are still there.
[19:36:27] <dstufft> maxking: yes.
[19:37:23] <maxking> dstufft: How do I get a shell access to the container?
[19:37:50] <maxking> Documentation says we can get warehouse shell access using 'warehouse shell', but that probably needs to be done inside the container?
[19:38:17] <dstufft> maxking: you can't get shell access to the container that's already running, but you can spin up a second copy of the web container running bash instead of warehouse by doing docker-compose run web bash
[19:40:45] <dstufft> the praticial effects of this, is that you can't change files around in the running container, (but the current directory is mounted as /app/, so you can make changes to warehouse outside of the container and have thems how up inside)
[19:42:40] <maxking> dstufft: Okay, cool!
[19:42:49] <tomprince> 'docker exec' allows you to do that.
[19:42:54] <maxking> I am trying to get to know the source code.
[19:43:03] <dstufft> ah
[19:43:06] <tomprince> With new enough docker.
[19:43:08] <maxking> And then will start with one of the easy issues.
[19:43:11] <dstufft> apparently docker exec lets you do that :)
[19:43:29] <dstufft> I don't know docker super well, I was just trying out docker-compose as an easy way for people to run warehouse
[19:43:36] <dstufft> I have mixed feelings on how well it achieves that goal
[19:45:14] <maxking> dstufft: Yeah, docker exec works.
[19:46:27] <maxking> dstufft: so warehouse uses any web framework?
[19:46:47] <dstufft> maxking: it uses Pyramid
[19:50:54] <maxking> dstufft: tox fails with an invocation error, any idea why?
[19:51:03] <dstufft> what's the error
[19:52:37] <maxking> dstufft: Okay, its permission error. Probably I ran something with sudo and thus permissions have changed.
[19:54:27] <maxking> dstufft: Sorry for all the bugging, and thanks a lot for all your patient answers.
[19:54:34] <dstufft> maxking: no problem :)
[22:09:34] <lifeless> dstufft: you might want to put my fix for pip.conf into a 7.0.4 for folk
[22:15:16] <lifeless> dstufft: I think https://github.com/pypa/pip/issues/2789 can be closed
[22:18:22] <lifeless> ah, CI failure. lets see
[22:20:35] <lifeless> sadface E TypeError: 'str' does not support the buffer interface
[22:20:42] <lifeless> tests. sigh.
[22:27:23] <lifeless> ok, that should fix the tests
[22:46:52] <lifeless> dstufft: https://github.com/pypa/pip/pull/2886 is about to go green
[22:47:26] <lifeless> just waiting on py35 to report back
[22:47:36] <dstufft> cool
[22:47:38] <dstufft> py35 is slow
[22:47:46] <dstufft> because we compile Python in it lol
[22:48:04] <lifeless> don't travis have a nightly thing ?
[22:48:48] <lifeless> dstufft: http://docs.travis-ci.com/user/languages/python/#Nightly-build-support
[22:49:12] <dstufft> oh
[22:49:14] <dstufft> WELP
[22:49:17] <dstufft> that's new
[22:49:19] <lifeless> should be close enough to 3.5 for now
[23:02:58] <lifeless> yep green
[23:03:52] <lifeless> dstufft: ^ [only nagging on this one cause I think it will mitigate the 'oh noes we have to use 6.1.1' hysteria
[23:21:48] <dstufft> lifeless: good call on the nightly thing, much faste rnow
[23:21:51] <dstufft> will merge your PR shortly
[23:28:34] <lifeless> dstufft: does https://github.com/pypa/pip/issues/2867 close automatically, or need manual poking ?
[23:29:30] <dstufft> it needs manual closing, it'll only close automatically if you include something like ``Closes #2867`` in the PR body before it gets merged
[23:29:57] <dstufft> https://github.com/blog/1506-closing-issues-via-pull-requests
[23:30:11] <lifeless> thanks