1421 Commits

Author SHA1 Message Date
Douglas Eichelberger
efd02b956d Revert "Revert "Make inreplace a purely static method""
This reverts commit 8656caa67ce2dd9ec6484969b183c1fd7805451e.
2023-08-04 16:20:38 -07:00
Alexander Bayandin
8656caa67c
Revert "Make inreplace a purely static method" 2023-08-03 16:16:19 +01:00
Douglas Eichelberger
da33049c69 Resolve Style/OptionalBooleanParameter violation 2023-08-02 14:47:06 -07:00
Douglas Eichelberger
2ad87f87d5 Make inreplace a purely static method 2023-08-02 09:44:18 -07:00
Eric Knibbe
c1fe80ac82
utils/repology: update API URL 2023-08-02 09:02:44 -04:00
Douglas Eichelberger
b26c0917c7 Widen collection type in super call 2023-08-01 09:33:04 -07:00
Douglas Eichelberger
8d8dac0de4 Narrow member type of inreplace paths enumerable 2023-08-01 09:22:48 -07:00
Mike McQuaid
dda839c27b
analytics: fix @ in formulae names with --github-packages-downloads 2023-07-26 16:46:23 +01:00
William Woodruff
81b768a978
utils/pypi: fix an incorrect return type
Signed-off-by: William Woodruff <william@yossarian.net>
2023-07-25 10:36:49 -04:00
Douglas Eichelberger
08e46c18cd Add type to Formula attrs 2023-07-24 14:12:36 -07:00
Douglas Eichelberger
11bb278284 Support Pathname as second arg to gsub! 2023-07-23 21:14:21 -07:00
Douglas Eichelberger
cec3daf6be Fix type regression 2023-07-23 19:48:48 -07:00
Douglas Eichelberger
c7369b7ea9 Strict type string_inreplace_extension 2023-07-23 15:56:26 -07:00
Carlo Cabrera
fa384b7cc3
utils/inreplace: fix typechecking error
Fixes

        TypeError: Parameter 'before': Expected type T.nilable(T.any(Regexp, String)), got type Pathname with value #<Pathname:/opt/homebrew/Cellar/php@8.1/8.1.21/lib/php>
      Caller: /opt/homebrew/Library/Homebrew/formula.rb:2484
      Definition: /opt/homebrew/Library/Homebrew/utils/inreplace.rb:48

https://github.com/Homebrew/homebrew-core/actions/runs/5635089949/job/15266014851#step:3:1737
2023-07-23 18:23:04 +08:00
Douglas Eichelberger
af5cdd1590 Allow implicit String Pathname in gsub 2023-07-22 10:20:52 -07:00
Douglas Eichelberger
11a9086b89 Fix inreplace sig
Implicit Pathname strings strike again
2023-07-21 20:02:59 -07:00
Bjorn Neergaard
a5554df6bb utils/github/api: fix credentials_type
The order is shared with self.credentials, but during the deprecation
cycle the need to adjust self.credentials_type to match was overlooked.
2023-07-19 14:58:12 -06:00
Mike McQuaid
93ba81208c
Merge pull request #15690 from p-linnane/fix-various-typos
various: fix miscellaneous typos
2023-07-18 17:26:41 +01:00
Mike McQuaid
79e67737a2
Merge pull request #15692 from dtrodrigues/pypi_version
utils/pypi: don't overwrite name/extras/version from basic_metadata if already set
2023-07-18 17:15:57 +01:00
Patrick Linnane
c56669e9cd
various: fix miscellaneous typos 2023-07-18 08:52:49 -07:00
Mike McQuaid
16a36a0910
utils/analytics: new InfluxDB token.
This is created with a different user that's more desirable.
2023-07-18 16:22:23 +01:00
Mike McQuaid
77061817f7
Fix (again) InfluxDB analytics messaging
Address https://github.com/Homebrew/brew/pull/15688#issuecomment-1638725595

Fixes https://github.com/Homebrew/brew/issues/15678
2023-07-18 08:03:57 +01:00
Dustin Rodrigues
b12f714a44
utils/pypi: don't overwrite name/extras/version from basic_metadata if already set 2023-07-17 21:50:26 -04:00
Mike McQuaid
c2ce8e7033
utils/analytics: hide InfluxDB message correctly.
Fixes #15678
2023-07-17 19:26:10 +01:00
Bo Anderson
8adac8a53e
Merge pull request #15659 from SMillerDev/fix/analytics/source
analytics: use new AWS based influxdb
2023-07-10 20:19:29 +01:00
Sean Molenaar
fc48930a59
analytics: use new AWS based influxdb 2023-07-10 20:47:19 +02:00
Issy Long
b9d8fd4f79
Enable issues_for_formula to show only issues, only PRs, or both
- This change is useful for the "these issues are also open for this
  build failure" exception. Hopefully there'll be less noise on PRs with
  people encouraging us to fix things faster if we don't link them to
  WIP PRs (or any PRs at all).
