bump-formula-pr, utils/pypi: tweak log messages#8149
bump-formula-pr, utils/pypi: tweak log messages#8149SeekingMeaning merged 1 commit intoHomebrew:masterfrom
Conversation
There was a problem hiding this comment.
| ohai "Retrieving PyPI dependencies for \"#{pypi_name}==#{version}\" (this may take awhile)" if !print_only && !silent | |
| ohai "Retrieving PyPI dependencies for \"#{pypi_name}==#{version}\"..." if !print_only && !silent |
72d73e4 to
4405e7b
Compare
|
One thing I've noticed is that it always prints |
|
Maybe we should skip It seems all formulae using |
|
There are 16 formulae that use $ grep -L 'depends_on "python' $(grep -l 'files.pythonhosted.org' *)
appscale-tools.rb
blastem.rb
bup.rb
cassandra.rb
cassandra@2.1.rb
cassandra@2.2.rb
gr-osmosdr.rb
mesos.rb
numpy@1.16.rb
offlineimap.rb
ooniprobe.rb
pypy.rb
pypy3.rb
python@3.7.rb
python@3.8.rb
volatility.rbMost of the are because they have There are still a few that don't declare a python dependency though and have resources:
|
Maybe Python should have something like Java's
We probably could just hardcode |
We're trying to move away from Requirements in Homebrew/core. I think the approach of having a hardcoded list of Python formulae to check against for the purposes of updating Python resources is fine. We do that in |
How slow is this to run? If it's not slow: let's just not print that it's run unless something is changed in the files. This seems preferable to maintaining a allowlist/denylist just to avoid a message being printed. |
There was a problem hiding this comment.
| ohai "brew update-python-resources #{formula.name}" |
This line probably isn't needed anymore if we pass silent: args.quiet? to PyPI.update_python_resources! (whereas previously we always passed silent: true)
Example output without PyPI dependencies:
$ brew bump-formula-pr helmfile --version 0.125.3 --dry-run --write --force
...
==> Downloading https://github.com/roboll/helmfile/archive/v0.125.3.tar.gz
==> replace /https:\/\/github\.com\/roboll\/helmfile\/archive\/v0\.125\.2\.tar\.gz/ with "https://github.com/roboll/helm
==> replace "72d3b5646459408b8096c94408ea5fdf72c335575b99e3c0072fe81320b98c6c" with "2ca6b039c72414eaf2ffe5848f61320f8ae
==> brew audit helmfile.rb
...With PyPI dependencies:
$ brew bump-formula-pr jc --version 1.13.4 --dry-run --write --force
...
==> Downloading https://files.pythonhosted.org/packages/e3/b9/7878a4f71c873c7d67f39615086f1c8315740534b25eddc1a4f75f3148
==> replace /https:\/\/files\.pythonhosted\.org\/packages\/2b\/1e\/179eea9186313bcff8dc3405ecd4615043ea615681519a9638d79
==> replace "b5ebb419b3b5d3cd95a166b4f156c7986235e983d5c6bf21aa9d57586e211f78" with "45480ac3d399f70b57d8cc97a6795ea875a
==> Retrieving PyPI dependencies for "jc==1.13.4"...
==> Getting PyPI info for "pygments==2.6.1"
==> Getting PyPI info for "ruamel-yaml==0.16.10"
==> Getting PyPI info for "ruamel-yaml-clib==0.2.0"
==> Getting PyPI info for "xmltodict==0.12.0"
==> Updating resource blocks
==> brew audit jc.rb
...4405e7b to
36c7a3f
Compare
brew stylewith your changes locally?brew testswith your changes locally?More useful in combination with #8147
bump-formula-pr- pass inargs.quiet?toupdate_python_resources!instead of always passing intrueforsilentutils/pypi