homebrew-core icon indicating copy to clipboard operation
homebrew-core copied to clipboard

python-typing-extensions 4.3.0 (new formula)

Open singingwolfboy opened this issue 3 years ago • 13 comments

  • [x] Have you followed the guidelines for contributing?
  • [x] Have you ensured that your commits follow the commit style guide?
  • [x] Have you checked that there aren't other open pull requests for the same formula update/change?
  • [x] Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • [x] Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • [x] Does your build pass brew audit --strict <formula> (after doing brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

I'm adding this formula to resolve the build problems in #110199.

singingwolfboy avatar Sep 11 '22 09:09 singingwolfboy

If it's just a library I'm not sure it belongs in Homebrew.

SMillerDev avatar Sep 12 '22 08:09 SMillerDev

If it's just a library I'm not sure it belongs in Homebrew.

Is there a standard test or guideline for what belongs in Homebrew and what doesn't? six and pyyaml are both Python libraries, but they have formulae in Homebrew.

Also, as I mentioned in the pull request description, I created this formula to attempt to address a linkage problem with another formula: https://github.com/Homebrew/homebrew-core/pull/110199#issuecomment-1242925164 If typing-extensions was its own Homebrew formula, then other formulae that depend on it could declare the dependency in the formula, and avoid linkage conflicts. If you have a better suggestion for how to resolve this, I'm open to it!

singingwolfboy avatar Sep 12 '22 10:09 singingwolfboy

Python libraries that can be used in multiple formulae are ok by me.

carlocab avatar Sep 12 '22 10:09 carlocab

https://docs.brew.sh/Formula-Cookbook#specifying-gems-python-modules-go-projects-etc-as-dependencies has the rule about this. I'm fine with whatever other maintainers decide though.

SMillerDev avatar Sep 12 '22 11:09 SMillerDev

six, pyaml, tabulate, pillow are already accepted exceptions in homebrew. I'm fine to add python-typing-extensions because it is a quite similar situation.

The only condition is that these formulae need to have Python 3.8, 3.9 and 3.10 as build and test dependencies, to be able to use them in a mixed Python dependency tree and not block any new Python migration.

We might need to update the documentation though: https://docs.brew.sh/Formula-Cookbook#specifying-gems-python-modules-go-projects-etc-as-dependencies

We should also define a better rule for these exceptions in the documentation. Else there are many Python resources that could be added as formula.

iMichka avatar Sep 14 '22 14:09 iMichka

The only condition is that these formulae need to have Python 3.8, 3.9 and 3.10 as build and test dependencies, to be able to use them in a mixed Python dependency tree and not block any new Python migration.

Mixed Python versions in the dep tree will no longer fail CI. See

https://github.com/Homebrew/homebrew-core/blob/c1def0c480b8011ae291984e8f6e2d769aa986a9/audit_exceptions/versioned_formula_dependent_conflicts_allowlist.json#L2

carlocab avatar Sep 14 '22 16:09 carlocab

Right sorry forgot that changed lately. This should be:

The only condition is that these formulae need to have Python 3.8, 3.9 and 3.10 as build and test dependencies, to not block any new Python migration.

I am still wondering where we draw the line between resources and formula for these cases.

iMichka avatar Sep 15 '22 14:09 iMichka

The line I would draw is:

  • can be used in multiple formulae (and, correspondingly, dependents should not have overly strict version requirements for the dependency we want to make into a formulae)
  • does not require any Python resources to be installed at runtime
  • has a non-trivial test

carlocab avatar Sep 15 '22 14:09 carlocab

So where do we stand on this pull request? Can it be merged?

singingwolfboy avatar Sep 17 '22 13:09 singingwolfboy

Can we try a better test beyond just import?

carlocab avatar Sep 17 '22 14:09 carlocab

Can we try a better test beyond just import?

Good point. I've added a test using mypy to check that the type annotations work correctly.

singingwolfboy avatar Sep 17 '22 16:09 singingwolfboy

@carlocab Is this ready to be merged?

singingwolfboy avatar Sep 20 '22 15:09 singingwolfboy

Hi @carlocab, sorry to ping you again, but I don't want this to get forgotten about. Is there anything preventing this from being merged?

singingwolfboy avatar Sep 22 '22 13:09 singingwolfboy

Could someone please merge this pull request? @carlocab? @SMillerDev? @chenrui333? Or if there's something more I need to do, please let me know, but it doesn't look that way to me.

singingwolfboy avatar Sep 25 '22 06:09 singingwolfboy

:shipit: @carlocab has triggered a merge.

BrewTestBot avatar Sep 25 '22 07:09 BrewTestBot

Sorry, too many PRs to look at there. Should be merged soon.

carlocab avatar Sep 25 '22 07:09 carlocab