Summary
Toward adding iOS as a supported platform
Ruff gets a formatter
Flask at 3.0
Ugly documentation metadata
The CPython REPL is getting love
Toga hits 0.4.0
Raspberry Py 5 is soon out (of stock?)
PEP 730: Adding iOS as a supported platform
Python mobile support has always been rough, and projects like Kivy have to do a lot of heavy lifting.
PEP 730 is one step in the direction of changing this, proposing to make iOS a supported platform for CPython, with the initial goal "to achieve Tier 3 support for Python 3.13". Tier 3, the lowest commitment for support, is used for plaforms like Raspberry Pi OS, BSD libc, etc. But you have to start somewhere.
The focus is on “embedded mode”, since there are no stdout on iOS and you can't provide things like the Python REPL. Three architectures tags are suggested:
aarch64-apple-ios
aarch64-apple-ios-simulator
x86_64-apple-ios-simulator
Ruff gets a formatter
I know, I know, you probably know that already. The whole world probably knows that already. Hell, major projects migrated the very day of the release.
But just in case, Ruff, a fast Python linter with sane default, is now also a formatter. It's 99.99% black compatible, 30 times faster, and still support all the flake8/pydocstyle/isort features it used to.
Needless to say it's getting harder and harder to justify to not use the tool.
I personally still stick to isort because of float to top, plus VSCode support is still not as good yet.
Still, I don't take much risk with predicting that most projects will run ruff in a near future. It's that good.
And maybe Astral, the company that writes it, will finally reveal what commercial project they want to build on top of that. Or release a mypy replacement. One can hope.
Flask at 3.0
Flask playing a huge role in the Python Web ecosystem, its version 3.0 is a big event. Yet if you look at the release notes, you will see it's pretty boring. They said they would remove deprecated code, and they did, and so they bump, as they should.
The flask ecosystem, however, is not even close to being that clean. So expect a lot of it to break while everybody tries to catch up.
As usual, don't upgrade to this now, this is not a race. Wait until things calm down, so that your bumping is equally boring.
Ugly documentation metadata
Officially dumbed "Documentation in Annotated Metadata", PEP 727 suggests we use Annotated (which I assume most of you don't even know exist) to provide documentation for variables and attributes. Indeed, docstrings can only document modules, functions, methods and classes.
Here is what it could look like:
from typing import Annotated, Doc
class User:
name: Annotated[str, Doc("The user's name")]
age: Annotated[int, Doc("The user's age")]
I rarely express strong feelings on this blog, understanding nuances are usually part of the IT game.
But in this case, I'll make an exception: this is uglier than a mammoth ass from inside, and as handy to use for typing on a keyboard. I hope it never gets approved.
I'm biased, mind you, since I already dislike Annotated
.
All in all, we should bite the bullet and formalize docstrings for parameters, module variables and class members. We all use them for that anyway already, it's just not a blessed format with a parser in the stdlib.
The CPython REPL is getting love
I have the greatest respect for Pablo Galindo Salgado and his work on the Python parser, f-string syntax, and the resulting better error messages we now enjoy.
Well, he just teased they are working on improving the Python REPL experience.
The video shows only block handling, but given it's based on pypy's pyrepl, we can also expect code completion and search history.
Also, have a look at core.py, the new podcast by Łukasz Langa and Pablo Galindo on Python internals. It’s brand new.
Toga hits 0.4.0
It's not a huge news in the sense very few people use Toga. For the project, however, it's quite a big release, and I wanted to take the opportunity to introduce this lib: it's a GUI toolkit (like TKinter, PyQT, etc), but that uses native OS widgets.
It's not super mature, and as a limited set of things it can do, but it has a lot of potential. Check it out.
Raspberry PY 5 is soon out (of stock?)
Bigger, faster, stronger, a new edition of the small computer for embedded projects with superb python supports is out. More RAM, 2 video outputs, better power and thermal performance but no stereo audio jack, the little device is eagerly expected by everyone because the Raspi 4 has been out of stock forever.
Unfortunately, most sites already mark it as out of stock... while it's only on pre-order O_o
> this is uglier than a mammoth ass from inside, and as handy to use for typing on a keyboard
HA! And yes, it looks ugly. Every few years I see an effort to make Python more like Java, and its always like, No, Java is still available (and very popular)
Regards Toga-- the whole Bee framework (of whcih toga is a part) has been out for years, but has never really taken off. Ive heard of problems with people trying to use them beyond toy projects. I dont know if anything has changed in the last 2-3 years, the last time I tried it, but it wasnt ready for production then