3 ms·
As. Homebrew maintainer: confirmed. You can also adjust your settings to pin versions or avoid cleanup, too. ‘brew pyenv-sync’ may be useful around this area,
by mikemcquaid 3y ago
As. Homebrew maintainer: confirmed. You can also adjust your settings to pin versions or avoid cleanup, too.
‘brew pyenv-sync’ may be useful around this area, too.
- sgarland 3y agoIf I pin a version of Python, isn't that going to wreck any tooling that depends on it? Unless you're saying have multiple versions of Python installed. This is practically the only remaining annoyance I have with the Python ecosystem (relative imports aside). I use some tools, like Glances [0] whose formula relies on a much newer version (3.12) than the actual package requires (3.8) [1]. So when there's a Python update, all of those update as well. I thought I'd fixed this with pipx, but in a way that's worse, because the venvs it builds depend on a specific version of Python existing, which doesn't work well with brew always wanting to upgrade it. I want a stable, system-level Python that I don't touch, don't add packages to, and which only exists as a dependency for anything that needs it. If an update would break a package I have installed (due to Python library deprecation, etc.), it should warn me before updating. Otherwise, I don't care, as long as any symlinks are taken care of. Separately, I want a stable, user-level Python that I can do whatever I want to. Nothing updates it automatically. I can accomplish this by compiling Python and using `make altinstall`, but if there's a better way, I'd love to hear about it. [0]: https://github.com/Homebrew/homebrew-core/blob/20e744191e74d563406018dca1050d202bedabcb/Formula/g/glances.rb https://github.com/Homebrew/homebrew-core/blob/20e744191e74d... [1]: https://github.com/nicolargo/glances https://github.com/nicolargo/glances
- mikemcquaid 3y agoPinning won’t break things but it may block upgrades (where they would break something or unpin).
- godelski 3y agoIsn't it using the Python version in the formula?
- mikemcquaid 3y agoYes but there are multiple versioned formulae.
- godelski 3y agoThanks for taking the time. Can you help me understand? Because I didn't get this from the devs. Just looking at a random formula, am I correct to understand that this will use python 3.10 and NOT 3.12?[0] I understand ones like this[1] where there's a note about the issue with newer versions. What I'm trying to understand is if the python version is specified by the formula or it will default to the newest version. If it requires it to be specified in the formula then doesn't this make it contingent on the maintainer upgrading it every python version? I didn't verify [0], but it looks like it should work with later versions of python, and it it is still using 3.10 then isn't that essentially the maintainers "fault?" Because that's my concern. I can't see how something like this stays updated when it requires a maintainer to update. Seems better to have a >=3.10 and then do ==3.10 if only 3.10 works (odd) or >=3.10 <3.12 if it works for 10 and 11 but not 12. Especially since formulas are often made by people that are not the package developers themselves and we're just reliant upon someone keeping up. I'd rather break upon a new version than have many old pythons installed. I know there's no perfect solution, but we're talking about failure modes. And fwiw, I'd rather it try to use the system or environment python rather than installing a unique version. It just gets confusing when you need to add dependencies for optional stuff that wasn't included in the formula and is extremely non-obvious to a new user. [0] https://github.com/Homebrew/homebrew-core/blob/12a0f6bbbeda84dcae97419bab46c99ef61529b5/Formula/c/coin3d.rb#L40 https://github.com/Homebrew/homebrew-core/blob/12a0f6bbbeda8... [1] https://github.com/Homebrew/homebrew-core/blob/12a0f6bbbeda84dcae97419bab46c99ef61529b5/Formula/b/binwalk.rb#L37 https://github.com/Homebrew/homebrew-core/blob/12a0f6bbbeda8...
- mikemcquaid 3y agoYes you have to use the package version in the formula. Yes all python formulae will be moved to a newer version eventually. The other versions are for human consumption and use with tools like ‘brew pyenv-sync’. (I am a Homebrew maintainer).