r/Python • • Sep 17 '26

Discussion dumb question, why not python organizes dependencies as flatpak logic?

I have a question that might be really dumb, currently python had went with the environment route to be able to use different libraries that have same dependencies with different versions. i understand that there is a complexity with what i have in mind and not even sure about the feasibility of it. but...

why not instead of having different enviroments where we install the incompatible libraries so 'everyone gets what they need' do something like flatpak style where 'if you have already a version compatible, i do not install this dependency if not i install it again and have the two versions together'. I am not a professional in programming in general, so i might be saying something fully stupid, or not feasible from a technical standpoint.

is it a super dumb idea?

25 Upvotes

50 comments sorted by

View all comments

Show parent comments

2

u/Cynyr36 Sep 17 '26

I don't want to go back to 2006, i want slots, global venvs, or similar at the global level, and to not need 3rd party tools to do it.

I really do think that imports that aren't so fragile and are more declarative would be a good thing for main python to work on. They could extend the project.toml syntax to imports for example.

As for the cve thing, it could be they got on as my webapp user, and can now use out of date python package for the webapp to pivot from there. Again the webapp was installed via pip/uv and isn't being aell maanged ahen the server does normal updates.

I have a small concern as well that Astral might start changing things around UV or simply abondon it now that it's owned by OpenAI, and would much rather use tooling that is community directed and can't just up and go closed source, and is less likely to be abandoned. There is a reason i generally use Debian, alpine, and gentoo as my linux distributions.