
Kapitelklicken springt direkt hin
Shownotes
Topics covered in this episode:
• Nod: pause your Python program and open a notebook at any line (blog.jupyter.org/posts/2026/notebooks-on-deman…)
• Polars 2.0 ships: streaming engine by default, spill-to-disk, and a row-order gotcha (pola.rs/posts/release-polars-2/?featured_on=py…)
• django-cachalot caches your ORM queries and invalidates them for you (github.com/noripyt/django-cachalot?featured_on…)
• Towards async transactions in Django (noumenal.es/stack-report/towards-async-transac…)
• Extras
• Joke
Watch on YouTube (youtube.com/watch?v=TGDze5W1EZ8)
About the show
Sponsored by us! Support our work through:
• Our courses at Talk Python (training.talkpython.fm/?featured_on=pythonbytes)
• Consulting from Six Feet Up (sixfeetup.com/?featured_on=pythonbytes)
Connect with the hosts
• Michael: Mastodon (fosstodon.org/@mkennedy) / BlueSky (bsky.app/profile/mkennedy.codes?featured_on=py…) / X (x.com/mkennedy?featured_on=pythonbytes) / LinkedIn (linkedin.com/in/mkennedy/?featured_on=pythonby…)
• Calvin: Mastodon (sixfeetup.social/@calvin?featured_on=pythonbytes) / BlueSky (bsky.app/profile/calvinhp.com?featured_on=pyth…) / X (x.com/calvinhp?featured_on=pythonbytes) / LinkedIn (linkedin.com/in/calvinhp/?featured_on=pythonby…)
• Show: Mastodon (fosstodon.org/@pythonbytes) / BlueSky (bsky.app/profile/pythonbytes.fm) / X (x.com/PythonBytes?featured_on=pythonbytes)
• Join us on YouTube at pythonbytes.fm/live (pythonbytes.fm/stream/live) to be part of the audience. Usually Tuesday at 7am PT. Older video versions available there too.
• Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list (pythonbytes.fm/friends-of-the-show), we'll never share it.
Michael #1: Nod: pause your Python program and open a notebook at any line (blog.jupyter.org/posts/2026/notebooks-on-deman…)
Nod (Notebooks-on-Demand) is a JupyterLab extension by Eric Rawn that drops a notebook into a running Python program. Add a notebook() call anywhere, run the program with nod, and execution pauses there with a notebook containing all variables at that point in the call stack. Edits go back to the source file with a button, with cells converted to code and markdown to comments via Jupytext.
• It answers the classic 'this would be easier in a notebook' debugging moment without copying snippets out to files.
• Like a breakpoint with a notebook inside: the left panel walks the call stack and notebook state switches with it
• Install is pip install nodpy plus nod --install-kernel, then run with nod python -m myfile
• The round trip back to source is the differentiator; markdown cells become comments, cells become newlines, and notebooks are disposable since the source file recreates them
• nodLog() stashes variable values across calls to explore later; the article also pitches notebook() for stepping through AI-generated code line by line
• Early stage: repo from December 2025 with 16 stars and essentially one contributor, so expect rough edges
Calvin #2: Polars 2.0 ships: streaming engine by default, spill-to-disk, and a row-order gotcha (pola.rs/posts/release-polars-2/?featured_on=py…)
• Polars 2.0 released Oct 6, 2026 (Ritchie Vink). The post says it's "not intended to be a big feature release", but it bundles a few big changes.
• LazyFrame.collect now defaults to the streaming engine, with large memory and speed gains on most queries.
• Breaking: streaming doesn't guarantee row order for join, group_by and unpivot. Use maintain_order=True if order matters. This is why it's a major version.
• Out-of-core (spill-to-disk) is on by default. It spills at about 80% of RAM ("may need tuning") with a 64 GB default disk budget. It covers sort, window functions and many expressions. Joins and group-bys are planned, not shipped.
• The new native Map dtype (Arrow MapType) replaces the old List(Struct(key, value)) reading. It comes with map.get, map.contains_key, map.len, map.keys and map.values.
• Stricter by design: errors should surface up front and implicit handling of data mismatches is opt-in. collect_schema() catches schema mismatches without reading data.
• SQL is now a first-class interface, with join reordering, better common-subplan elimination, and dynamic predicates/bloom filters.
• Benchmarks are self-run TPC-H/TPC-DS derived numbers against DuckDB 1.5.6 and 2.0 alpha, and DataFusion 54. They are not official TPC results.
• Polars was fastest on all but one benchmark. At 192 threads its constant overhead hurts small data (SF10 TPC-DS is 1.8x slower), and a fix is hoped for in the next release.
• Roadmap, not released: out-of-core joins and group-bys, better scaling at high core counts, Polars Cloud, and early GeoPolars work.
• Upgrade guide: docs.pola.rs/releases/upgrade/2
Michael #3: django-cachalot caches your ORM queries and invalidates them for you (github.com/noripyt/django-cachalot?featured_on…)
django-cachalot is a Django package that caches ORM queries and invalidates them automatically when the underlying data changes. Install it, add one line to INSTALLED_APPS, and read queries run through your cache backend with no code changes. The trick is that it caches whole tables, so any write flushes that table's cached queries, making it a strong fit for read-heavy sites and a poor one for frequently updated tables. It supports Django 4.2 through 6.1 and Python 3.8 to 3.14.
• ORM caching that normally takes careful engineering drops in with pip install and one settings line, invalidation included.
• Near-100x on joins: the README reports nearly 100x speedups for initial deployments heavy on select_related and prefetch_related.
• It caches the entire table, so a hot table with frequent writes invalidates constantly; docs suggest staying under 50 modifications per minute and mixing in cache-machine for hot paths.
• Setup is two lines, plus caveats: sync clocks across servers sharing one cache, and run a manage.py/?featured_on=pythonbytes command after restoring a database outside Django.
Calvin #4: Towards async transactions in Django (noumenal.es/stack-report/towards-async-transac…)
• Carlton Gibson, The Stack Report, Oct 9, 2026. It's about getting async with transaction.atomic() into Django, hoped for 6.2 and not a commitment. Status check: both PRs are still open as of Oct 19-20, with no approvals and no milestone.
• The problem: asyncio tasks share one thread and so one DB connection. A slow transaction that rolls back also discards a sibling task's quick write. Today transactions go through sync_to_async, so everything runs serially on one thread.
• Design: async with transaction.atomic() opens a nested ThreadSensitiveContext, which gets its own worker thread and connection. On exit the connection is cleaned up and control returns to the request's connection. Siblings keep using the request's connection in autocommit, so their writes survive a rollback.
• Only the task that opened the block may nest further atomic() blocks. Any other task raises TransactionManagementError, and this is enforced.
• Subtasks inside a transaction are discouraged, since the connection is serial and parallel queries gain little. If you need them, use structured concurrency (TaskGroup or an awaited gather()) so they finish before the block exits. That rule is not enforced yet, and Gibson wants Django to catch late queries before 6.2.
• Caveats: each async transaction uses an extra connection for its …
Transkriptvom Podcast bereitgestellt · Zeitmarken springen hin
Calvin Hendryx-Parker Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds. This is episode 501, recorded October 20th, 2026. I'm Calvin Hendryx-Parker.
Michael Kennedy And I'm Michael Kennedy.
Calvin Hendryx-Parker Great to have you, Michael. This show is sponsored through by us, our continual support through our own work. Actually, check out Michael's great work over at the Talk Python community. He's got some great new courses up, some really cool stuff. Some people who've been collaborating on the various courses that are on Talk Python.
Calvin Hendryx-Parker And then if you want to support Six Feet Up, so I'm co-founder and Six Feet Up CTO, and we do really fun projects with people who've got hard problems and need cool things solved. So check out sixfeetup.com and then connect with us over on the socials. You can find Michael and myself over on the various regulars, Mastodon, Bluesky X, and LinkedIn.
Calvin Hendryx-Parker And then the show itself is on Mastodon Bluesky X. And then you can also join us for the live stream. So if you're here with us right now, you're on the live stream. We're at pythonbytes.fm/live. And then if you want the handcrafted, not handcrafted, but the bespoke show notes delivered to your inbox, the artisanal show notes delivered to your inbox, join our friends of the show list and we will never share your email.
Calvin Hendryx-Parker But if we wanted to take a pause, Michael,
Michael Kennedy what would that look like? Maybe a little nod, a little nod,
Calvin Hendryx-Parker A little nod, if you will.
Michael Kennedy Oh, yeah. A little nod. So let's talk about notebooks. Now, I don't know how you work. I could take a guess. But I don't know how if you've got a problem and you're like debugging it. And you're like, oh, I'm not really sure what I'm going to do here. There's different things. There's the time-tested print location 1.
Michael Kennedy Now I'm in location 1A. Now I'm location, you know, the bisection method of like you just start printing out stuff all around the area you're trying to understand. And, you know, there's a place for that. But maybe we got better tools. I don't know.
Calvin Hendryx-Parker I would hope so. I mean, I remember the day I discovered PDB and the magic.
Michael Kennedy Yeah, exactly. Set a breakpoint. Let's go in.
Calvin Hendryx-Parker Yeah.
Michael Kennedy Yeah. You could use, you know, VS Code, PyCharm, one of them, and run it in a debugger potentially. But there's this project called Nod, Notebooks on Demand. So if your style of exploration is notebooks already and you're writing some code and you're like, oh, this part is not working. I need to kind of debug it. I need to understand it. I need to play with it.
Michael Kennedy Then you can use this nod or notebook on demand, which is super cool by Eric Rahn. And the advantages that I see here are if I'm somehow able to explore my code with a notebook, it's not just a debugger will let you sort of see what's there, step forward, step backwards. but you can actually explore different ideas.
Michael Kennedy Like, well, what if I had a function that did this? Or what if I actually had a query that ran it differently? Let me write that and see what happens. So here's how this works. What you do is you import nodpy and you get the notebook. Then whenever you want to basically set a break point, you just say notebook.
Michael Kennedy I don't know, break. I might do import notebook as notebook break or something. But anyway, you just call notebook and that will pause your code And it fires up or attaches to a Jupyter notebook. So you've got to install a Jupyter extension that basically lets it listen for these incoming events. And when they do, it will break into a notebook instead of to a debugger.
Michael Kennedy And you're just in your function as a cell. You can run your function. You can explore it. There's the other functions that are nearby that you can play with. You can write other pieces, right? Like a new cell. You could write a new cell and then go play with that. What do you think?
Calvin Hendryx-Parker I love it. I think folks who are used to notebooks but are a little intimidated by, say, the debugger, this is way more of a natural feel. It's weird because notebooks break your mind a little bit because you can run the cells out of order. You can jump back up and go to a previous thing and play there and come back down and play here.
Calvin Hendryx-Parker And so you can kind of lose yourself a little bit. But this gives people that capability to express that creativity and debugging by using various cells to play.
Michael Kennedy It's interesting, like when you're the most stressed out and things are the most not working, being in a comfortable place makes a bigger difference than I think just looking at a calm time from the outside. Why is this not working? Like, oh, OK, but this thing, this thing, I'm really comfortable. Let's go.
Michael Kennedy And now I understand, right? Like a friend of mine had this saying about debugging and code, about basically code complexity in general. I'll share people like Jason said, debugging is always a little bit harder than writing code. you know because there's all the complexities of what's going on so if you write code that's at the limit of your capability of like understanding complexity or like the situation then you might not be able to debug it right it's like yeah you should always leave a little bit of a buffer in there of of that and i feel like this takes that down a notch right because it gives you a better understanding during that harder debugging time yeah well it was like the difference between
Calvin Hendryx-Parker going from PDB to, say, PyCharm for a debugger. I remember in PDB, traversing up the call stack and down into things just required you kind of holding a lot of that in your head. You didn't get a good visual model of it, where if you use PyCharm, you could just kind of click through the stack and you see the rest of the stack still sitting on the screen. There's the call stack right there.
Michael Kennedy Exactly. You can just see it.
Calvin Hendryx-Parker Yeah. And so this gives you that same comfort level and visual anchoring when debugging. So I love the fact that they have built this for the notebook natives
Michael Kennedy I agree. And I believe there's a couple other out there. But one of the things that's interesting about this one is the markdown cells become comments, cells become new lines, and the notebooks you can just throw away because they get saved into the source file if you want. So if you run it again, it kind of recreates the exploration that you set up.
Calvin Hendryx-Parker Oh, that's really nice. It can persist from run to run.
Michael Kennedy Yeah. So it's a pretty new project. Don't expect it to be super polished. But people well, check it out. I think it's certainly worth a try.
Calvin Hendryx-Parker Yeah, it looks really cool. We should definitely check that out.
Michael Kennedy Definitely. Over to you.
Calvin Hendryx-Parker All right. Well, are you ready for the new thing, the hot new release of Polars? Polars 2.0 has shipped. And streaming engine is on by default. There's a lot of new features. That was the reason for the major bump in version is because there's going to be some changes and some things you're going to need to do as you upgrade to your new version of Polars.
Calvin Hendryx-Parker But one other thing to mention here is really, really important is the performance. I know we've mentioned in previous episodes, we've talked about Polars performance versus things like DuckDB. And in the blog post of the release here by Richie, they've got some performance numbers here because SQL is a first class citizen now in the Polars environment.
Calvin Hendryx-Parker So if you are doing things like you would have done in DuckDB, for example, maybe you're more comfortable there because of the SQL environment, and you love the speed of DuckDB, look at these numbers. This is on some AWS instances here on a C7 4X large, 16 vCPUs and 32 giga RAM.
Michael Kennedy That is a large.
Calvin Hendryx-Parker That is a very large. They're running two different benchmarks here, the TPCH SF10 and the SF100. And you can see here, Polars completes it in 3.2 seconds compared to DuckDBDB, which is fast. I mean, we all know compared to what we read in our, went over in the last episode, DuckDB is at 4.44 seconds on that same benchmark.
Calvin Hendryx-Parker And then they basically did the DS version of that benchmark as well and saw that we've got Polars at 12.59 seconds where the current release of DuckDB is at 15.92. The alpha of DuckDB 2.0 still slower at 14.3. That's not saying don't use DuckDB but I'm just saying Polars is making a real run for performance here with some of the new enhancements.
Calvin Hendryx-Parker That streaming capability really minimizes memory usage. And when you do use heavy memory on these various pullers examples, you'll get the new, well, new, basically the out of core or spill to disk is on by default. So if you start hitting, for example, by default, it's set to 80% of your RAM usage, it will spill out to disk for these larger operations.
Calvin Hendryx-Parker And it supports joins and group buys are not supported yet. They're planned but not shipped, but it does support sort window functions and many expressions. So those things will actually continue running even if you would have gotten an out of memory or maybe the Ohm killer would have come and killed your process.
Calvin Hendryx-Parker You can actually make these bigger datasets work by leveraging that spill to disk feature of it.
Michael Kennedy What a neat idea because the examples you got on the screen do have a lot of memory, but at the same time, memory is expensive even before all this crazy stuff, right? Relative to how much you can have. Like memory on a server is more expensive than an NVMe disk that is not as fast, but still really fast.
Calvin Hendryx-Parker But still pretty darn fast. I mean, you're basically kind of going back a couple of years in memory technology, but you're gaining the ability to finish the work.
Michael Kennedy So I think that may be more important. Yeah, exactly. A little detail. Oh, all of a sudden I went from 16 gigs of RAM to 500 and I don't know, 30 or whatever, right?
Calvin Hendryx-Parker Yep. Yeah, so one of the things here, again, I mentioned the streaming engine is on by default, but that has a side effect. So one of the things you need to consider when you're upgrading your code from 1.0 or the one version to the two version is that order of operations or order of the data is not guaranteed in the streaming version unless you set maintaining order to true.
Calvin Hendryx-Parker So there's certain row level or row order default operations that might want that. Be sure you check out the upgrading guide before you switch up to 2.0. And then there's also the new map data type called map type. So it's now the arrow map type supported in the Polars map data type. So if you're in the arrows game, which is actually kind of cool because arrow gives you that in-memory transportable data type that you can move between various processes, Polars now supports the map type there, which is basically like a dictionary that's super powered in the Polars world.
Calvin Hendryx-Parker That's kind of the big, big news here. There's last words, I don't know, coming out in months, but I think the benchmarks are the thing speaks for itself on this release. It is incredibly fast performance. This is another thing I just I love about the Python community is people may claim Python slow and maybe should be using Go or Rust. I don't know. I think you can there's lots of great work going on to make sure that Python is still a first class citizen and maintains that performance that is needed to do great production work with these tools.
Michael Kennedy Yeah. If you've got a large scale application so frequently it's There's a little part of it that is performance critical and 90% of it that's not as well. And you can bring different tools to bear on that 10%. Yep.
Calvin Hendryx-Parker Yep. There's an upgrade guide. So if you go to the Polars documentation under the releases upgrade slash two. So make sure you check that out before performing any kind of an update or point your LLM agent at that upgrade guide and say, make it happen. You probably get better results by doing that.
Michael Kennedy Yes. A hundred percent you will.
Calvin Hendryx-Parker Yeah.
Michael Kennedy Yeah. I'm sure you will. So to your performance comment, I don't think that this had anything to do with free threaded Python or any concurrency on the consumer side.
Calvin Hendryx-Parker No, I don't think so. Nope, not yet.
Michael Kennedy But it certainly looks like Holders itself internally is using multiple threads. Otherwise, why would you get a much better result on the much larger server, right? Unless it's just pure memory. So you're still in a sense, this is like...
Calvin Hendryx-Parker Yeah, number cores wouldn't matter unless you're using that. Yeah, exactly. Exactly.
Michael Kennedy So it's like, hey, we don't have this great threading story, or do we? We don't have this great threading story on Python, but still, here's the part where you actually care.
Calvin Hendryx-Parker Yep.
Michael Kennedy You know, jamming on it anyway. All right. So pick the right libraries.
Calvin Hendryx-Parker And that'd be good. Speaking of performance, Michael, what have we cached more?
Michael Kennedy Would you say if you could cache a lot?
Calvin Hendryx-Parker I love that name of this project.
Michael Kennedy Django cache a lot. Yeah. A little bit of CERM makes a lot. A real throwback, right?
Calvin Hendryx-Parker I'm here for it all day long. I am.
Michael Kennedy So am I. Oh my gosh, what a music genre that was back in the day. That was fun. So this project, 1.4 thousand stars, called Django Cash-A-Lot. I think we've got to just throw it out there, the requisite joke. Three things, two, I already broke it. There's two things that are hard in computer science.
Calvin Hendryx-Parker Right.
Michael Kennedy Naming things, cache and validation and off by one errors, right?
Calvin Hendryx-Parker Yeah.
Michael Kennedy But the fact that cache and validation is like one of the first two before the joke even goes off the rails, is it's interesting because it absolutely is not easy. So there's different types of caching that you might want to do. One way to cache is just I'm going to put some kind of front end or pre-compute or something in front of a page.
Michael Kennedy So like on this page, it's got the issues, counts, it's got the number of watchers, the forks, all that kind of stuff. GitHub could just say, well, we're just going to pre-render all of that stuff. And when you ask, here are your bytes back, right? That's probably the most effective, but it also has a lot of challenges.
Michael Kennedy For example, what if a new issue comes up while I'm sitting on this page? Should that refresh? Maybe. What about my little picture up here? If you just straight up cache the whole thing, Calvin logs in. He doesn't want to see me, and I certainly don't want him accessing my stuff. You know what I mean?
Michael Kennedy So there's just a lot of issues with caching that much. So one way you can cache that's really interesting is just say, well, what if everything I asked for the database was already, the queries were ran, the results were given back, they were parsed, and they were turned into ORM objects, and then those things were held on to, right?
Michael Kennedy That could be a much better option where you say, give me the details of this page, that part is cached, give me the details of the user, that part is not cached, and then render it, right? So that's kind of where this thing lives. It basically caches your ORM queries, and then here's the joke part. Hopefully this part is not the joke, but there's a part that is challenging, the invalidation. So this automatically invalidates them, which I think is pretty interesting.
Michael Kennedy Notices when your tables change or something like that. And hey, this cache is now invalid.
Calvin Hendryx-Parker That's really, really nice.
Michael Kennedy Yeah.
Calvin Hendryx-Parker Because otherwise you're spending all the time and mechanics to figure that out.
Michael Kennedy Yeah. You know, sometimes you've got to subscribe to changes if your database server gives you those kinds of things. I don't know. It's pretty tricky.
Calvin Hendryx-Parker So the edge cases are here though there's probably still some not funness i believe it plugs into
Michael Kennedy the django um just caching built-in caching yeah stuff right for the orm because it points out hey if you have multiple servers doing the caching i know multiple web servers and i bet servers also would just mean web workers as in web garden anyway with a common cache server uh server make sure they have their clock synchronized because they're gonna have to use uh each other's numbers and so on.
Calvin Hendryx-Parker But that seems like a solved problem these days. If you don't have clock synchronization, you've got lots of other problems happening too.
Michael Kennedy Exactly. Exactly.
Calvin Hendryx-Parker SSL or TLS won't work.
Michael Kennedy Details.
Calvin Hendryx-Parker Details.
Michael Kennedy Also, if you run a script that somehow changes the database outside of that, so it needs to run manage.py. So I imagine that what's happening is there's a last modified on the cache server. And every time you run a query, it goes, when was this last modified? And if that changes, then it's just going to do a full query.
Michael Kennedy Otherwise, it'll just keep pulling. I'll bet you that that's it. Because otherwise, if you just use the ORM directly through this other script, it would have changed it. But you've got to run this manage pi command on it. That's what I'm guessing.
Calvin Hendryx-Parker You've got to be in the Django world, the Django machinery for it.
Michael Kennedy Exactly.
Calvin Hendryx-Parker I've had this problem before. If you run Redis caches in Redis command, like Redis through Django, like accessing it, not just as a cache, but using it directly. and you try and do something outside of that Redis, there's some subtleties there that you've got to be really, really careful of. So it sounds like this is similar.
Michael Kennedy Yeah, yeah. It's using Django ORM technology, not the database technology or the cache technology, right? Like I said, like subscribing to changes to a table or whatever. So one of the things that Warren's about is if you have a high rate of database modifications, then that'll keep invalidating your cache.
Michael Kennedy So maybe it won't help that much.
Calvin Hendryx-Parker The win, maybe a lose.
Michael Kennedy Exactly. You're just adding complexity, but maybe every read effectively is going to just run anyway. So there's a couple of limits. People can check them out, different setups and so on. But I think it's a cool project. So yeah.
Calvin Hendryx-Parker If you're looking to kind of gain a performance gain real quick there, that's an easy one to try and see if it fits your use case.
Michael Kennedy Caching is such a bit of magic tixie dust that you can sprinkle on. But the challenge is it's the complexity and the invalidation. Yeah.
Calvin Hendryx-Parker Yeah, because you don't want to serve the stale data like you mentioned at the beginning. Yeah. That's interesting. Performance is tricky. Cash it. Yeah. Yeah, performance is tricky. And speaking of performance, some people may think asynchronous is the answer to all things in performance. But Carlton Gibson actually had a good bit of work done at the Django on the Med sprint.
Calvin Hendryx-Parker So if you're not familiar with code sprints, people get together from time to time and will work on the open source projects. And one of the outcomes from the latest sprint was a lot of work toward making async with transaction atomic come to Django, hopefully in 6.2, which would be pretty incredible because that's the next release of Django.
Calvin Hendryx-Parker And this is one of the pieces that's been missing for a while in the Django ecosystem is the ability to use the ORM in an asynchronous fashion. Because currently ORM, you have to still wrap it with async to async version of that. And so he's got some example code here showing basically what this is all about.
Calvin Hendryx-Parker But this is also a very, very tricky problem. Asynchronous operations and concurrency, where multiple things can happen in any order, don't combine well typically with database transactions, which are necessarily well ordered, as he mentions here in the blog post. There's a PR open as of, I think, yesterday and today with no approvals and no milestones yet.
Calvin Hendryx-Parker So if you're excited about transactions and the Django ecosystem and ORMs, you may want to go check out the current work that Carlton did based on this sprint. He made quite a bit of forward progress. And again, I think that this is not an easy problem or else it would have been solved long ago. We've had asynchronous views in Django now for years and years.
Calvin Hendryx-Parker And I think that, like I mentioned here, Django has required using the ORM's sync API for transactions specifically. If you aren't using a transaction, if you didn't wrap it in a begin and a commit, which is what you kind of put a wrap a transaction into because you're running multiple SQL commands at one time or multiple ORM operations at one time, you have to use this sync to async wrapper to make that all go correctly.
Calvin Hendryx-Parker But now if we get this async with transaction atomic, Django, it could actually make this work. I just think that he puts a little ad in here for the Django on the Med sprint, which I highly recommend people going to sprints. It's a really great way to get involved in the community. But if you wanna be able to use this version of the code, There's again a PR.
Calvin Hendryx-Parker You can check out the thread. You can see how it works for your specific workloads. I think a lot of this is going to be workload specific and you're heading into kind of extreme performance area here when you're talking about asynchronous operations on transactions. This could be a big win for your specific workloads.
Calvin Hendryx-Parker It could also be a big headache if it doesn't operate as expected or you're not paying close enough attention to the order of operations for some of these things, which it goes over with in the post. It's a really good post. They had a fun time there on the Mediterranean. Not terrible going for bicycle rides along the sea.
Michael Kennedy That looks all right.
Calvin Hendryx-Parker They got quite a bit of work done. He actually had, it looks like he collaborated with Caleb Haddington, who wrote a book on that. So you actually click over here, the Using Async in Python. So someone who knew quite a bit about the async story in Python. And so they spent literally three days working through this and ended up with a pull request against the ASGIE ref and on the Django bits to make this all go.
Calvin Hendryx-Parker That's pretty optimistic. It seems like the right brains got together at the right time, which is again the reason why we do things like sprints where people get together in person in the same place, and usually they're in pretty nice places, to work on awesome code like this. So you can see here, again, pretty extensive, a couple poll requests for people to go review, and lots of thanks, and lots of great things happened at Django on the Met.
Calvin Hendryx-Parker So I don't know, how do you feel about asynchronous transactions to a database?
Michael Kennedy I feel okay with it, I think. I think I feel okay with it. I had Calvin, I had Carlton, sorry, Carlton. I had Carlton on.
Calvin Hendryx-Parker He and I look the same.
Michael Kennedy Yeah, I know. Well, it's the C. So I had him on to talk about updates to Django's async story. And it sounds like Django's async story is really strong these days. It's just down to a couple of little hard problems to solve, like transactions. I'm a big fan of async. I think it unlocks a bunch of different deployment stories and operational stories that are really powerful.
Michael Kennedy It doesn't always solve a ton of problems, but it can. Yeah,
Calvin Hendryx-Parker well, I feel like this keeps Django more than relevant in today's day and age of things like FastAPI and everyone basically touting full asynchronous stories. Django is still a very, very valid option when it comes to a web framework. And Frank Wiles and I did a presentation at this year's DjangoCon comparing FastAPI with Django and Ninja, which Ninja is an API layer on top of Django that does async really, really well.
Calvin Hendryx-Parker and the performance is obviously FastAPI still faster, but the performance is really, really good for Django if you're using things like Ninja because it leverages this asynchronous capabilities that folks like Carlton have worked really, really hard to make sure that Django has a good story for.
Michael Kennedy Yeah. You were talking about Django Ninja, right?
Calvin Hendryx-Parker Yeah, yeah, Django Ninja.
Michael Kennedy Yeah, which is super neat. Yeah, the analogous to FastAPI. So I think it's really powerful. One thing I would throw out there though, this is not even necessarily related to async, but it could be in the mix here. So if you're worried about transactions and performance, and this is a big caveat, but if it's true, and you're using ORMs, you could use a design pattern called optimistic concurrency, which itself is already a pretty interesting thing.
Michael Kennedy Like ORMs don't necessarily always work that well with transactions.
Calvin Hendryx-Parker Right.
Michael Kennedy Because I'm going to do a query, I'm going to get a user object. I'll return that user object to some other part of the code. If it makes a change to it, it needs to save it. Like you don't want to let the entire request run within a single transaction, right? These need to be like, I'm doing the data stuff and then I'm done.
Michael Kennedy But if you say like, well, we're going to enforce concurrency by just like the beginning of a web request and the end of the web request becomes a transaction. You're just saying I'm having a single threaded process end to end, which is not great. So optimistic concurrency puts a last modified hash on the result.
Michael Kennedy And when you try to save it, it's going to say update the username to name where the modified hash is equal to the one that I have. And if that changes, like, oh, it was changed behind you, you know, you could catch that, requery it, make the, you know what I mean? Like that can get you some better concurrency and some better safety if you're using an ORM, right?
Michael Kennedy Like that's a pretty big story. But I don't know. There's a lot going on here. I don't know how I feel about ASync transactions because I try to avoid using too many transactions already. Usually you don't.
Calvin Hendryx-Parker But, you know, if you're running a bank, you want them. Right. things can get out of order and, and then you could end up with a strange right history based on performance. If some slow query opens the first transaction and there's a fast one that comes behind it, making a right, you've got to make sure you handle that.
Calvin Hendryx-Parker So it looks like we're working on it.
Michael Kennedy Yeah. Yeah. And you got to start talking like transaction, uh, concurrency levels within trans, like read committed, read uncommitted, all the different things you can set on a database. It gets, all right. I always, that part's still hard.
Calvin Hendryx-Parker That part's still hard.
Michael Kennedy I can't do it. We just got to talk. Let's just talk about something. Let's go talk about our extras.
Calvin Hendryx-Parker How about some extras, Michael? What do you got?
Michael Kennedy Well, let's see here. I already got them all queued up. So first extra, this comes to us from Christian Klaus, as you can see here, right now here, at Mike C. Kennedy, FYI update on Calvin's first topic, free threaded wheels for polars.
Calvin Hendryx-Parker Oh, wow. Very quick.
Michael Kennedy So we've already got, well, there's a very interesting story and people out there may know a little better than I do. So I only have like very sparse GitHub comments to go on. So please give me some leeway to get it right here. So this is an open issue to add free-threaded wheels, like add the A-B-I-T wheels to PyPI.
Michael Kennedy So it says currently Polars builds on the free-threaded Python build. So you can use it, but there's no binary wheels. It's going to be like a slow install build or rust and so on. But to be clear, you can use Polars 2 on free-threaded Python. Just the installing of it is a bit tricky. So this issue is like, can we make that better?
Michael Kennedy It's open. That's the part that's interesting, that it's not closed. But if you go down here somewhere, if I look for PyPI, it says, however, before we can do it, we still have to wait on getting more space from PyPI because PyPI has said that you're using too much space and we're not going to allow you to upload anything anymore.
Calvin Hendryx-Parker That's a new one.
Michael Kennedy So you can see the request here. If you jump over to it and you wait for GitHub, because GitHub has become slow the last few years, not on a red sentence fault. But over on PyPI, it says, project limit request, pullers runtime compatibility, 50 gigabytes, please. And it's asking for, this is by Richie Vink, the creator, as you mentioned before.
Michael Kennedy And it said, help, we can't upload anymore. So this is an interesting problem because...
Calvin Hendryx-Parker Yeah, obviously they're trying to avoid abuse of PyPI.
Michael Kennedy Right. And just trying to pay for it. You know, they're asking for 50 gigs. That's a lot of space. At the same time, if you have a popular project that has a big binary built component like the rest part of this, and you want to support all the different things, right? I want to support free threaded wheels on ARM, you know, like all the different things that you might build for that starts to explode out into a bunch of combinatorial options that take a lot of space.
Michael Kennedy right so i'm sympathetic to it somebody it's just i don't know i can't remember where it was um so it's like do do we really need pi pi yes you really need it to be or do do we really no do we really need old releases on pi pi i'm like yes yes yes you do please anyway thank you christian klaus for sending this in this is um it's about polars it ties into your items but it's also just
Calvin Hendryx-Parker an interesting difficulty of the day you know there's still things going on behind the scenes
Michael Kennedy absolutely okay two more things i want to cover real quick let's do this one next so i've i started working on these write-ups that are basically telling like guides visual guides to talk python episodes that tell this the technical story of what the episode was about so for example we've got let's see the probably the funnest one is this eve because it's a game so it's got maybe 10 to 15 graphics.
Michael Kennedy Got a nice little reader view. You can do like full screen or you can,
Calvin Hendryx-Parker you know,
Michael Kennedy a little, it's like a little Instapaper-ish because it's, it's a decent amount of reading. So it goes through and it says, you know, okay, what is this? It talks about like the problem with nice pictures, tells the story of, of what all the, what's going on. And just, it has this like visual storytelling component of each, um, of each episode.
Michael Kennedy And so I've been working on this. I don't have that many out. I think I've got six out, but I just, I was fascinated with like, could I make a visual storytelling thing? That's just not, it's not just narration, right? It's, it's, let's look at the different things discussed in the episode and kind of make a technical article out of them.
Calvin Hendryx-Parker Yeah. Well, and people learn differently. Some people want to hear the podcast. Some people want to read the blog posts and some people would love this visual representation, which is, I like how it themed or how you theme the graphics, you know, in line with Eve, you know, as opposed to. Yeah.
Michael Kennedy Thanks. There's a bunch of really cool graphics in here.
Calvin Hendryx-Parker It's very sci-fi looking.
Michael Kennedy Yeah. And each one's a little bit of a different theme. I'll go to the one that we just did together, the state of the art in Python. And it's got some really interesting pictures. Check it out. If you just go to Talk Python, hover over episodes, it drops into the visual guides and you can go and see all of them.
Michael Kennedy Like I said, there's a handful of them.
Calvin Hendryx-Parker It's not just a podcast anymore.
Michael Kennedy No, it's so much more.
Calvin Hendryx-Parker So much more. And you've got so much more.
Michael Kennedy Then, remember how I lamented? And I wish I knew this. Two people sent this in. Nick Moua. Hey, Nick. And Raphael Bosen and said, Michael, you kind of went off on PEP 824 about like, why is it just so focused? Couldn't it have this other thing that you wanted? And you're like, no, I don't really want it.
Michael Kennedy What are you talking about? You're insane. Well, if I had just gone back at one in PEP numbers, 8pep823 is in fact that null coalescing operator that I was looking for right like a.b question mark dot c d is the complicated sort of deal here that if I'm trying to access something in a chain like x.y.z.whatever if any of those is none I need to just stop and say it's none or stop and raise an exception like that that that is not none type has no attribute whatever this is what that's about. So that's pretty interesting.
Michael Kennedy And I think I'm here for it.
Calvin Hendryx-Parker Nice.
Michael Kennedy Yeah. Last thing. And this
Calvin Hendryx-Parker one is, it's a big one. This is really fun.
Michael Kennedy This is really, yeah, this is a big one. So I'm launching Talk Python membership, and I'm hoping that we can create a really nice community over there that has a couple of aspects. So I've been thinking for a long time, like, couldn't I offer something like a little bit more for people, listeners of the podcast and this podcast too, that's one thing I could offer that seems super obvious, like, hey, you get ad free episodes, or you get episodes ahead of time.
Michael Kennedy It's like, well, you know, that's great, but that's not that great of it. Like that's not a huge benefit. So sure, Talk Python membership does come with ads, but I wanted to see what else I could offer. So it comes with a nice Discord community. A bunch of the Talk Python guests are already in the community.
Michael Kennedy So you can come hang out with many of the people that you've heard on the show.
Calvin Hendryx-Parker Yeah.
Michael Kennedy Calvin, for example.
Calvin Hendryx-Parker It's been one of the reasons I've now keeping Discord open more regularly. That's awesome. There's enough gravitational pull because of the work you're doing there I've keep it open now.
Michael Kennedy Thank you. That's awesome. Yeah, I do too. And it's really, really, it's a neat area to be in. And if you're not a gamer, just Discord is easier. It's easier than Slack.
Calvin Hendryx-Parker It's not just for gamers. It's actually just an easier Slack. I agree.
Michael Kennedy And one of the main things I wanted to focus on is live events. So it comes with a meetup. If you would like to go to a Python meetup or a regional conference or something like that, but your area doesn't have one, you can't make it, or you just want to go to more, You could go and I'm running a monthly tech session where it's like a conference style presentation, but then sort of a mix and mingle, just hang out on Discord video channels with whoever gave the presentation and everyone else, me included.
Michael Kennedy So all those things. And I'm also going to add a preview, like a summary type of thing to the episode. So a separate sidecar podcast feed. Like here's an hour and 20 minute podcast episode, but here's a four minute. What's it about? kind of the cliff notes. And if you find that interesting, then you can go listen to the full one, right?
Michael Kennedy Kind of let you, you know, protect your time a little bit, but keep up on the ones that, I don't know, you don't have the time to listen.
Calvin Hendryx-Parker I love it. I'm here for it. I'm all about community. And so this is a great, great move. I'm glad you're doing this.
Michael Kennedy Thanks. Thank you so much. So folks, support all the work. Talkpython.fm. Click on membership right at the top. Check it out. Be part of it. Hope you're there.
Calvin Hendryx-Parker Cool. Well, thank you for all that. That's an amazing extra to end on there for you. I've got a couple extras that we want is the fact that Jazz Band is shutting down. That was announced back in March, but there was a renewed discussion a week ago here on Reddit. And one of the things that came out of that is, by the way, there's Django Commons for things like what Jazz Band used to do.
Calvin Hendryx-Parker So if you wanted to come out and have a place where you can find kind of more of the Commons supported projects for Django, make sure you check out django-commons.org. You can join the Commons, you can see the projects, you can see here, you know, pretty heavy hitter projects, Django Valkey, so support for Valkey, things like Tailwind CLI, DRF stuff.
Calvin Hendryx-Parker One of my favorites, Django FSM 2 is now part of the Commons projects. So tons more that are joining in there, all one home, which means they have a nice, safe place to live. So check out the Django Commons. The other thing, this is not necessarily Python related, but boy, is it an awesome, fun little tool I found.
Calvin Hendryx-Parker Since I'm doing more and more of my agentic work on remote machines and a lot of the output maybe markdown files, I would love to have a very rich way to view markdown in the terminal. So I went and searched for a TUI slash CLI markdown navigator and I found TreeMD. I believe it is in Rust. Rust? Yeah, 99.2% Rust.
Calvin Hendryx-Parker But it is a really nice markdown viewer, which gives you obviously mouse usage. A lot of the TUI apps, the big benefit is you can use the mouse in your terminal. It gives you an outline. It gives you obviously a rich rendering. If your terminal supports images, it will see inline images inside the markdown files.
Calvin Hendryx-Parker Wow. Yeah,
Michael Kennedy that's cool.
Calvin Hendryx-Parker See by their screenshot doesn't show that off because that's actually a really fancy feature of this. You can jump in the outline. I'll make that bigger maybe. Yeah, there you go. You can jump in the outline to various sections. You can also pre-filter a markdown file from the command line to say, show me all the Rust snippets or Python code snippets in there.
Calvin Hendryx-Parker And then it'll basically filter the document down to just those snippets and give you a navigator of the various snippets. Cause you're like, I'm looking for a code sample in this markdown. Just show me only those pieces. And you can do that with a tree MD. So I know again, it's not a, not a Python tool, but boy, is it a part of my new productivity toolkit of great things that I have installed to basically remote work remotely with my agents and the outputs that are coming from them.
Calvin Hendryx-Parker So another cool thing that I'll mention, remote documents. You can type treeMD and like a GitHub repo reference to owner slash repo, and it will get to open the readme immediately. Or you can just put in any URL to a raw markdown file on the web, and it's now open in your local viewer in your command line.
Calvin Hendryx-Parker So you can be remote. You know, I've been doubling down on my usage of herdr and my framework desktop that's over here so that I can run my Pi sessions on my CloudCo sessions. And now I can view all my markdown files.
Michael Kennedy so that was a cool one i think it's a great a great find it looks really nice so two things first one thing i've learned there are so many projects by running this show there are so many projects out there that are a UI focused sort of thing and they sometimes don't even have one screenshot what are you doing you're literally the thing you're about this you are about pictures why do you have no picture right there's only words here and it's got themes too oh yeah i love it like nine different
Calvin Hendryx-Parker themes. Yeah.
Michael Kennedy And the other, I think, is our mission is to bring tools to Python developers, not necessarily. I don't think they don't have to be Python tools. It doesn't have to be written in, compiled in or whatever, Python, in order for it to be something awesome that we can use. So I think it's great.
Calvin Hendryx-Parker Cool. All right, Michael.
Michael Kennedy Would you say that it looks good for you? It does look good. Oh, no, it started playing. All right, so the joke this week comes to us from this guy named Calvin sent this in to me. No, Calvin shared this with me earlier, and it's, boy, this thing captures the zeitgeist so well, doesn't it? It's called Looks Good to Me, LGTM, Claude Opus 5.5.
Michael Kennedy It starts on a Friday. It's this kinetic typography, a lot of moving words sort of interesting. Really well done, I think, on the graphics. And it talks about basically the story of the manager who gets super psyched about AI and just makes everyone use it.
Calvin Hendryx-Parker Yeah. So go give it a listen. It's a fun little music video. I believe it was generated by AI itself, too, which is kind of fun.
Michael Kennedy Oh, it's got to be. It's got to be. Very meta. You've got to be careful because once you go down this path, I believe it will send you down a path of other Opus 5 videos. I'll set the stage. So there's a Slack. I mean, it's not actually Slack, but you know it's Slack. and Brad, VP of Velocity, Vice President of Velocity.
Michael Kennedy Hey team, quick one. Before the weekend, leadership is super excited about AI. Off it goes. It's like, ooh. Give it a listen. You'll definitely laugh. It's very fun.
Calvin Hendryx-Parker You'll get a giggle.
Michael Kennedy Yeah, you will. You know what? I think this is a perfect bookend as well, Calvin. We started with Sir Mix-a-Lot and we end with LGTM. Let's go.
Calvin Hendryx-Parker Looks good to me. All right, Michael. This episode looks good to me. Let's give it a wrap.
Michael Kennedy Let's give it a wrap. Oh, my gosh. All right. Bye, all.
Calvin Hendryx-Parker See y'all later.