[20:56:21] <ei8fdb> If I apt-get install pip, what will that do in relation to the source code I've just cloned from github? Isn't the point of cloning the pip repo to build it from source?
[21:17:56] <ei8fdb> ngoldbaum: cool so i can happily apt-get install pip
[21:18:56] <ei8fdb> techalchemy: is that just to have the newest version? i have Python 2.7.16 (default, Apr 9 2019, 04:50:39)
[21:19:08] <ngoldbaum> python2.7 is EOL as of april
[21:19:27] <ngoldbaum> pip will continue to support python2.7 for a while after that but the writing is very much on the wall
[21:20:04] <toad_polo> python2.7 is EOL as of January 1, 2020.
[21:20:32] <toad_polo> The last release will be in April because it takes time to cut releases.
[21:21:23] <toad_polo> ei8fdb: For another perspective, I never use the system installed python, and if I had an OS that unbundled `pip` from Python I would not install the system pip package.
[21:21:51] <toad_polo> I've been using pyenv, which is not a panacea by any means (each minor version of Python is a completely separate installation, which is annoying): https://github.com/pyenv/pyenv
[21:22:44] <techalchemy> ei8fdb, you should include toad_polo on your list
[21:22:53] <toad_polo> Though, I give this advice because I believe it, but I guess I should realize more that there's not a good solution for new non-experts.
[21:22:59] <toad_polo> Whoa whoa whoa, what am I being volunteered for.
[21:32:41] <ei8fdb> Toad_polo: about python versions, my objective is to follow the getting started page for pip -https://pip.pypa.io/en/stable/development/getting-started/
[21:33:35] <toad_polo> ei8fdb: Nothing on there says how to get Python.
[21:37:30] <toad_polo> Because it's something of an implementation detail that `tox` is implemented in Python at all, same with `pipx`.
[21:38:31] <toad_polo> Using `pipx` to install `tox` is just a way of avoiding installing it from your system's package manager, and the main reason to do that is if your system's package manager is likely to give you a mangled or way out-of-date version of it (like, say, on debian).
[21:39:03] <toad_polo> Or if you don't have a system package manager, like on Windows or possibly on Mac (though I think homebrew is kinda like that).
[21:40:02] <toad_polo> You can go down a whole rabbit-hole trying to fix this problem for Python only, and what you're doing there is basically just taking up slack for distro maintainers.
[21:40:45] <ei8fdb> Ok got you. so pipx is platform agnostic way of running pip?
[21:41:00] <techalchemy> pip is already platform agnostic :p
[21:41:57] <techalchemy> toad_polo, i was gonna let him experience the problems
[21:42:02] <toad_polo> If you have a CLI tool that you can install with `pip`, you end up installing the tool into some environment that has to be active for you to use it, but that's weird.
[21:42:21] <toad_polo> You either install it globally or in a user install.
[21:42:29] <toad_polo> techalchemy: That could take years :P
[21:42:44] <toad_polo> ei8fdb: `pipx` creates isolated virtual environments for the CLI tools you might install from PyPI, the ones where it's an implementation detail that it's written in Python.
[21:43:20] <toad_polo> And then it exposes the CLI endpoints on your global PATH in such a way that invoking them activates the relevant virtualenv.
[21:43:39] <toad_polo> Like for example I have `pipx install black`, I can execute `black` and it will activate some `black`-specific virtualenv that has all of `black`'s dependencies, and run `black`.
[21:44:19] <techalchemy> in python if you install everything just using 'pip install --user' or 'pip install blah' and you install two things that conflict or have conflicting dependencies, the second thing you installed just wins out, it overwrites the first dependency and now the first thing you installed potentially doesnt work
[21:45:14] <techalchemy> or you might install lots of stuff in one environment and then you want to upgrade something but you dont know what it depends on, so upgrading it might be risky, it could change something else's dependency which could cascade breakages and yeah, it gets messy
[21:45:28] <techalchemy> so pipx lets you just put each thing in an isolated environment
[21:45:34] <ei8fdb> So thats an issue a new contributor might have at a later date...?
[21:45:59] <toad_polo> Yeah. Another problem is you may be developing something and get used to just doing `import x` where `x` isn't in the standard library, it just was ad-hoc installed in your environment (either directly or as a dependency of something you installed).
[21:46:05] <toad_polo> Then you don't know what dependencies you need to declare.
[21:46:52] <ei8fdb> So - if I'm a "new" contributor to packaging tools, specifically pip, what is the "sane" default when it comes to getting python, pip and tox installed?
[21:47:23] <techalchemy> i suspect if you ask 10 of us we will give you ~6 different answers but most of them involve pyenv
[21:47:39] <ei8fdb> I need to focus on the "getting started" phase first.
[21:51:44] <ei8fdb> And it should be recommended because it makes setting up the pip dev environment easier? Or it makes developing using python easier?
[21:52:15] <toad_polo> There are many different reasons to use `pyenv`.
[21:52:33] <toad_polo> It will probably be over-represented amongst library and cross-platform utility developers because it's very useful for managing a bunch of different Python installations.
[21:52:39] <toad_polo> That's kinda its main thing.
[21:52:51] <ei8fdb> Toad_polo: any place their documented?
[21:53:16] <toad_polo> So I have 2.7, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8 and 3.9 installed, plus some pypy installations. It makes it so `tox -e py<whatever>` just works for me for any version of Python.
[21:53:33] <toad_polo> ei8fdb: The short answer to that question is always "no"
[21:53:52] <toad_polo> Python packaging is very much an oral tradition. What records we do have are fragmentary and often misleading :P
[21:54:36] <toad_polo> Which is why I always say, "We need to hire a technical writer" every time Sumana asks me what we should be looking for funding for.
[21:54:54] <toad_polo> Though maybe an anthropologist would be better 😝
[21:56:09] <ei8fdb> LOL I'm learning that slowly. Ok so is it fair to say its main affordance is managing the development on different python installation (version?) and OS platforms?
[21:57:43] <ei8fdb> Toad_polo: well UX research (essentially what I'm doing now) uses a lot of methods and frameworks for anthropology and ethnography so you're bang on with that comment. 😂
[21:58:48] <toad_polo> ei8fdb: Actually wait, no, it's not what you said.
[21:59:03] <toad_polo> This tool only works on Linux.
[21:59:28] <ei8fdb> Ok so scratch the os platforms part.
[21:59:40] <toad_polo> It allows you to install multiple versions of Python on your computer and helps manage the path set up.
[22:00:29] <techalchemy> it's also incredibly consistent
[22:00:31] <ei8fdb> Ok. And you'd want to insyallultiple python versions to....do what?
[22:00:39] <techalchemy> i never have to concern myself with whatever the hell distro maintainers do to mess things up
[22:00:49] <toad_polo> The two strong reasons to do it are: 1. so you can easily test your software for cross-version compatibility and 2. to solve the problem of "the system Python is the system's Python"
[22:01:21] <ei8fdb> Ok. I think I understand that now.
[22:02:31] <toad_polo> Pyenv installs Python somewhere in your home directory. If you want to pip install directly into those environments you don't need sudo or --user.
[22:03:03] <ei8fdb> So a possibly sane default (needs to be validated with real humans) would be recommend in the getting started docs to use pyenv to start the python, pip and tox setup process?
[22:03:45] <ei8fdb> The *getting started with development* docs.
[22:07:00] <techalchemy> this is 'getting started developing pip' tho
[22:07:09] <techalchemy> could be appropriate there
[22:07:35] <toad_polo> Like someone should write and maintain a document like, "Here's how to get a personal python installation and use it for developing stuff"
[22:08:04] <techalchemy> i dont know that it's a bad thing to have all of this self contained within pip's documentation
[22:08:10] <ei8fdb> So as I understand it, you're all saying in order to develop for pip using the distro python is not a good idea.
[22:08:17] <techalchemy> if we like it i guess it can move to packaging.python.org or whatever
[22:08:37] <toad_polo> It's a general advice thing, not really specific to pip in any way.
[22:08:47] <techalchemy> ei8fdb, it likely doesn't matter, but there are often weird quirks
[22:08:56] <toad_polo> Every library would have to recreate it or weirdly link to pip's version.
[22:09:15] <techalchemy> like on ubuntu 16.04, python 2.7.12 was the default and virtualenv was broken
[22:09:22] <toad_polo> Putting it in packaging.python.org is more reasonable.
[22:09:41] <techalchemy> because they did some weird hacking of the distribution when they packaged it for ubuntu
[22:09:50] <ei8fdb> Toad_polo: so putting it there.
[22:09:55] <toad_polo> Though also one thing to note is that pip might not be the best starting point for someone who doesn't know how to install Python.
[22:10:16] <techalchemy> well setting things up properly deserves documentation somewhere
[22:10:25] <techalchemy> i'm all for enabling people's curiosity
[22:12:18] <ei8fdb> Toad_polo: true and I've made that comment in my notes so far. In which case....how long does it take for a python coder to "become a pip contributor"?
[22:13:09] <ei8fdb> Do I need to do anything with my python dev environments (probably not the right phrase) to allow me to start contributing?
[22:13:56] <ei8fdb> How will I handle different python versions?
[22:14:29] <techalchemy> ei8fdb, pradyun has helped a few brand new folks contribute to pip recently
[22:14:40] <techalchemy> so I'm pretty sure it is quick
[22:15:26] <toad_polo> It's mostly easy. You don't need a whole local setup that's optimal.
[22:15:32] <techalchemy> mostly people second guess themselves or aren't sure what to contribute or maintainers aren't sure where to ask for help and that's what causes lack of contributions
[22:15:54] <ei8fdb> Ok, I'll ask him in the morning.
[22:16:40] <toad_polo> Someone needs to write this stuff down somewhere, but it's not necessarily in the critical path for the first contribution.
[22:16:47] <ei8fdb> Ok so it's more a case of people not knowing where they can contribute as opposed to difficulty getting Dev envs setup?
[22:17:15] <toad_polo> It's just to save you headaches later.
[22:17:22] <techalchemy> ei8fdb, i'm guessing many people do find themselves in a situation like this one where it seems like a lot, and they arent even sure if they have the right setup to start
[22:17:47] <ei8fdb> Toad_polo: that's a part of what we're working on, but I'm not a tech writer.
[22:18:04] <techalchemy> and that question isn't really addressed, like, what is required on your system to make sure you are 'doing it right'
[22:18:16] <techalchemy> i think al ot of people worry about whether they're doing it right
[22:18:49] <ei8fdb> Right and that was the begining of my problem tonight, albeit at an even higher level that someone who is an experienced python dev
[22:19:10] <ei8fdb> Is it important for them to be doing it right?
[22:19:13] <techalchemy> if the path to accomplishing that isn't available it's likely going to exclude some people from doing it at all
[22:19:21] <techalchemy> none of us are doing it right
[22:20:08] <ei8fdb> So there's a certain aspect of "craft" involved, right?
[22:21:09] <techalchemy> I guess, I just asked everyone else what they're doing and it was kind of looking over peoples shoulders and being like oh yeah totally i was doing that the whole time, too
[22:22:54] <techalchemy> well I am guessing but thats why I asked you to ask if everyone uses pyenv :p
[22:24:08] <ei8fdb> Ok, so I now understand the significance of pyenv. And I can ask those questions in a way people think I know what I'm talking about 🙃
[22:24:45] <ei8fdb> This has been helpful. It's not answered my question, bit it's been helpful. ;)
[22:35:41] <techalchemy> i wouldn't recommend it, pyenv shims are garbage and if you install anaconda it breaks everything if it's not the first item in your pyenv selections
[22:36:05] <ngoldbaum> ei8fdb: good luck on this, improving pip's docs and usability might be a very impactful project
[22:36:08] <techalchemy> e.g. anaconda installs with 'pandoc' and pyenv then permanently shims pandoc even if you don't have anaconda selected, and won't reexec the actual system pandoc
[22:46:02] <techalchemy> haha no i think everyone has the same goals and shares in the pain and suffering that comes with working on packaging tools
[22:47:00] <ei8fdb> (my comment was supposed to be sarcastic too..)
[22:48:26] <ei8fdb> I mean this is totally normal in any large and complicated system. Fix one thing and it starts leaking somewhere else.....rinse repeat.
[22:50:50] <ei8fdb> I'm going to have to 💤💤💤. My brain is full. Ill come back to this in morning.