r/Python • u/genericlemon24 • Aug 27 '21
News PEP 668 -- Graceful cooperation between external and Python package managers
https://www.python.org/dev/peps/pep-0668/24
u/teerre Aug 27 '21
From the title I thought it would be related to being able to manage python packages from apt-get or similar. But this is 'just' preventing people from shooting themselves on the foot with system installs. Certainly nice, but your avg. user probably won't see any difference since this kind of problem has been known for so long that everyone basically side steps it by now.
0
Aug 27 '21
[deleted]
4
u/teerre Aug 27 '21
Everyone who uses python. I'm not sure what you mean with "new user friendly tools". Also not sure what you mean with "invent the same wheel". Unless I'm mistaken, pretty sure for decades nobody has to invent anything to deal with this particular problem, it's just venv.
0
Aug 27 '21
[deleted]
2
u/teerre Aug 27 '21
You, literally, can install python in a venv, that's what a venv does...
I'm saying that you're ignoring people that aren't experts and in particular you're ignoring a problem of onboarding.
Python was always highly prioritizing new developers experience, which is arguably why it's so loved, first impressions etc. Managing installation is like its last sore point.
Again, this "problem" has existed since literally forever. If Python is loved now, it necessarily means it's loved despite this "problem".
5
u/kkawabat Aug 27 '21
relevant xkcd
6
u/kkawabat Aug 27 '21
I also aged a decade last week trying to get `poetry` working with a docker image.
2
u/lanster100 Aug 27 '21
If you haven't got it working, I can send/find you one that does.
3
u/kkawabat Aug 28 '21
Thanks for the offer but I was able to fix it. The issue was that using poetry installed with pip in the same virtual environment as the package I'm trying to install broke things in 1.1.8 unless you install it using get-poetry.py. The fix was simple enough but figuring out the issue was the pain.
0
Aug 27 '21
[deleted]
1
u/lanster100 Aug 27 '21
The main benefit (and I'm sure there's other ways around this) is that it has a lockfile, nothing worse than seeing a requirements.txt file with just package names, and you ask the dev what version of package X was it developed on and they say I don't know.
1
9
u/nuephelkystikon Aug 27 '21
We all know the true solution is to completely ignore apt and its year-old package versions.
13
u/gmes78 Aug 27 '21
Don't use an LTS distro if you don't want old packages. It's pretty obvious.
Many distros have up to date Python packages.
5
u/torham Aug 27 '21
If you want your software to be widely used, and not only by python developers, you are going to want it to be included in the various Linux distributions. So ignoring apt isn't really an option.
Anyway, that's not what this PEP is about.
2
2
u/13steinj Aug 27 '21
I feel like this just changes out some problems for others. You still shoot yourself in the foot, you just know immediately.
0
Aug 27 '21
[deleted]
9
u/make3333 Aug 27 '21
I think conda may cound as an external one, as it does arbitrary binary dependencies, not just Python ones?
I would really like for conda and pip interplay to be improved (to a point where builds can be replicable) as it's an extremely common use-case
14
u/flying-sheep Aug 27 '21
That's great! One thing sorely needed however is a tool OS package developers can use.
This often involves to unpack a wheel into a directory that can later be converted into an OS package.
installer exists but doesn't have a CLI (yet)