homebrew-core
homebrew-core copied to clipboard
python-typing-extensions 4.3.0 (new formula)
- [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 doingbrew install --build-from-source <formula>)? If this is a new formula, does it passbrew audit --new <formula>?
I'm adding this formula to resolve the build problems in #110199.
If it's just a library I'm not sure it belongs in Homebrew.
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!
Python libraries that can be used in multiple formulae are ok by me.
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.
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.
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
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.
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
So where do we stand on this pull request? Can it be merged?
Can we try a better test beyond just import?
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.
@carlocab Is this ready to be merged?
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?
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.
:shipit: @carlocab has triggered a merge.
Sorry, too many PRs to look at there. Should be merged soon.