3 ms·
Pyrefly v1.0.0 is here (Type Checker / Language Server for Python) [video]
- kinto 5mo agoHi, Pyrefly developer here. It's been almost a year since our alpha has been released and we've been working hard towards a stable release. We're excited to announce general availability today! See the official blog post for more details: https://pyrefly.org/blog/v1.0/ https://pyrefly.org/blog/v1.0/
- rtolsma 5mo agofor production usage, what are the major deltas vs. pyright today?
- kinto 5mo agoWhat type of deltas? We compare "conformance" on [this](https://pyrefly.org/blog/typing-conformance-comparison/ https://pyrefly.org/blog/typing-conformance-comparison/) blog, which was a benchmark created by the creator of Pyright. However, it is quite specific to un-specified sections of PEP484 (things that checkers may not need to agree on but should). In terms of performance, you can see results [here](https://python-type-checking.com/typecheck_benchmark/ https://python-type-checking.com/typecheck_benchmark/) where we are quite a bit faster than pyright (almost 10x avg) and use far less memory (almost half).
- adityamwagh 5mo agoIt’s a huge memory hog. The other day it was using 2.5GB!
- kinto 5mo agocurious if you’ve tried 1.0! we’ve shipped a lot of memory improvements recently. if you have, please make a github issue and we can investigate.
- ainch 5mo agoI'm glad it's 1.0, but for me the most exciting thing is the tensor shape typing they mention in the blogpost. I've been looking for a good solution to this for ages, and the Pyrefly implementation seems to have everything I'd like - incl. static typing (unlike jaxtyping's runtime-only setup), and shape inference (so passing a 2,3 tensor through a 3,10 linear layer gives you a 2,10 output tensor).
- ducdetronquito 5mo agoCongrats on the release, and thanks for this nice tool ! I migrated a small python/django backend project at work from basedpyright to pyrefly 1.0 yesterday to try it, and the migration was painless: just running pyrefly init converted the basedpyright config to a pyrefly config in the pyproject.toml. The typecheking phase went from ~3/4s to 0.5s which is very nice when ran with pre-commit hooks. It also caught some unnecessary type conversion that basedpyright missed (ex: calling str(value) on a value that is already a string). I haven't toyed too much with the LSP in zed, but I did not feel anything was missing for now. I will try to migrate larger backends in the following weeks to see how it goes. Anyway, it's very cool to see a new stable and fast typechecker for Python ! :)
- kinto 5mo agoglad you like it. let us know if you have any issues!