mit-ll-responsible-ai / hydra-zen

Create powerful Hydra applications without the yaml files and boilerplate code.
https://mit-ll-responsible-ai.github.io/hydra-zen/
MIT License
338 stars 15 forks source link

Bump beartype from 0.17.0 to 0.17.1 in /docs #648

Closed dependabot[bot] closed 8 months ago

dependabot[bot] commented 9 months ago

Bumps beartype from 0.17.0 to 0.17.1.

Release notes

Sourced from beartype's releases.

Beartype 0.17.1: Bully Maguire Bullies Bugs

Beartype 0.17.1 gently descends from the heavens on a golden dragon made of rainbows. "How can this be!?", the crowd exclaims. Verily, it is best not to ask questions:

pip install --upgrade beartype

This patch release comes courtesy these proud GitHub Sponsors, without whom @​leycec's cats would currently be eating grasshoppers:

Thanks so much, masters of fintech.

Who Let the Bugs Out?

This patch release adds explicit support for typing.NamedTuple subclasses under PEP 563 (i.e., from __future__ import annotations), resolving issue #318 kindly submitted by the cosmically rare-earth GitHub element @​kasium. For unknown reasons (which probably reduce to "Guido was tired that day."), the typing.NamedTuple superclass exhibits high strangeness.

Specifically, for each typing.NamedTuple subclass named {MuhTuple}, the typing.NamedTuple superclass dynamically generates a {MuhTuple}.__new__() dunder method whose:

  • __annotations__ dunder attribute wraps all stringified type hints inside typing.ForwardRef(...) objects. Why? No reason.
  • __module__ dunder attribute claims that method was defined in a fake module named named_{MuhTuple}. Why? Nobody knows.

For example:

from __future__ import annotations  # <-- PEP 563: it makes kittens cry
import typing

When you said this...

class MuhTuple(typing.NamedTuple): # <-- very reasonable muh_field: int # <-- makes sense, huh?

...what "typing.NamedTuple" heard you say was this:

class MuhTuple(typing.NamedTuple): def new(cls, muh_field: ForwardRef('int')) -> None: # <-- wut self.muh_field = muh_field MuhTuple.new.module = 'named_MuhTuple' # <-- lolbro

Why does typing.NamedTuple do these sad things? Because it is crazy. This is the official answer. Cray classes gonna cray.

@​beartype now responds with a mountain of code that took us two weeks. Was that worth it? Probably not. Probably should have just implemented deep type-checking already. Instead, this is all we got.

Mo Money Means Mo Code

@​beartype 0.17.0 advised everybody to donate money to charitable causes. Instead, everybody donated more money to @​beartype. Reverse psychology surely is the path of righteousness.

These monocled code aristocrats graciously filled the money trough, which the cats are now sleeping on against our wishes:

... (truncated)

Commits
  • 1c51f3d Beartype 0.17.1 released.
  • 193f005 Beartypistry removal.
  • 2fda008 Forward reference proxy cache handling.
  • db7d538 PEP 563 + typing.NamedTuple x 10.
  • a7794bb PEP 563 + typing.NamedTuple x 9.
  • bebad05 Resolve documentation code typo.
  • 79db992 PEP 563 + typing.NamedTuple x 8.
  • 15b1d1f PEP 563 + typing.NamedTuple x 7.
  • 657a3b6 ReadTheDocs updating x 2.
  • 36df44d ReadTheDocs updating x 1.
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)