Skip to main content
Image

r/Python


python's free threading is the feature nobody's talking about enough
python's free threading is the feature nobody's talking about enough
News

every python conversation in 2026 is about AI. which is fair, the ecosystem is incredible for ML and the tooling keeps getting better. but free threading (the no-GIL work) might be the most important thing happening to python as a general purpose language and it barely comes up

for context if you havent followed it closely, python is getting real multithreading. not multiprocessing where you spawn separate processes and deal with serialization overhead, actual shared-memory threads that run in parallel. the thing people have been asking for literally since python existed

i tested it on a data pipeline at work thats CPU bound, parsing and transforming a few million records. with the GIL the threaded version was actually slower than single-threaded because of lock contention. with free threading enabled it scaled almost linearly across 4 cores. same code, just a flag

the reason i think this matters beyond the benchmarks is that it removes one of the main arguments for reaching for Go or Node for concurrent workloads. "python cant do real concurrency" has been true for 30+ years and now it just isnt you know

obviously theres caveats. C extensions need to be updated, some libraries arent thread-safe yet, and you probably shouldnt throw it into production tomorrow. but the trajectory is clear and i feel like the community is sleeping on it because everyone is focused on whether claude or gpt is better at writing pandas code

idk maybe im wrong and everyone is paying attention and i just missed it. but in my circle at least this barely gets mentioned


Build precise context and make your intent explicit with Kiro's executable specs.
Image Build precise context and make your intent explicit with Kiro's executable specs.


I just learned round() uses bankers' rounding
I just learned round() uses bankers' rounding
Discussion

In bankers' rounding, x.5 rounds to the nearest even number. So, if x is even, it rounds down... round(2.5) returns 2. If x is odd, it rounds up... round(3.5) returns 4.

It was explained that it removes an upward rounding bias when round(x.5) always returns x+1...

  • x.1, x.2, x.3, & x.4 always round down.

  • x.6, x.7, x.8, & x.9 always round up.

  • Four down, four up.

  • x.5 is the right in the middle. If it always rounded up, there would be a slight creep upwards in large datasets.

But, whither x.0? x.0 always rounds to x. So, there are five cases where x.y always rounds down, not four.

And...

  • round(2.500000000000001) return 3

  • round(2.5000000000000001) returns 2

... though that might be more to do with binary representation of floats than rounding rules since 2.5000000000000001 == 2.5 is True.


Are we happy with SQLAlchemy?
Are we happy with SQLAlchemy?
Discussion

I really need the community's opinion on this. I've worked with a lot of ORMs, from Entity Framework to DrizzleORM. SQLAlchemy is the best option we have in the Python ecosystem, but it still sucks compared to ORMs in other ecosystems.

When I was working with Go, I discovered sqlc and loved it. It's great, but not enough to replace a full ORM because of its limitations (no dynamic queries).

For the last five months, I've been building my own equivalent for Python, powered by sqlglot. Unlike sqlc, it has dynamic filters, sorting, and partial updates. It also has a single parameter syntax for all supported dialects (:param), which are Postgres, MySQL, SQLite, DuckDB, and ClickHouse. I borrowed sqlc's end-to-end test cases, and my version passes all of them now.

It has already replaced SQLAlchemy for me in several microservices. So I guess my question is: is it worth continuing to build it? Because I don’t really know if other Python devs need such tool.

I've had a lot of fun building the current version, and I have a long roadmap ahead. That includes migrations (with auto-generation when possible), generators for other languages, and much more.