gyund / fundamental-analysis

Aggregate and modularize efficient and reliable tools for performing fundamental analysis on US securities
https://gyund.github.io/fundamental-analysis/
Eclipse Public License 2.0
1 stars 0 forks source link

Bump beartype from 0.14.1 to 0.17.0 #211

Closed dependabot[bot] closed 7 months ago

dependabot[bot] commented 7 months ago

Bumps beartype from 0.14.1 to 0.17.0.

Release notes

Sourced from beartype's releases.

Beartype 0.16.4

This patch release resolves all the bad things that have quietly gone unnoticed by both man and Maine Coon alike... until now. Fellow Ontarian and ML superstar @​MaximilienLC (Maximilien Le Cleï) seriously, what is up with that "ï" quietly called our attention to a bevy (pretty sure that means "alot") of outstanding badness riddling the @​beartype codebase.

This patch release resolves that badness. This means:

  • beartype.claw + methods + PEP 526. Previously, beartype.claw silently failed to type-check PEP 526-compliant annotated variable assignments in methods. Now, beartype.claw does so: e.g.,

    # In "{your_sagacious_package}.__init__":
    from beartype import beartype_this_package
    beartype_this_package()
    

    In "{your_sagacious_package}...{your_bodacious_module}":

    class SoMuchClass(object): def so_much_method(self) -> None: # "beartype.claw" now raises an exception on this violation. Yah! so_much_local: int = 'You no longer fool @​beartype, local."

        # "beartype.claw" also raises an exception on this violation. Go!
        self.so_much_var: int = 'You too are known to @beartype, variable."
    

  • @​beartype 0.16.3 inheritance regression. @​beartype's prior stable release (i.e., @​beartype 0.16.3) introduced a critical regression with respect to inheritance and type-checking. Notably, the @beartype decorator silently failed to type-check subclass methods overriding superclass methods under @​beartype 0.16.3. Now, it does. I implore you all to believe that this never happened... Believe!

Much thanks to @​MaximilienLC for his all-seeing eye, which sees all @​beartype's typing failures as plainly as I see the blinding glare off my bald and malding head. (Pretty itsy-bitsy nitty-gritty, innit?)

Beartype 0.16.3

This bug-defying patch release adds official support for hot module reloading, root superclass validators, forward reference issubclass() proxying, readable forward reference exceptions, and class redecoration eliding as well as documenting a medley of topics and APIs first introduced with the beartype.claw subpackage under @​beartype 0.15.0. Where did the time go? Probably playing vidya games, if I'm being openly honest with myself.

@​beartype 0.16.3 almost qualified as a full-blown minor release called @​beartype 0.17.0. In the end, however... you failed, @​beartype 0.16.3! You weren't quite big enough, dizzyingly stupefying enough, or blatantly broken enough to get upgraded to a minor release. It's for the best.

Look. It was Canadian Thanksgiving. It was all I could do to take the roasted turkey leg out of my mouth. Still, there is awesome sauce. This includes:

  • Hot reloading. @​beartype is now robust against hot reloading (i.e., re-importation of previously imported modules containing one or more @​beartype-decorated classes), resolving issue #288 kindly submitted by awfully ingenious Cambridge researcher @​awf (Andrew Fitzgibbon). The @beartype decorator now explicitly (in order):

    1. Detects class redefinition (i.e., redefinition of a previously @beartype-decorated class with the same name in the same module, usually but not necessarily due to hot reloading).
    2. On the first redefinition of any class, clears all caches (i.e., @​beartype-specific internal caches that could possibly contain the prior definition of that redefined class).
  • Root superclass validators. The @beartype decorator now supports beartype validators of the form typing(|_extensions).Annotated[object, beartype.vale.Is*, ...] (i.e., PEP 593-compliant type hints annotating the otherwise ignorable root object superclass by one or more unignorable beartype validators), resolving both issues #290 kindly submitted by Plum maestro @​wesselb (Wessel) and beartype/plum#120 kindly submitted by professional hodge-podger @​hodgespodge. With the fearsome power of root superclass validators, validate that arbitrary objects satisfy various constraints regardless of the actual types of those objects. This is now a thing:

    >>> from beartype.door import is_bearable
    >>> from beartype.typing import Annotated
    >>> from beartype.vale import Is
    

    >>> ICanHazAttr = Annotated[object, Is[ ... lambda value: hasattr(value, 'i_can_haz_attr')]] >>> is_bearable('hello', ICanHazAttr) False # <-- y u no got that attr, "str" class!?

    >>> class IHazAttr(object): ... i_can_haz_attr = 'Totally got this one, bro.'

... (truncated)

Commits
  • 7d9051f Beartype 0.17.0: Ultrabear vs. Mecha-Bugbear
  • e75565b PyTorch x 2.
  • c811182 PyTorch x 1.
  • 2fa1f3c pyright 1.1.348 compatibility breakage.
  • 71365a2 beartype.BeartypeConf.violation_type.
  • 828cc18 beartype.door.die_if_unbearable() warning x 5.
  • ae9bee6 beartype.door.die_if_unbearable() warning x 4.
  • d259a99 beartype.door.die_if_unbearable() warning x 3.
  • d0f155d beartype.door.die_if_unbearable() warning x 2.
  • 14ddbe0 beartype.door.die_if_unbearable() warning 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)
dependabot[bot] commented 7 months ago

Superseded by #217.