Pyrefly and Ty are so new they still smell like shrinkwrap, but we still took them both out for a spin. We also have a starter guide to Python's new type hints, a look ahead to what's on the horizon for free-threaded Python, a sneaky malware update, and more.

This week in Python brings us a toe-to-toe showdown between two Rust-powered Python type checking tools. We also have a gentle introduction to type hinting, a look at the perils—and promises—ahead for a free-threaded, no-GIL Python, and a shocking exposé (okay, just kidding) of the latest malware attacks targeting machine learning developers, this time delivered via PyPI.
Top picks for Python readers on InfoWorld
Pyrefly and Ty: Two new Rust-powered Python type-checking tools compared
These tools are so new they barely have the shrinkwrap off, but even at this stage, they stand apart from each other and the rest of the pack—and not just because they’re fast.
’Fearless concurrency’ in future versions of free-threaded Python
A free-threaded, no-GIL Python promises real concurrency, at long last. But what side-effects will come with that freedom? And how can we start fixing them now?
Get started with Python type hints
Intimidated by Python’s new-ish type hinting powers? Learn how to use type hints where and when you need them. In the long run, you’ll be rewarded with better IDE suggestions and more readable Python.
More good reads and Python updates elsewhere
Malicious PyPI package targets Chimera users to steal AWS tokens, CI/CD secrets
Machine learning developers were the targets for this latest example of malware distributed via the Python package ecosystem.
The free-threaded Python compatibility checker
Does your favorite third-party library run properly under the free-threaded Python builds? This handy online tool lets you search packages by name and find out. You can also check the status of the top 1,000 PyPI packages in an at-a-glance infographic.
PyPDFForm: Free, open source PDF form processing in Python
Quit filling in PDF forms by hand! This library automates filling form fields in PDFs and saves the results to new PDFs. It also lets you programmatically inspect the existing fields in a PDF for other processing.
WinUp: A better way to make Qt6 desktop apps in Python
Most desktop GUI frameworks for Python win no awards for being easy to use or aesthetically appealing. WinUp is different, letting you use simple, declarative code to describe your UI layout and behaviors, leverage many common prebuilt components, and even work with system functions like the camera or notifications tray.
Slightly off topic: Build a tiny programming language and compiler from scratch
There are many crash courses in creating a toy programming language, but this one gets points for being cross-platform, LLVM-powered, and written in straightforward C++. Bonus points to anyone who writes a Rust port!