PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Wednesday the 4th of March, 2015

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[11:11:17] <ionelmc> how can i avoid this sort of warning: /usr/lib/python2.7/pkgutil.py:186: ImportWarning: Not importing directory '/home/ionel/foobar/.ve/lib/python2.7/site-packages/sphinxcontrib': missing __init__.py ?
[11:11:28] <ionelmc> seems it's a namespace package
[12:55:11] <savior> hi guys
[12:55:16] <savior> I have question about pip
[12:55:40] <savior> how can I make pip pick up requirements.txt from a tarball?
[12:55:53] <savior> so if I want to do this: pip install whatever.tar.gz
[12:56:11] <savior> setup.py is run, but apparently requirements.txt is not taken into account
[12:56:15] <savior> pip 1.4.1
[12:56:43] <mgedmin> savior, use install_requires from setup.py instead of requirements.txt
[12:59:04] <david_cliqz> mgedmin: It's savior again
[12:59:14] <david_cliqz> just the connection was lost
[12:59:24] <david_cliqz> what I wanted to ask is
[12:59:27] <david_cliqz> mgedmin: thanks, but really my requirements.txt is just one line: --index-url XXX
[12:59:34] <david_cliqz> can I put that into install_requires as well?
[12:59:49] <apollo13> no
[13:00:22] <david_cliqz> so how can I make it take effect?
[13:00:32] <apollo13> you can't
[13:09:33] <david_cliqz> thanks
[15:08:26] <Bob_George33> Hey
[15:09:25] <Bob_George33> I've tried searching around and can't find anything that will help me
[15:10:21] <Bob_George33> I'm using setuptools to install a package and it makes the one file I need executable, non executable, despite the face that it is marked as an executable
[15:53:16] <malinoff> hi, #python seems to ignore my question, so i'm trying to ask here
[15:53:18] <malinoff> if i have a namespaced package X and a couple of subpackages X.A, X.B, X.C, can i still have a dedicated package X ?
[15:53:44] <malinoff> maybe with some clever tricks using importlib machinery?
[16:05:07] <pjdelport> malinoff: I'm not sure, but are you sure you want the excitement of maintaining clever tricks when it comes to packaging?
[16:06:33] <malinoff> pjdelport, well, i can live with just one package applying such tricks
[16:07:01] <malinoff> i just want to avoid creating mylib.core/mylib.common/whatever package
[16:07:19] <malinoff> simply because it is not *core*
[16:07:39] <malinoff> it can (and maybe should) be used as standalone library
[16:09:31] <malinoff> i should probably just use a submodule as namespace package, like mylib.ext
[16:09:48] <malinoff> and instead of having mylib.A, mylib.B i should have mylib.ext.A, mylib.ext.B etc
[16:21:10] <malinoff> oh, i can't do that
[17:23:48] <ionelmc> malinoff: you could implement some custom namespacing
[17:23:56] <ionelmc> then you can do whatever you want
[17:24:09] <ionelmc> take a look at how pylib/pytest do it
[17:24:24] <malinoff> ionelmc, you mean py. namespace?
[17:24:31] <ionelmc> malinoff: yeah
[17:24:47] <malinoff> ionelmc, yes, i know about it, same for zc, zope etc
[17:25:24] <ionelmc> tho I'd really hate to be the user reporting terrible bugs with your namespacing thing
[17:25:44] <ionelmc> cause I'd be a sad and angry user :-)
[17:25:46] <malinoff> the question is: when i have something. namespace, can i have a dedicated "something" package, so import something will import this package and import something.subpackage will import namespace package
[17:26:49] <malinoff> but i figured already this is not possible
[17:27:27] <ionelmc> malinoff: it is? https://pypi.python.org/pypi/py
[17:28:00] <ionelmc> i briefly looked once, didn't look simple at all
[17:28:24] <malinoff> oh
[17:28:25] <malinoff> right
[17:28:33] <malinoff> i completely forgot that py is such dedicated package
[17:28:35] <malinoff> thank you
[17:30:32] <malinoff> so there are "clever tricks" i was talking about :)
[17:44:50] <ionelmc> malinoff: and for the next trick: angry mob of users with pitchforks waiting in the bugtracker
[17:44:53] <ionelmc> hehe
[17:46:47] <malinoff> ionelmc, yeah, i'll keep that tricks in mind, but i definitely not gonna use it for now
[17:48:23] <malinoff> this reminds me these Armin's talks playing with sys._getframe and importlib machinery, allowing to import json files as modules
[18:33:37] <ronny> ionelmc, malinoff: pytest is not in the py namespace ever since it got split out
[18:34:44] <ronny> ionelmc, malinoff: bascially package namespaces are broken on py2, and afair a mess on py3
[18:35:02] <ionelmc> ronny: why does it have that weird _pytest package then?
[18:35:28] <ronny> ionelmc: python -m pytest broke strangely on some python versions unless it was a module
[18:35:52] <ionelmc> aaah ... 2.6 support
[18:35:54] <ionelmc> nasty
[18:36:36] <ionelmc> but didn't you drop support for 2.6?
[18:36:50] <mathieui> 2.6 is a PITA
[18:36:56] <ronny> no, only 2.5
[18:37:14] <ronny> 2.6 has another few years left to support i think
[18:37:31] <malinoff> yeah, 2.6 is pretty easy to support with additional dependencies if 2.7 is supported too
[18:38:31] <ionelmc> yeah, if your dependency is pain_tolerance
[18:38:32] <ionelmc> hehe
[18:38:57] <malinoff> nope, just importlib in my case :)
[19:31:40] <muchasgracias> hi, I have an outdated python program in my "pip list --outdated", what's the proper command to update it?
[19:34:06] <tos9> muchasgracias: pip install -U
[19:34:39] <muchasgracias> tos9: with the package name?
[19:34:44] <tos9> muchasgracias: yep
[19:35:13] <muchasgracias> tos9: is there a command to update all outdated package at once?
[19:35:31] <tos9> muchasgracias: pip list --outdated | parallel -X pip install -U
[19:35:32] <tos9> :)
[19:35:41] <muchasgracias> cool
[19:35:42] <muchasgracias> danke!
[19:40:13] <Wooble> (it's probably usually a better idea to do 1 at a time and run your test suite ;) )
[19:44:51] <pf_moore> tos9: won't that choke on the "(Current: X.Y Latest: V.W)" bit of the pip list output?
[19:45:04] <tos9> pf_moore: uh, yeah, I forgot that that was in there
[19:45:21] <tos9> so you need a sed in there as well then :)
[19:45:39] <pf_moore> np, I was just working on pip list and it occurred to me that the output is for human consumption, but not that scriptable
[19:45:47] <tos9> Yeah. Agreed.
[19:47:25] <tos9> Heh. pip list is pretty unhappy with its pipe closing.
[19:48:26] <tos9> oh ew
[19:48:32] <tos9> also location errors go to stdout
[19:50:27] <pf_moore> tos9: What do you mean by location errors?
[19:50:50] <tos9> pf_moore: Could not find a download satisfying ...
[19:50:55] <tos9> Some external sources were ...
[19:51:50] <pf_moore> Got a precise error message? I'm too lazy to look, and grepping the source is easy :-)
[19:51:58] <tos9> Sorry :)
[19:51:59] <tos9> yeah
[19:51:59] <tos9> sec
[19:52:10] <pf_moore> no problem
[19:52:24] <tos9> pf_moore: Could not find any downloads that satisfy the requirement settings
[19:52:41] <tos9> Some externally hosted files were ignored as access to them may be unreliable (use --allow-external settings to allow).
[19:54:56] <pf_moore> OK, pip just uses the stdlib logger. That one's logger.critical(...) and the normal output is logger.info(...).
[19:55:14] <pf_moore> Looks like we don't split the log levels by stream
[19:55:20] <pf_moore> Blech.
[19:58:16] <tos9> Yeah :/
[20:01:47] <pf_moore> Seems to me that using logging for actual user output (as opposed to, well, logging) is pretty icky.
[20:02:03] <pf_moore> But I can't see it changing soon, for hysterical raisins
[20:02:23] <tos9> Yeah. I think probably a new machine readable command might need to be the thing
[20:02:37] <tos9> unless pip wants to handle it entirely
[20:06:45] <pf_moore> Sigh. This feels similar to the old "pip doesn't have a Python API" issue - pip just isn't written to be used as a component.
[20:17:30] <tos9> well, pip doesn't have an API has an "answer" which is "the CLI is the API"
[20:17:56] <tos9> and then if anyone says "yeah but that stinks it's written in Python" you can say "hey mercurial does the same, and so does ..." :P
[20:18:34] <tos9> although I think every time that one comes up the conversation seems to steer towards "What does the api need to have and who wants to do the work for it"
[20:19:05] <dstufft> yes that's basically the question
[20:19:40] <dstufft> figuring out what an API would look like, and whether or not we're happy with the current APIs exposed to do particular things
[20:19:43] <tos9> :) and since the answer doesn't have "tos9 does" in it (at least not right now) I get to not complain about that one :P
[20:20:00] <dstufft> and whether the API should belong inside pip, or if packaging or some other lib is where it belongs
[20:20:10] <dstufft> (like version parsing sin't pip specific, so it doesn't belong there)
[20:20:16] <tos9> ah.
[21:28:34] <pf_moore> dstufft: I do think that the pip CLI should be a bit more scripting-friendly, if only in the sense of data on stdout, errors on stderr for things like pip list
[21:29:05] <pf_moore> But as I also don't have any plans to do anything about it (mainly because I can't figure out how) it's still just idle chatter...
[21:29:31] <dstufft> pf_moore: agreed
[21:46:46] <tdsmith> oh, i've kvetched about trying to pipe list outdated into upgrade before
[21:47:07] <tdsmith> got as far as observing how messages were logged and gave up :p
[21:55:04] <tos9> I mean. I can be horrible :) Here's pip's API for that: pip list --outdated | grep -v ' ' | parallel -X pip install -U
[21:55:13] <tos9> now don't have one word logging messages and we're all good and can go home
[21:56:15] <tdsmith> ha
[21:57:10] <tdsmith> package names aren't one word either though :
[21:57:11] <tdsmith> p
[21:57:46] <tdsmith> aren't printed as*, anyway
[22:22:09] <tos9> are there people who've uplaoded packages with spaces in them
[22:22:19] <tos9> is hurting them allowed
[22:24:41] <doismellburning> Registering Can you do the fandango? to https://pypi.python.org/pypi
[22:24:41] <doismellburning> Server response (400): Invalid package name. Names must contain only ASCII letters, digits, underscores, hyphens, and periods
[22:24:55] <doismellburning> (cannot speak for legacy packages)
[22:25:27] <tdsmith> i just meant that pip list --outdated output looks like "astroid (Current: 1.2.1 Latest: 1.3.4)"
[22:26:00] <tdsmith> anyway, point taken, it can be done but it isn't fun :p you could deploy a regex against that
[22:28:09] <doismellburning> otoh I now have https://pypi.python.org/pypi/0-._.-._.-._.-._.-._.-._.-0
[22:28:41] <tdsmith> ow
[22:30:09] <doismellburning> interestingly I just figured that probably conflicts with 0_._._._._._._._._._._._._0
[22:35:19] <tos9> tdsmith: oh yeah sorry I posted the dumb sed before which you'd still need. So hooray it's possible end of story we can go home :P
[23:40:09] <paulproteus> BTW, dstufft, please meet plathrop, a friend of mine who is excited about all the work you've been doing in packaging-land, and surely is excited about the work of others but doesn't know their names as well yet.
[23:40:35] <dstufft> hey :)
[23:40:53] <plathrop> dstufft: Your post about setup.py vs. requirements.pip is one I paste links to about once per week :-)
[23:41:51] <dstufft> heh, it ended up being a lot more useful than I originally anticipated
[23:42:21] <dstufft> I was frustrated about trying to repeatidly explain to people why reading a requirements.txt inside of a setup.py to populate install_requires was wrong
[23:43:32] <plathrop> I understand the drive - nobody likes maintaining two separate lists that feel like the same thing.
[23:43:55] <plathrop> I'm working on a post trying to explain my experiences with related problems. Specifically around repeatable deploys of python apps.