PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Thursday the 13th of February, 2020

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[10:55:48] <jfl> How does a package available in search make it to https://pypi.org/simple/ ?
[20:54:18] <ei8fdb> I've got dumb question...I'm following https://pip.pypa.io/en/latest/development/getting-started/.
[20:54:41] <ei8fdb> To get the dev environment setup with tox, it says "python -m pip install tox to install and use it."
[20:55:29] <ei8fdb> I've cloned the pip repo, but not built it yet, so when I try to run python -m pip install tox to install and use it, I get:
[20:55:51] <ei8fdb> I try pip at commandline and it tells me (correctly):
[20:55:51] <ei8fdb> Command 'pip' not found, but can be installed with:
[20:55:51] <ei8fdb> sudo apt install python-pip
[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?
[20:57:14] <ei8fdb> (am i over thinking this?)
[21:03:22] <ngoldbaum> you're overthinking this
[21:03:37] <ngoldbaum> tox will create new testing virtualenvs for each test job
[21:03:56] <ngoldbaum> it doesn't matter if you're using pip from the repo or pip from your package manager to get tox
[21:12:12] <techalchemy> also, ei8fdb, you should get python3-pip
[21:17:06] <ei8fdb> aha ok
[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:23:34] <techalchemy> an interview
[21:23:43] <techalchemy> about ux
[21:24:12] <toad_polo> Oh, yeah, I can do that.
[21:28:08] <ei8fdb> Toad_polo thank you for being a willing vict^^ research participant. 😃
[21:30:20] <ei8fdb> Toad_polo you can use this link to choose a time. https://saneux.doodle.com/bernardtyers. I'm in GMT+0 btw.
[21:30:50] <toad_polo> Cool cool, thanks.
[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:34:30] <toad_polo> Or even how to get `tox`.
[21:34:47] <toad_polo> You may want to consider installing `tox` with `pipx`, though how you get `pipx` presumably depends on your platform :P
[21:35:14] <ei8fdb> Oh dear.
[21:36:18] <ei8fdb> Can of 🐛🐛🐛🐛🐛. Heh this is what I'm trying to improve tho' so yay!
[21:36:53] <toad_polo> I'm not entirely sure how easily any of these things can be improved, TBH.
[21:37:04] <ei8fdb> Why's that?
[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:10] <ei8fdb> Ok
[21:41:15] <toad_polo> No, `pipx` is a little like `tox` or `virtualenvwrapper` with a specific bent.
[21:41:34] <ei8fdb> Pipx is independent of distro/platform installed..... python?
[21:41:54] <toad_polo> No.
[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:41] <techalchemy> yeah fair
[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:06] <ei8fdb> Ok....self contained.
[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:44:46] <ei8fdb> Ok.
[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:38] <techalchemy> oh yeah
[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:47:45] <ei8fdb> LOL
[21:48:32] <techalchemy> ei8fdb, add that to your interview questions, just ask everyone if they are using pyenv
[21:49:18] <ei8fdb> Techalchemy: just added!
[21:50:12] <ei8fdb> And if they are it means - ?
[21:50:34] <techalchemy> ei8fdb, maybe we should recommend it :p
[21:50:39] <techalchemy> for people on linux
[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:25] <toad_polo> https://github.com/pyenv/pyenv
[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:31] <toad_polo> That is one of them.
[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:04:11] <ei8fdb> https://pip.pypa.io/en/stable/development/getting-started/
[22:04:20] <techalchemy> for pip? likely
[22:04:27] <techalchemy> toad_polo, you've been recommending a technical writer?
[22:04:40] <techalchemy> that's been my #2 suggestion after a ux person
[22:05:45] <ei8fdb> Techalchemy: ok. I'm taking that as progress in my understanding!
[22:05:54] <toad_polo> ei8fdb: Maybe? Probably it's better to do it at a different level.
[22:06:20] <ei8fdb> Don't follow. "At a different level"?
[22:06:20] <toad_polo> Like this is just one workflow common among a certain set of heavy Python developers.
[22:06:24] <techalchemy> I have a hard time telling people how to get started because it feels like a mistake to recommend using distro python ever
[22:06:41] <toad_polo> Not in pip's documentation.
[22:06:58] <ei8fdb> Why not?
[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:10:27] <toad_polo> Yeah, agreed.
[22:10:53] <toad_polo> Either in packaging or elsewhere on python.org.
[22:10:57] <toad_polo> Not pip.
[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:19:25] <techalchemy> so no
[22:19:29] <ei8fdb> LOL
[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:21:41] <ei8fdb> yup yup
[22:22:21] <ei8fdb> So is there a "common" way?
[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:24:58] <techalchemy> ahhaha
[22:25:08] <techalchemy> welcome to packaging :)
[22:25:22] <techalchemy> we never resolve anything but we have helpful discussions about why not
[22:28:56] <ngoldbaum> lol no one has mentioned conda yet
[22:29:06] <ngoldbaum> but i think miniconda is actually a reasonable choice to start
[22:29:15] <ngoldbaum> in terms of getting a self-contained minimal python environment
[22:29:30] <ei8fdb> Oh dear.
[22:29:38] <ngoldbaum> plus you get binaries, needing to build python from source might be a pain with pyenv depending on your setup
[22:30:14] <toad_polo> ngoldbaum: conda is almost certainly not the right thing to install for developing pio
[22:30:21] <toad_polo> *pip
[22:30:35] <ngoldbaum> i mean if all you want is a python and pip installation i think it would work fine
[22:30:38] <ngoldbaum> miniconda specifically
[22:30:50] <ngoldbaum> an installation that lives in your home folder
[22:31:13] <ei8fdb> I've heard about the 'condas' but I'm not there yet.
[22:31:36] <toad_polo> It's just that conda has a whole other packaging system.
[22:32:07] <ngoldbaum> that's true, the beauty of miniconda is you don't need to use it at all
[22:32:13] <ngoldbaum> just bootstrap from their binaries
[22:32:16] <toad_polo> It could work but if you are working on packaging specifically it adds a whole other degree of freedom.
[22:32:25] <toad_polo> Yeah, but you can just use pyenv.
[22:32:26] <ngoldbaum> but this is definitely not all that important :)
[22:32:39] <ngoldbaum> i've had to do work on systems where i don't have root
[22:32:45] <toad_polo> I would install miniconda from pyenv, so maybe that's missing the point?
[22:32:47] <ngoldbaum> i don't think i could easily use pyenv on such a system
[22:33:05] <toad_polo> I've never had to use root for pyenv...
[22:33:15] <ngoldbaum> since it needs a compilation environment and a number of system packages to build functional pythons
[22:33:24] <ngoldbaum> well, you don't need root to use it, that's true
[22:33:28] <techalchemy> yeah you absolutely won't use conda to develop pip...
[22:33:29] <ngoldbaum> you do need root for the dependencies
[22:33:39] <toad_polo> Oh.
[22:34:32] <techalchemy> you can literally just install anaconda on pyenv
[22:35:14] <ngoldbaum> that's true
[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:36:09] <techalchemy> lol
[22:36:28] <techalchemy> i think the ultimate goal is to improve ux of pip itself
[22:38:34] <ei8fdb> Is there any graphical representation of the different tools and how they relate? I'm thinking something similar to a mindmap?
[22:39:23] <techalchemy> LOL
[22:39:37] <techalchemy> dude we type words we dont make pictures
[22:39:38] <ei8fdb> Ngoldbaum: Thanks! No pressure, eh? I'm thinking I'll have it wrapped up in a few weeks.
[22:39:40] <techalchemy> come on now
[22:39:58] <ei8fdb> Wishful thinking?
[22:40:10] <techalchemy> graphical representation what do you think this is
[22:40:25] <ei8fdb> 😂😂
[22:40:28] <ngoldbaum> such a diagram would also be out of date in ~6 months ;)
[22:40:38] <techalchemy> more like 6 weeks
[22:40:56] <toad_polo> ei8fdb: It's not even quite that neat.
[22:41:12] <toad_polo> The PyPA started as a joke IIRC.
[22:41:27] <toad_polo> The "authority" was ironic.
[22:41:28] <ei8fdb> That's ok. These kinds of things can be alive..and ldated.
[22:41:50] <ei8fdb> *updated*
[22:42:43] <ei8fdb> Ok I'm going to start one and make it open to edit.
[22:42:53] <toad_polo> Even within the PyPA there's a motley collection of tools with some overlapping purposes in various states of deprecation.
[22:42:54] <toad_polo> pyenv is a collection of bash scripts unrelated to anything PSF-affiliated.
[22:43:19] <ei8fdb> Excellent.
[22:43:56] <ei8fdb> Which means there's lot of small bit important improvements possible.
[22:44:18] <techalchemy> also none of us in the pypa like each other
[22:44:30] <techalchemy> and especially nobody likes pradyunsg
[22:44:43] <ei8fdb> I've already realised both of those facts.
[22:44:59] <ei8fdb> Within the first few days.
[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.
[22:51:05] <techalchemy> hahaha
[22:51:14] <techalchemy> true enough, gl
[22:51:52] <ei8fdb> Thanks all! Night.