- Fixes https://github.com/Homebrew/brew/issues/ 15608.
2023-07-08 22:15:58 +01:00
Mike McQuaid
7da934f7e2
Deprecate/disable/delete code.
The next release after this is merged will be 4.1.0.

Co-authored-by: Markus Reiter <me@reitermark.us>
2023-07-06 16:56:20 +01:00
William Woodruff
da326d602d
pypi: improve error message
Emphasize that we're failing because the user tried to update
a non-PyPI package by version, when only PyPI packages can
be updated by version. Other Python packages need to be updated
by a full URL change.

Signed-off-by: William Woodruff <william@yossarian.net>
2023-07-02 21:54:27 -04:00
William Woodruff
0160bc53e4
brew style --fix
Signed-off-by: William Woodruff <william@yossarian.net>
2023-07-02 21:15:49 -04:00
William Woodruff
ed653ab219
pypi: handle ignore_non_pypi_packages correctly
Signed-off-by: William Woodruff <william@yossarian.net>
2023-07-02 21:08:54 -04:00
William Woodruff
91a9b57d1f
Revert "Revert "PyPI: Handle non-pythonhosted formula URLs""
This reverts commit 286e175a313bfc4505f972c343200dfa7e6afef5.
2023-07-02 20:46:46 -04:00
Markus Reiter
8753449dbb
Simplify CloudFlare header check. 2023-06-24 05:30:07 +02:00
Bo Anderson
6d8b033eff
Significantly improve fetch speed of bottles 2023-06-22 15:08:16 +01:00
Mike McQuaid
cd313adbe4
cmd/info: add (undocumented) --github-packages-downloads option.
This screen scrapes GitHub Packages download counts from HTML for a
core formula.

It's useful when figuring out the difference between our analytics
numbers (which people can opt-out of) and our bottle downloads (which
people cannot due to the way GitHub Packages works).
2023-06-16 15:39:49 +01:00
Mike McQuaid
75dd070395
Remove Google Analytics
We are now entirely migrated to InfluxDB so can remove all GA code.
2023-06-16 10:33:15 +01:00
Bo Anderson
c93bc7df45
utils/gems: fix bundler sometimes unnecessarily reinstalling 2023-06-06 23:32:52 +01:00
Mike McQuaid
286e175a31
Revert "PyPI: Handle non-pythonhosted formula URLs" 2023-06-05 17:21:56 +01:00
William Woodruff
0f40e224bd
utils/pypi: refactor instance variables
Signed-off-by: William Woodruff <william@yossarian.net>
2023-06-05 10:16:19 -04:00
William Woodruff
7067f72eb0
utils/pypi: fix sig
Signed-off-by: William Woodruff <william@yossarian.net>
2023-06-04 23:49:20 -04:00
William Woodruff
af6f728eb4
utils, test: rewrite PyPI::Package
This rewrites the `Package` class from the ground up
to better accomodate non-PyPI URLs.

The existing APIs are largely preserved, but with
clearer invariants around when they can or can't be used
(e.g., `#pypi_info`).

Signed-off-by: William Woodruff <william@yossarian.net>
2023-06-04 23:32:09 -04:00
William Woodruff
0b3a5d0f6c
utils/pypi: set default from_pypi
Signed-off-by: William Woodruff <william@yossarian.net>
2023-06-04 00:36:23 -04:00
William Woodruff
685693a8fe
utils/pypi: enforce non-pypi urls
Signed-off-by: William Woodruff <william@yossarian.net>
2023-06-04 00:27:34 -04:00
William Woodruff
f8d6dd4b94
utils/pypi: ensure Python
Signed-off-by: William Woodruff <william@yossarian.net>
2023-06-03 23:47:41 -04:00
William Woodruff
009ebff85c
utils/pypi: trim exception
Signed-off-by: William Woodruff <william@yossarian.net>
2023-06-03 23:17:59 -04:00
William Woodruff
d8b6bb2d4c
utils/pypi: more docs
Signed-off-by: William Woodruff <william@yossarian.net>
2023-06-03 23:15:44 -04:00
William Woodruff
43ba30e8a9
utils/pypi: style
Signed-off-by: William Woodruff <william@yossarian.net>
2023-06-03 23:13:26 -04:00
William Woodruff
f923b337b7
utils/pypi: support for non-pythonhosted urls
Signed-off-by: William Woodruff <william@yossarian.net>
2023-06-03 23:09:49 -04:00
Carlo Cabrera
f7d86ff9bc
Merge pull request #15398 from carlocab/pulls-api
utils/github: use Pulls API to check open pull requests on CI
2023-06-02 12:05:27 +08:00
Carlo Cabrera
fb73f074b6
utils/github: clarify comment
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-06-02 11:52:11 +08:00