Lazy imports in #Python are useful but limited by obscuring of typing information. In my latest blog post, I discuss a method to create typing information that more people should know about.
blog.changs.co.uk/fixing-lazy-...
blog.changs.co.uk/fixing-lazy-...
Fixing lazy imports: Generating Static Types Dynamically
So I've just released a package called lazy-helper. This comes as lazy loading has been a hot topic once again due to the proposal PEP-810. Using...
blog.changs.co.uk
October 29, 2025 at 10:28 PM
Lazy imports in #Python are useful but limited by obscuring of typing information. In my latest blog post, I discuss a method to create typing information that more people should know about.
blog.changs.co.uk/fixing-lazy-...
blog.changs.co.uk/fixing-lazy-...
Reposted by Jamie Chang
On this week's episode, @digiglean.bsky.social and I talk about loads of PEPs, more 3.14 news, and discuss what it means to have good engineering taste.
With content from: @brianokken.bsky.social @miguelgrinberg.com @changs.co.uk @davepeck.org and others not on the 🦋
With content from: @brianokken.bsky.social @miguelgrinberg.com @changs.co.uk @davepeck.org and others not on the 🦋
Episode #271: Benchmarking Python 3.14 & Enabling Asyncio to Scale – The Real Python Podcast
How does Python 3.14 perform under a few hand-crafted benchmarks? Does the performance of asyncio scale on the free-threaded build? Christopher Trudeau is back on the show this week, bringing another…
buff.ly
October 24, 2025 at 3:30 PM
On this week's episode, @digiglean.bsky.social and I talk about loads of PEPs, more 3.14 news, and discuss what it means to have good engineering taste.
With content from: @brianokken.bsky.social @miguelgrinberg.com @changs.co.uk @davepeck.org and others not on the 🦋
With content from: @brianokken.bsky.social @miguelgrinberg.com @changs.co.uk @davepeck.org and others not on the 🦋
Reposted by Jamie Chang
I benchmarked --help on a CLI with the ref implementation for PEP 810 (lazy imports).
Because my CLI moved imports into functions just before they get used, I got a speedup of x1.3.
Then I moved all the imports to the top like normal, and got a speedup of x2.9!
hugovk.dev/blog/2025/la...
#Python
Because my CLI moved imports into functions just before they get used, I got a speedup of x1.3.
Then I moved all the imports to the top like normal, and got a speedup of x2.9!
hugovk.dev/blog/2025/la...
#Python
Three times faster with lazy imports
hugovk.dev
October 19, 2025 at 4:55 PM
I benchmarked --help on a CLI with the ref implementation for PEP 810 (lazy imports).
Because my CLI moved imports into functions just before they get used, I got a speedup of x1.3.
Then I moved all the imports to the top like normal, and got a speedup of x2.9!
hugovk.dev/blog/2025/la...
#Python
Because my CLI moved imports into functions just before they get used, I got a speedup of x1.3.
Then I moved all the imports to the top like normal, and got a speedup of x2.9!
hugovk.dev/blog/2025/la...
#Python
To celebrate the release of #Python 3.14| look at the often overlooked #asyncio changes:
blog.changs.co.uk/python-314-3...
blog.changs.co.uk/python-314-3...
Python 3.14: 3 Asyncio Changes
Python 3.14 was officially released on October 7th. There are a lot of new features and I've covered some of them before in: Python 3.14: 3...
blog.changs.co.uk
October 10, 2025 at 4:06 PM
To celebrate the release of #Python 3.14| look at the often overlooked #asyncio changes:
blog.changs.co.uk/python-314-3...
blog.changs.co.uk/python-314-3...
Reposted by Jamie Chang
Let me post a *non*-subskeet for once... We made a thing!
discuss.python.org/t/pep-810-ex...
#Python #PEP
discuss.python.org/t/pep-810-ex...
#Python #PEP
PEP 810: Explicit lazy imports
👋 Hi everyone, We are very exited to share with you PEP 810: Explicit lazy imports: We’re proposing an opt-in lazy import syntax that defers module loading until first use, aiming for faster startup,...
discuss.python.org
October 3, 2025 at 12:04 PM
Let me post a *non*-subskeet for once... We made a thing!
discuss.python.org/t/pep-810-ex...
#Python #PEP
discuss.python.org/t/pep-810-ex...
#Python #PEP
Reposted by Jamie Chang
Python 3.14: 3 Smaller Features #python
Python 3.14: 3 Smaller Features #python
With a jam packed 3.14 release around the corner, it's also important to look at the smaller features coming to Python
blog.changs.co.uk
September 16, 2025 at 7:30 PM
Python 3.14: 3 Smaller Features #python
New blog post about measuring the speed and memory performance on different asyncio baackpressure solutions.
blog.changs.co.uk/asyncio-back...
#python #asyncio
blog.changs.co.uk/asyncio-back...
#python #asyncio
Asyncio backpressure - follow up
Previously when discussing asyncio backpressure I've made some claims that were not necessarily complete. I said: It works well for 100s of urls...
blog.changs.co.uk
September 15, 2025 at 6:58 PM
New blog post about measuring the speed and memory performance on different asyncio baackpressure solutions.
blog.changs.co.uk/asyncio-back...
#python #asyncio
blog.changs.co.uk/asyncio-back...
#python #asyncio
I'm excited to see UUID V7 being supported more universally.
For databases, UUID 7 combines the flexibility and security of UUID 4 with time based ordering making it a great choice for IDs
For databases, UUID 7 combines the flexibility and security of UUID 4 with time based ordering making it a great choice for IDs
What's New in Python 3.14:
* Support UUID versions 6, 7, & 8 via uuid.uuid6(), uuid.uuid7(), & uuid.uuid8()
* uuid.NIL and uuid.MAX represent Nil and Max UUID formats
* Generate multiple UUIDs at once via python -m uuid --count
docs.python.org/3.14/whatsne...
#Python #Python314 #UUID #RFC9652
* Support UUID versions 6, 7, & 8 via uuid.uuid6(), uuid.uuid7(), & uuid.uuid8()
* uuid.NIL and uuid.MAX represent Nil and Max UUID formats
* Generate multiple UUIDs at once via python -m uuid --count
docs.python.org/3.14/whatsne...
#Python #Python314 #UUID #RFC9652
What’s new in Python 3.14
Editor, Hugo van Kemenade,. This article explains the new features in Python 3.14, compared to 3.13. For full details, see the changelog. Summary – release highlights: Python 3.14 will be the lates...
docs.python.org
September 11, 2025 at 6:24 PM
I'm excited to see UUID V7 being supported more universally.
For databases, UUID 7 combines the flexibility and security of UUID 4 with time based ordering making it a great choice for IDs
For databases, UUID 7 combines the flexibility and security of UUID 4 with time based ordering making it a great choice for IDs
Python 3.14: 3 smaller features share.google/j0VSOzZH2lck...
Python 3.14: 3 smaller features
Python 3.14 is just around the corner and it's jampacked with huge updates: Free threading and multiple interpreters? Template strings But as with...
share.google
July 14, 2025 at 8:02 PM
Python 3.14: 3 smaller features share.google/j0VSOzZH2lck...
Reposted by Jamie Chang
If you use "AI agents" (LLMs calling tools in a loop) you need to be aware of the Lethal Trifecta
Combine access to private data, exposure to untrusted content and the ability to externally communicate and an attacker can trick the system into stealing your data simonwillison.net/2025/Jun/16/...
Combine access to private data, exposure to untrusted content and the ability to externally communicate and an attacker can trick the system into stealing your data simonwillison.net/2025/Jun/16/...
The lethal trifecta for AI agents: private data, untrusted content, and external communication
If you are a user of LLM systems that use tools (you can call them “AI agents” if you like) it is critically important that you understand the risk of …
simonwillison.net
June 16, 2025 at 1:21 PM
If you use "AI agents" (LLMs calling tools in a loop) you need to be aware of the Lethal Trifecta
Combine access to private data, exposure to untrusted content and the ability to externally communicate and an attacker can trick the system into stealing your data simonwillison.net/2025/Jun/16/...
Combine access to private data, exposure to untrusted content and the ability to externally communicate and an attacker can trick the system into stealing your data simonwillison.net/2025/Jun/16/...
#MCP is here to stay, so I tried implementing something slightly more useful than a weather tool. See how you can use custom MCP servers to help with your github workflow:
blog.changs.co.uk/first-look-a...
blog.changs.co.uk/first-look-a...
First Look at MCP
Previously I've played with tool calling in Langchain and Python sandboxes. But recently MCP (Model Context Protocol) is front and center. So I...
blog.changs.co.uk
June 5, 2025 at 10:05 PM
#MCP is here to stay, so I tried implementing something slightly more useful than a weather tool. See how you can use custom MCP servers to help with your github workflow:
blog.changs.co.uk/first-look-a...
blog.changs.co.uk/first-look-a...
May 29, 2025 at 10:58 PM
Python3.14 beta 1 is out today, I go over how to use and abuse the new t-strings:
blog.changs.co.uk/t-strings-th...
blog.changs.co.uk/t-strings-th...
t-strings: the good and the ugly
This one's hot off the press as the first beta for Python 3.14 (aka. π-thon) has hit. We're looking at a chunky release with a lot of new...
blog.changs.co.uk
May 7, 2025 at 11:04 PM
Python3.14 beta 1 is out today, I go over how to use and abuse the new t-strings:
blog.changs.co.uk/t-strings-th...
blog.changs.co.uk/t-strings-th...
Reposted by Jamie Chang
Reposted by Jamie Chang
My SQLAlchemy Cookbook #python
My SQLAlchemy Cookbook #python
The post contains an embedded JupyterLite notebook containing a cookbook for SQLAlchemy. It focuses on the patterns you use in everyday ORM coding.
blog.changs.co.uk
March 13, 2025 at 3:00 AM
My SQLAlchemy Cookbook #python
I've been unknowingly building DSLs using operators in #Python. Here I walkthough how you might do the same!
blog.changs.co.uk/building-a-d...
blog.changs.co.uk/building-a-d...
Building a DSL with Python Operators
I've been a little obsessed with operator overloading lately. First using |= in sqlalchemy-builder and then using | and @ in better-functools. I...
blog.changs.co.uk
March 12, 2025 at 9:14 PM
I've been unknowingly building DSLs using operators in #Python. Here I walkthough how you might do the same!
blog.changs.co.uk/building-a-d...
blog.changs.co.uk/building-a-d...
Reposted by Jamie Chang
Customising Pattern Matching Behaviour #python
Customising Pattern Matching Behaviour #python
Jamie has been doing the [Advent of Code](https://adventofcode.com/) and two techniques that come up a lot in Python are iteration and pattern matching. This post talks about how they don't work well together and what you can do about it.
blog.changs.co.uk
March 10, 2025 at 3:00 AM
Customising Pattern Matching Behaviour #python
Check out my blog post on functional programming in Python, where I talk a bit more about my new #Python package blog.changs.co.uk/better-funct...
better-functools: Python functional fun
I recently put some effort into creating better-functools. It's a package that adds some tooling for functional programming in Python. And allows...
blog.changs.co.uk
March 9, 2025 at 10:26 PM
Check out my blog post on functional programming in Python, where I talk a bit more about my new #Python package blog.changs.co.uk/better-funct...
Been a little obsessed with #ocaml lately, so I've tried to bring some of #functional ergonomics into #Python.
Checkout my new package better-functools
pypi.org/project/bett...
Checkout my new package better-functools
pypi.org/project/bett...
March 4, 2025 at 6:38 PM
Been a little obsessed with #ocaml lately, so I've tried to bring some of #functional ergonomics into #Python.
Checkout my new package better-functools
pypi.org/project/bett...
Checkout my new package better-functools
pypi.org/project/bett...
TIL: though functools.partial can't be expressed using #Python types, both pyright and mypy support it fully.
pyright-play.net?pythonVersio...
pyright-play.net?pythonVersio...
Pyright Playground
pyright-play.net
February 6, 2025 at 12:45 PM
TIL: though functools.partial can't be expressed using #Python types, both pyright and mypy support it fully.
pyright-play.net?pythonVersio...
pyright-play.net?pythonVersio...
New blog post!
Do you use #sqlalchemy? Have you run into this issue? #Python
blog.changs.co.uk/sqlalchemy-f...
Do you use #sqlalchemy? Have you run into this issue? #Python
blog.changs.co.uk/sqlalchemy-f...
Sqlalchemy Footgun: Discarding the statement
This one has frustrated me for a while. It starts off with a REST API route. For example in fastAPI @app.get(
blog.changs.co.uk
February 3, 2025 at 12:51 PM
New blog post!
Do you use #sqlalchemy? Have you run into this issue? #Python
blog.changs.co.uk/sqlalchemy-f...
Do you use #sqlalchemy? Have you run into this issue? #Python
blog.changs.co.uk/sqlalchemy-f...
Reposted by Jamie Chang
We’re building a new static type checker for Python, from scratch, in Rust.
From a technical perspective, it’s probably our most ambitious project yet. We’re about 800 PRs deep!
From a technical perspective, it’s probably our most ambitious project yet. We’re about 800 PRs deep!
January 29, 2025 at 5:18 PM
We’re building a new static type checker for Python, from scratch, in Rust.
From a technical perspective, it’s probably our most ambitious project yet. We’re about 800 PRs deep!
From a technical perspective, it’s probably our most ambitious project yet. We’re about 800 PRs deep!
I love this almost completely useless graphql page where it shows you all the cool tools but doesn't give you any links to them.
graphql.org/community/to...
graphql.org/community/to...
Tools and Libraries | GraphQL
A collection of tools and libraries for GraphQL
graphql.org
January 25, 2025 at 10:27 PM
I love this almost completely useless graphql page where it shows you all the cool tools but doesn't give you any links to them.
graphql.org/community/to...
graphql.org/community/to...
Reposted by Jamie Chang
If you have a browser that supports WebGPU (like Google Chrome) you try out the DeepSeek-R1 model based on Qwen2.5-Math-1.5B directly in your browser!
It's a 1.28GB page load: huggingface.co/spaces/webml...
It's a 1.28GB page load: huggingface.co/spaces/webml...
January 21, 2025 at 10:06 PM
If you have a browser that supports WebGPU (like Google Chrome) you try out the DeepSeek-R1 model based on Qwen2.5-Math-1.5B directly in your browser!
It's a 1.28GB page load: huggingface.co/spaces/webml...
It's a 1.28GB page load: huggingface.co/spaces/webml...