-
-
Notifications
You must be signed in to change notification settings - Fork 12.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ranger depends is absurd (likely not just ranger) #140311
Comments
It does, it depends on python which for Homebrew means "the newest available"
Nope, Homebrew will only depend on its own formulae. |
Package managers generally depend on their own packages. You're probably going to struggle to find another distribution that doesn't depend on its own Python: https://repology.org/project/ranger/versions. If you're looking to bring your own Python, then you're looking at the wrong tool - you're looking for a package manager designed to pull in dependency trees for your specific build of Python (the list of dependencies can vary between Python versions for some packages) which is what the purpose of
If |
All these have dependencies on python, but they use system python. That's the issue. Let's look at the arch package.
This is the issue. @SMillerDev said
It isn't hard to find packages that depend on python of >=3.8 but not 3.11. Are all of these wrong? You're supporting them. The divergence from the status quo of using the system python version is resulting in user confusion. It is also likely creating maintainer confusion as one would simply expect to set the dependencies on the actual package's dependencies and then only require maintenance when the package's dependencies change. This is quite a strange burden to place on users and maintainers. Simply dismissing this with "brew uses the newest" actually requires more work while not providing any benefit to anyone. |
That is the newest python version they work with. If it depends on python 3.8 on Homebrew it's because it failed to build with anything newer.
Only if you treat Homebrew as a party outside that system.
Nope, that's not what Homebrew maintainers expect. They, unsurprisingly, know how Homebrew works. |
The ranger formula has a depends on
python 3.11
(the current most recent release which is still in its bugfix stage) but the actual program only depends are>=2.6
or>=3.1
via the official repo.Depends should only depends on the minimal requirements. Not the newest release. The offending commit is 34b9f6 with or 114887, but even prior to this commit the root issue exists as it previously depended on
python 3.10
. The migration to3.11
was only weeks after the release (Commit date: Nov 6, 2022 ; python release date: 2022-10-24) . We similarly see a quick migration to3.10
in commit 7df794, weeks after the3.10
releaseThe problem here is that the formula installs a new python version regardless of existing python on the user's system. An obvious downside is that this results in bloat, but this leads to additional problems. Issue 1499 in the ranger github is due to a user confusion about which python is being used by ranger. It is unsurprising and should not be considered user error considering a unique version of python is installed when the user has every right to believe that one of their likely several existing versions is appropriately being used. It is not user error, if users are operating under a reasonable expectation.
This leads us to several potential solutions.
The Bad Solution:
Continue as is, installing a unique version of python BUT additionally install all python dependencies, ensuring full functionality. This is bad for two reasons: first, bloat, second ranger doesn't even list all required packages. The PIL package is not in their README or requirements, so it requires homebrew maintainers to constantly checking and testing this program for full functionality.
Better Version:
We can check for environments such as
anaconda
, or system environments, or other python installations. This is poor because it creates a necessary specificed hierarchy.Best Version:
Simply check the current environment's python version (i.e.
which python
and use that version). If aconda
non-main env is found, issue a warning an prompt to continue. This is best because any issues with the formula are now shifted back to the ranger team and compatibility is reliant upon the actual software maintainers.The text was updated successfully, but these errors were encountered: