PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Thursday the 12th of June, 2014

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[15:38:00] <davidovich_> !logs
[15:38:00] <pmxbot> http://chat-logs.dcpython.org/channel/pypa
[16:08:30] <aclark> !m pmxbot
[16:08:30] <pmxbot> you're doing good work, pmxbot!
[21:35:38] <adamcunnington> is pip install case sensitive?
[21:35:52] <adamcunnington> if so, how can i find the exact name of a package
[21:49:42] <dstufft> adamcunnington: the answer is, it depends
[21:50:11] <dstufft> adamcunnington: pip itself asks the server for the thing you're trying to install in the same case as you type it
[21:50:20] <dstufft> adamcunnington: s/server/repository/
[21:50:42] <dstufft> adamcunnington: However PyPI (and other software) will respond to that case insensitively
[21:50:53] <dstufft> that's not guarenteed if you're using something other than PyPI though
[21:55:06] <adamcunnington> dstufft: ok where can i find the proper names?
[21:55:15] <adamcunnington> dstufft: it seems to vary at multiple places on the page
[21:55:48] <dstufft> normally PyPI will put the proper name in the URL
[22:03:16] <adamcunnington> dstufft: thanks
[22:06:23] <adamcunnington> When creating requirements.txt for my own project, what is best practice? Should you always require a certain version number or is it ok to say >=, equally if i don't include a number, will pip auto install the latest?
[22:12:18] <Alex_Gaynor> adamcunnington: it depends, some things have a strong backwards compat policy, and don't change too much, so, for example I usually just specify "six", no version. But with something like Django, I usually specify which version I want loosely, "Django>=1.6.1,<1.7" for example
[22:13:48] <adamcunnington> Alex_Gaynor: ok thanks that's helpful - so in a nutshell, i should be making the decision based on how each package i'm depending implements version numbering (hopefully correctly!) combined with the sort of stuff i use from that package?
[22:14:00] <Alex_Gaynor> Yup!
[22:14:04] <adamcunnington> ok thanks
[22:14:19] <Alex_Gaynor> You can also choose to pin everything to a precise version, and use something like requires.io to let you know if you need to update
[22:14:36] <adamcunnington> Alex_Gaynor: whilst i've got your attention a sec! What do you think of snakebasket? A recursive pip? It seems like each package should have requirements.txt and pip should have a flag to allow us to recursively install requirements
[22:14:45] <adamcunnington> rather than listing every single one at a project's root that uses multiple packages
[22:14:46] <Alex_Gaynor> I dont' know what snakebasket is.
[22:14:57] <Alex_Gaynor> pip does have support for that
[22:15:08] <Alex_Gaynor> projects can list their dependencies in setup.py with isntall_requires
[22:15:33] <adamcunnington> Alex_Gaynor: yea but requirements is nice because then i can just pip install my project rather than doing python setup.py install manually
[22:17:14] <Alex_Gaynor> I'm not sure I understand, you anything you can setup.py install, you can pip install instead
[22:20:40] <adamcunnington> Alex_Gaynor: yea but if you use pip install and include the -r flag, i.e. pip install -r path/to/requirements.txt - what i'd like is for each of my packages to have their own requirements.txt and then they be read and actioned recursively
[22:21:10] <adamcunnington> Alex_Gaynor: i.e. if ./requirements.txt just has 1 package listed, pip could then check if that package has a requirements.txt and if so action ./package/requirements.txt etc.
[22:21:21] <adamcunnington> http://engineering.prezi.com/blog/2013/04/19/snakebasket/
[22:32:53] <dstufft> I think it's a bad idea
[22:37:50] <adamcunnington> dstufft: why?
[22:38:39] <dstufft> because requirements.txt does not declare a package's dependencies
[22:38:49] <dstufft> it is a file that allows you to reproduce an environment
[22:39:05] <dstufft> https://caremad.io/blog/setup-vs-requirement/
[22:47:25] <adamcunnington> dstufft: yea but i don't see why that makes it any less of a good idea?
[22:47:48] <adamcunnington> the point is a project may use multiple packages but each package is standalone so each package should have it's own requirements
[22:48:07] <dstufft> correct, and the place to put a packages requirements is inside of the setup.py's install_requires
[22:48:10] <adamcunnington> even if there is a master_requirements.txt that explicitly lists the paths to the project requirements.txt files
[23:27:04] <tomprince> The only reason to do something like this is if you need to be specyfying git repositories for everything, since there isn't a good way to map package names to them.
[23:36:56] <dstufft> tomprince: you can create your own index which maps git repos to package names
[23:40:59] <dstufft> Something simple like pip install --no-index --find-links https://example.com/git-index.html packaging would work, if git-index.html was https://gist.github.com/dstufft/ffc99ab66129e01043ff
[23:43:02] <ionelmc> dstufft: can you pass a `local file` to --find-links ?
[23:43:30] <dstufft> sure
[23:43:45] <ionelmc> oh wow, never thought of this
[23:43:56] <ionelmc> dstufft: you should blog about this
[23:44:06] <dstufft> probably
[23:44:10] <dstufft> maybe I will later tonight
[23:45:39] <ionelmc> what's with all the `error: [Errno 104] Connection reset by peer` errors from pip
[23:45:57] <ionelmc> makes me babysit the travis builds :|
[23:46:12] <ionelmc> was there some retry option ?
[23:47:16] <ionelmc> anyway, this is interesting https://github.com/naiquevin/pipdeptree
[23:47:40] <dstufft> pip 1.6 has a default to on retry option
[23:47:44] <dstufft> defaults to 3 retries I think