HypothesisWorks / hypothesis

Hypothesis is a powerful, flexible, and easy to use library for property-based testing.
https://hypothesis.works
Other
7.39k stars 578 forks source link

Stack depth of return-type warning in @composite strategy #4024

Open reaganjlee opened 3 days ago

reaganjlee commented 3 days ago

Fixes issue #3985

I checked where the frames pointed to and it seemed that pointing back to the user code seemed most reasonable. If we were to point to internal hypothesis code, the best for py3.10/3.11: stackdepth=3 at core.py, line 1893 for def composite(f: Callable[..., Ex]) -> Callable[..., SearchStrategy[Ex]]:. The best for py3.12: stackdepth=1 at core.py, line 1888 for return _composite(f).

reaganjlee commented 3 days ago

Seems the failing tests are all non-osx issues. Is there any recommended way to work on these from a mac without it being too involved on setup?

Zac-HD commented 2 days ago

Two reasonable options:

  1. just read the CI logs, push, and it'll run that way.
  2. run the TASK=... ./build.sh command that CI runs; most of them will behave identically on OSX as Linux - we just run all the library-specific stuff on Linux because the worker instances are so much cheaper. And if this is troublesome for something, go to (1).