rubocops/lines: allow a runtime Python when supporting multiple Pythons#16119
rubocops/lines: allow a runtime Python when supporting multiple Pythons#16119cho-m wants to merge 1 commit intoHomebrew:masterfrom
Conversation
1565cf4 to
da9d469
Compare
|
This makes sense in isolation. Though it does seem problematic when we have any dependents using it as we'll get mixed runtime Pythons again and they will now need to be migrated as one. Alternative solutions could be:
|
As I recall, we ignore mixed Pythons in dependency tree (#13714) so migration should still be possible separately.
I've thought on this before but seemed like it would end up a bit hacky. Open to discussion if there is a reasonable way. However, some formulae will still be non-functional out-of-the-box unless user installs a python separately (which may require propagating caveats to impacted formulae).
We've tried this before and reverted those formulae now (e.g. |
It's not a great user experience though for a formula to depend on two versions of Python, particularly when only one is really needed. I'm fine with this change if it's preferred, but it does feel like there's better solutions. |
Ideally, should only happen for short time during migration. We probably should discuss/document further on Python package distribution as we don't seem to be following our original guidelines, e.g. https://docs.brew.sh/Python-for-Formula-Authors
I am open to any other ideas. Just that during current An opposite approach would be preventing "multiple pythons" for formulae whose functionality depends on the bin scripts. For example,
On other hand, there are some formulae that have bin scripts that are not commonly used (e.g. |
If we can turn any of those guidelines into code/audits/rubocops: that would be ideal.
This makes sense to me 👍🏻 |
|
Will close for now until we finalize on how we want to handle Python formulae moving forward (especially given adoption of PEP 668 in |
brew stylewith your changes locally?brew typecheckwith your changes locally?brew testswith your changes locally?Draft for now as unable to test out on Sonoma and not too sure about RuboCop logic. Maybe there is better way to handle.
Main thing is to handle recent changes to various formulae where multiple Python libraries were built and runtime dependency was dropped resulting in non-functioning executables installed/linked into user PATH, e.g.
pyinvoke(Homebrew/homebrew-core#151248),python-tabulate,python-argcomplete, etc...