<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>Blog on BlueberryPy</title><description>Recent content in Blog on BlueberryPy</description><link>https://blueberrypy.netlify.app/tags/blog/</link><language>en-us</language><item><title>This Blog Moved to Astro</title><link>https://blueberrypy.netlify.app/post/blog-migrated-to-astro/</link><guid isPermaLink="true">https://blueberrypy.netlify.app/post/blog-migrated-to-astro/</guid><description>&lt;p&gt;This blog is written in Markdown. I write a post, the site turns it into HTML, and I publish it to several hosting platforms. That simple workflow is exactly what I want to keep.&lt;/p&gt;
&lt;p&gt;The part that has become less simple is everything around the writing.&lt;/p&gt;
&lt;h2 id=&quot;when-a-theme-becomes-part-of-the-system&quot;&gt;When a theme becomes part of the system&lt;/h2&gt;
&lt;p&gt;The site uses &lt;a href=&quot;https://gohugo.io/&quot;&gt;Hugo&lt;/a&gt; with a third-party theme. It has served the blog well, but the theme has also become more than a visual layer. Some of the site’s configuration is specific to that theme: settings for the sidebar, article table of contents, tag cloud, categories, footer, and social metadata all use the theme’s own structure.&lt;/p&gt;
&lt;p&gt;That creates a kind of lock-in. Changing themes is not just changing colors and layouts; it can mean translating configuration and behavior by hand. If I want more freedom to shape the site, I would rather have the templates and styles live in this repository, where I can change them directly.&lt;/p&gt;
&lt;h2 id=&quot;a-build-script-that-knows-too-much&quot;&gt;A build script that knows too much&lt;/h2&gt;
&lt;p&gt;The blog is published in several places: GitHub Pages, Netlify, Render, Vercel, and Cloudflare. They all serve the same content, but the build setup has needed more work than I would like.&lt;/p&gt;
&lt;p&gt;For example, the current build script installs specific versions of Go, Hugo, Dart Sass, and Node.js before it can build the site. That may be useful when a host does not already have the right tools, but it also means the script has to manage a small toolchain of its own. Platform configuration then has to call that script in slightly different ways.&lt;/p&gt;
&lt;p&gt;My ideal is less elaborate: one normal build command that produces a folder of static files, with each host publishing that output. The blog should not need a bespoke installer just to render Markdown into HTML.&lt;/p&gt;
&lt;h2 id=&quot;keeping-versions-in-step&quot;&gt;Keeping versions in step&lt;/h2&gt;
&lt;p&gt;There is also the relationship between Hugo and its theme. Hugo changes over time, and the theme changes over time. Even when each project works well on its own, I still have to make sure their versions and assumptions continue to work together.&lt;/p&gt;
&lt;p&gt;I would like the site’s core presentation to be code I own, instead of depending on a theme’s release schedule and configuration model. That does not mean rebuilding every feature from scratch for its own sake. It means choosing the behaviors the blog actually uses and implementing them as ordinary templates and components that are easy to understand and adjust.&lt;/p&gt;
&lt;h2 id=&quot;the-direction-astro-with-the-markdown-staying&quot;&gt;The direction: Astro, with the Markdown staying&lt;/h2&gt;
&lt;p&gt;After comparing a few options, Astro looks like a good fit. It is open source, designed for content-focused sites, and supports Markdown content collections. Its components let me build the pages and reusable parts of the site directly, with regular CSS for the design. The default output is static HTML; browser-side JavaScript can stay out of the way unless a feature actually needs it.&lt;/p&gt;
&lt;p&gt;I also want to use pnpm for dependency management. The goal is a conventional workflow: install from the lockfile, run the local development server, and build the site into a &lt;code&gt;dist&lt;/code&gt; directory. Astro’s deployment guides cover the platforms I use, and its static output is not tied to any one host.&lt;/p&gt;
&lt;p&gt;There are still a few hosting details to account for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;GitHub Pages&lt;/strong&gt; will keep its existing project-site address, &lt;code&gt;https://blueberry-py.github.io/blog/&lt;/code&gt;. Since the site lives below &lt;code&gt;/blog/&lt;/code&gt; rather than at the domain root, that deployment needs the matching base path.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Netlify, Render, and Vercel&lt;/strong&gt; can publish the static build from &lt;code&gt;dist&lt;/code&gt; at the root of their respective sites.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cloudflare&lt;/strong&gt; now recommends Workers for new projects. For this static blog, Workers can serve Astro’s generated assets; Wrangler supplies the Cloudflare-specific deployment configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So the content and design can stay shared, even though the deployment instructions are not identical on every platform. That is the tradeoff I want: portable static output, with only the small amount of host-specific configuration that is actually needed.&lt;/p&gt;
&lt;h2 id=&quot;the-markdown-can-stay-but-its-metadata-needs-a-plan&quot;&gt;The Markdown can stay, but its metadata needs a plan&lt;/h2&gt;
&lt;p&gt;The article bodies are already Markdown, and I want to keep writing them that way. One migration detail is that the posts use Hugo’s TOML front matter, marked by &lt;code&gt;+++&lt;/code&gt; at the top and bottom of the metadata block. Astro commonly uses YAML front matter, so the metadata needs to be converted carefully while preserving each post’s title, date, slug, tags, categories, and other fields.&lt;/p&gt;
&lt;p&gt;Some posts also keep images beside their Markdown files. Those image bundles should move with the posts and continue to render from relative links. Preserving the current &lt;code&gt;/post/{slug}/&lt;/code&gt; addresses matters too; a change of generator should not break old links.&lt;/p&gt;
&lt;p&gt;The other work is recreating the blog features I rely on: the table of contents, archives, tags and categories, series, RSS, sitemap, and search and social metadata. This is where owning the templates should pay off: the behavior can be designed around the blog instead of being expressed through another theme’s settings.&lt;/p&gt;
&lt;p&gt;That was the plan, written before any of it was built. The migration is finished: it landed on &lt;code&gt;main&lt;/code&gt; the day after I wrote that, and the writing has not changed at all. What turned out to be interesting is not the part the plan got right. It is everything the plan did not cover — the details that only appear once a corpus of thirty-seven articles is handed to a generator that has never seen it.&lt;/p&gt;
&lt;h2 id=&quot;the-metadata-was-both-the-easy-part-and-the-hard-part&quot;&gt;The metadata was both the easy part and the hard part&lt;/h2&gt;
&lt;p&gt;The plan named one detail of the front matter, the &lt;code&gt;+++&lt;/code&gt; fences. The fences had a story, and line endings came with them.&lt;/p&gt;
&lt;p&gt;Every file of the corpus uses CRLF line endings. The first version of the converter matched the fence exactly, so the front matter of every single article parsed as &lt;em&gt;empty&lt;/em&gt;: the inventory recorded &lt;code&gt;/post/my-first-post/&lt;/code&gt; instead of the real Hugo route &lt;code&gt;/post/my-first-hugo-blog/&lt;/code&gt;, and dropped every cover image the front matter named. Nothing failed. The numbers were simply wrong, and I only caught it by cross-checking the route list against the output the old build still had lying around.&lt;/p&gt;
&lt;p&gt;Line endings came back a second time. The migration recorded a hash of each article body so that nothing could silently rewrite an article, and then Git came into play: it stores the blob with LF and checks it out with CRLF on Windows. Those hashes described &lt;em&gt;my machine&lt;/em&gt;, so the same check on Linux CI reported thirty-seven articles as changed. The hash now normalizes the line endings first, and &lt;code&gt;.gitattributes&lt;/code&gt; pins what the repository writes, which is something the Hugo site had never needed.&lt;/p&gt;
&lt;p&gt;The other surprises were all the same shape: Astro is stricter where Hugo was forgiving, and forgiving where I needed strict.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A collection declared with a plain object schema silently drops every field it does not name, because Astro replaces the front matter with what the schema parsed. The schema of this site is loose on purpose: &lt;code&gt;series&lt;/code&gt;, &lt;code&gt;keywords&lt;/code&gt; and &lt;code&gt;externalLink&lt;/code&gt; are declared, and any field a future article adds survives the build instead of disappearing from it without a trace.&lt;/li&gt;
&lt;li&gt;Two entries with the same slug would serve the same URL and one would win. Astro only warns about that; &lt;code&gt;prerenderConflictBehavior: &apos;error&apos;&lt;/code&gt; turns it into a build failure, which is what a blog with thirty-seven posts wants.&lt;/li&gt;
&lt;li&gt;Astro caches the parsed collection. After I changed the schema, the cached entry kept the old value, the front-matter image stayed the plain string &lt;code&gt;title.jpg&lt;/code&gt;, and the build failed with an error that named the image rather than the cache. Deleting the data store was the fix, and it will be the fix the next time, too.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;every-old-url-is-a-promise&quot;&gt;Every old URL is a promise&lt;/h2&gt;
&lt;p&gt;I said in the plan that a change of generator should not break old links. I did not say what that costs. It costs eighty-three redirects, seven feed templates and one small integration.&lt;/p&gt;
&lt;p&gt;Hugo paginated everything: ten articles per page, so &lt;code&gt;/tags/python/page/3/&lt;/code&gt; was a real URL a reader could have bookmarked or a search engine could have indexed. The new site serves every list in full, which is the behavior I actually want, so the old routes have to answer with a page that sends the reader to the route that holds the same articles now. &lt;code&gt;/post/&lt;/code&gt; leads to &lt;code&gt;/archives/&lt;/code&gt;, &lt;code&gt;/page/2/&lt;/code&gt; leads to the home page. Most of the eighty-three are pagination of that kind, and they are written down in one JSON file that the build reads and the tests verify.&lt;/p&gt;
&lt;p&gt;Feeds were the same problem with more stakes, because a feed URL is a subscription a reader set up once. The old site served fifty-nine feeds: a feed of the articles of the site at three different URLs, a feed of the articles of every tag, a feed of the articles of every category, and a feed of the terms of each taxonomy. They are recorded as seven templates, two of which name a &lt;code&gt;&amp;lt;term&amp;gt;&lt;/code&gt;, because the terms of the site are whatever its articles name — a new tag produces its own feed with no edit to the file. The old site served the main feed at &lt;code&gt;/index.xml&lt;/code&gt;, so that URL still answers with the feed, next to the &lt;code&gt;/rss.xml&lt;/code&gt; the new header advertises.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;/sitemap.xml&lt;/code&gt; taught me something about static builds. Astro’s &lt;code&gt;redirects&lt;/code&gt; in a static build with directory output writes a &lt;em&gt;directory&lt;/em&gt; named &lt;code&gt;sitemap.xml&lt;/code&gt;, holding an &lt;code&gt;index.html&lt;/code&gt;, so the URL that used to be a file answers with a 404. A ten-line integration copies the sitemap the index names to &lt;code&gt;dist/sitemap.xml&lt;/code&gt; after the build, which keeps the list of routes in one place instead of a second generated file.&lt;/p&gt;
&lt;p&gt;One check produced a false positive I like, because it is a bug only a corpus can produce. The build audit looks for links that carry the base path twice, which is the signature of a build with the wrong base path. The site has a tag named &lt;code&gt;blog&lt;/code&gt;, so &lt;code&gt;/blog/tags/blog/&lt;/code&gt; — a perfectly correct link on the GitHub Pages deployment under &lt;code&gt;/blog/&lt;/code&gt; — was reported as broken. The rule now compares the path that is left after the base path is removed.&lt;/p&gt;
&lt;h2 id=&quot;the-theme-was-doing-more-work-than-i-thought&quot;&gt;The theme was doing more work than I thought&lt;/h2&gt;
&lt;p&gt;Owning the templates was supposed to free me from a theme’s opinions. It also removed the features I had stopped noticing the theme provided.&lt;/p&gt;
&lt;p&gt;The clearest one was related content. The old site ended every article with five articles about the same subjects, chosen by Hugo’s related index: a shared keyword worth 100, a shared tag worth 80, a threshold of 80, and no articles newer than the one you are reading. I did not know any of that until I had to reproduce it, so &lt;code&gt;src/lib/related.ts&lt;/code&gt; carries those numbers and their comments. Worse still, the first version of the new site did not show related content &lt;em&gt;at all&lt;/em&gt;, and nothing failed, because a block that is missing is very quiet. It survived until the final review.&lt;/p&gt;
&lt;p&gt;Taxonomy names were another archeology dig. Hugo titled a term with the spelling its articles used, and fell back to the lower-case spelling when the articles used both. So the tag page for &lt;code&gt;ai&lt;/code&gt; is titled “Ai” while the category page for &lt;code&gt;ai&lt;/code&gt; is titled “AI”, &lt;code&gt;gpt&lt;/code&gt; stays “GPT” and &lt;code&gt;llm&lt;/code&gt; becomes “Llm”. That is not a rule I would have invented; it is a rule I had to reverse-engineer so that fifty-four page titles matched. Reproducing it takes a seven-line function and a comment that explains why the function exists.&lt;/p&gt;
&lt;p&gt;Two small ones are worth naming because they are the kind of defect a reader feels without being able to report. Two Mojo articles share one timestamp, so without a tie-break the archive, the feed and the tag page can disagree about which comes first; they are ordered by date and then by slug. And Hugo printed its dates with the abbreviation of the zone, &lt;code&gt;CST&lt;/code&gt;, where &lt;code&gt;Intl&lt;/code&gt; only knows the offset, &lt;code&gt;GMT+8&lt;/code&gt;. The date helper started out writing a month &lt;em&gt;name&lt;/em&gt; into the &lt;code&gt;datetime&lt;/code&gt; attribute, where the attribute requires a number.&lt;/p&gt;
&lt;h2 id=&quot;the-checks-are-what-finished-the-migration&quot;&gt;The checks are what finished the migration&lt;/h2&gt;
&lt;p&gt;The plan did not mention testing at all, and it turned out to be most of the work. The migration was executed against a baseline: an inventory of every article with its route, title, date, images and a hash of its body, and a verifier that compares the built site against it. Content could not move unless the change was deliberate, and that is what made it possible to refactor aggressively for two days without checking every page by hand.&lt;/p&gt;
&lt;p&gt;A frozen snapshot has an expiry date, though. It described thirty-seven articles as they stood on one Monday. Once the migration was over, an article in progress or a draft would fail the gate, and a gate that fails for the wrong reason is a gate people route around. So the verification layer was retired after the migration landed: the tests now compute the inventory from &lt;code&gt;content/**&lt;/code&gt; at run time, ignore drafts, and still read the built output. The route of every article, every image, every link, every feed and every old URL is checked against the actual &lt;code&gt;dist&lt;/code&gt;, in 120 tests that run in under a minute. &lt;code&gt;astro build&lt;/code&gt; produced 96 pages in four seconds. That ratio is the migration in one sentence: rendering Markdown was never the work.&lt;/p&gt;
&lt;p&gt;Concurrency got one flag. Two test files build the site into the same &lt;code&gt;dist&lt;/code&gt;, and two builds at the same time raced over the prerendered assets, so the suite failed at random about once in every two runs. &lt;code&gt;--test-concurrency=1&lt;/code&gt; is the honest fix for a suite that builds the thing it tests.&lt;/p&gt;
&lt;h2 id=&quot;the-tools-came-back-without-the-toolchain&quot;&gt;The tools came back, without the toolchain&lt;/h2&gt;
&lt;p&gt;The build script that installed Go, Hugo, Dart Sass and Node.js is gone, which was the point. What replaced it is a set of checks that cost more attention than expected.&lt;/p&gt;
&lt;p&gt;Prettier, ESLint and markdownlint-cli2 now cover the JavaScript, the Astro and the Markdown sources. For the articles I wanted two guarantees and I had to be precise about them: the prose is never re-wrapped, and the code examples are never reformatted. What I had not thought through is that the &lt;em&gt;markup&lt;/em&gt; would change. When the tools were first run, Prettier aligned tables, rewrote block quotes and horizontal rules in its own marks, and spaced lists away from the text above them, in ten of the thirty-seven articles. The words are untouched, and Git diff shows the markup. I would rather know this happened than pretend a formatter is a no-op.&lt;/p&gt;
&lt;p&gt;The Markdown linter needed eight exceptions, each with the reason written next to it, because the articles as written break those rules: eight hundred and eighty-eight over-long lines, twenty links named after their destination, fifteen articles with more than one top-level heading. The migration was not allowed to rewrite article text, so the linter describes the corpus instead of correcting it.&lt;/p&gt;
&lt;p&gt;The hooks changed twice. The repository started with a Python &lt;code&gt;pre-commit&lt;/code&gt; configuration, because that is the toolchain I know, not the one this project has. One of its hooks needed a &lt;code&gt;pymarkdown&lt;/code&gt; environment built with a Python version for which &lt;code&gt;pyyaml&lt;/code&gt; has no wheel, and building it needs a C++ compiler that is not installed. That is the whole argument against keeping it: a second toolchain, in a repository that had just spent two days deleting one. &lt;code&gt;husky&lt;/code&gt; and &lt;code&gt;lint-staged&lt;/code&gt; now do the same job with the tools the project already has, installed by &lt;code&gt;pnpm install&lt;/code&gt; so a fresh clone is gated without another step, and the push hook runs the same two commands as CI.&lt;/p&gt;
&lt;h2 id=&quot;five-hosts-and-two-variables&quot;&gt;Five hosts and two variables&lt;/h2&gt;
&lt;p&gt;The plan said each host publishes the same &lt;code&gt;dist&lt;/code&gt;. True, and not sufficient.&lt;/p&gt;
&lt;p&gt;The canonical URL and the base path are read from the environment, which is how the GitHub Pages deployment under &lt;code&gt;/blog/&lt;/code&gt; gets its prefix. That also meant a build inherited whatever the shell happened to hold: the site of one host was built with the prefix of another, and every link on it answered with a 404. Worse, under Git Bash the value &lt;code&gt;/blog&lt;/code&gt; was rewritten into a Windows path. Two commands now exist, &lt;code&gt;build:root&lt;/code&gt; and &lt;code&gt;build:pages&lt;/code&gt;, and each pins both variables in the same command that runs the build, so the checks and the hosts always read a site whose shape was chosen on purpose.&lt;/p&gt;
&lt;p&gt;The smaller host facts, all of them learned rather than planned: Render reads no configuration file from the repository and needs no &lt;code&gt;SITE_URL&lt;/code&gt;, because the canonical URL of the site is the Netlify one on every host but GitHub Pages. The repository has to be told that the source of its Pages site is “GitHub Actions”, or the workflow has nothing to deploy. pnpm 12 refuses to run the install scripts of &lt;code&gt;esbuild&lt;/code&gt; and &lt;code&gt;workerd&lt;/code&gt; until they are explicitly allowed, and &lt;code&gt;workerd&lt;/code&gt; is the runtime Cloudflare runs the Worker with, so that allowance is in the CI of every host. &lt;code&gt;vercel.json&lt;/code&gt; stayed, because the auto-detection of Vercel would run &lt;code&gt;astro build&lt;/code&gt; instead of the build command that pins the variables. And &lt;code&gt;wrangler.toml&lt;/code&gt; lost its &lt;code&gt;[build]&lt;/code&gt; section, which had been running the build a second time on every deployment.&lt;/p&gt;
&lt;h2 id=&quot;cloudflare-was-the-last-thing-to-move&quot;&gt;Cloudflare was the last thing to move&lt;/h2&gt;
&lt;p&gt;Cloudflare now recommends Workers for new projects, and a static blog fits a Worker with assets: the output is served as static assets, and the 404 page of the site answers the unknown URLs. That part worked the first time.&lt;/p&gt;
&lt;p&gt;What I did not know is how much a branch preview needs. Workers Builds runs &lt;code&gt;wrangler preview&lt;/code&gt; for a branch, and that command refuses to start when the configuration holds no &lt;code&gt;previews&lt;/code&gt; block. The block may be empty — this Worker has no variables, no secrets and no bindings, so a preview has nothing of its own to ask for — but it has to be there. And the two commands of Builds are two separate settings: the deploy command publishes the production branch, the preview command runs for every other branch. Putting &lt;code&gt;wrangler preview&lt;/code&gt; in the deploy field would produce a nice preview and a site that never updates.&lt;/p&gt;
&lt;p&gt;The last surprise was not mine at all. The upload of the assets failed once with &lt;code&gt;code: 10013&lt;/code&gt;, “an unknown error”, from &lt;code&gt;assets-upload-session&lt;/code&gt; of the Cloudflare API. Same code, same endpoint, same symptom as an open issue in &lt;code&gt;workers-sdk&lt;/code&gt; where a single retry of the build was enough. It was enough here too. I had already verified the file count, the sizes, the file names and the configuration; the API was having a bad afternoon. Worth saying out loud because “the deploy failed” reads like a fault in the repository, and this one was not.&lt;/p&gt;
&lt;h2 id=&quot;what-the-new-site-still-does-not-have&quot;&gt;What the new site still does not have&lt;/h2&gt;
&lt;p&gt;Not everything the old theme did has been rebuilt, and the list is short enough to write down.&lt;/p&gt;
&lt;p&gt;An article page names no reading time, which the old theme computed. The cards in the lists carry no cover image, where the theme showed the front-matter image as a thumbnail. The feeds name no &lt;code&gt;atom:link rel=&quot;self&quot;&lt;/code&gt;. And the site follows the color scheme of the system with no switch, where the theme offered one.&lt;/p&gt;
&lt;p&gt;There are no comments, no search and no widgets. The plan listed search among the features to recreate, and I dropped it: a search box over a personal blog of thirty-seven articles is a feature I never use as a reader, and an index to keep in step with the corpus is a thing to maintain. The old theme had its comments switched off and its widget lists empty, so a reader loses nothing that was ever readable. The honest summary is that everything a reader of the old site could have used is still there, and four niceties are not.&lt;/p&gt;
&lt;h2 id=&quot;did-it-deliver&quot;&gt;Did it deliver&lt;/h2&gt;
&lt;p&gt;The workflow I wanted was: write Markdown, run one normal build command, publish a folder of static files. That is what I have. There is no bespoke installer, the theme’s configuration model is gone, the templates and the CSS are files of this repository that I can change directly, and the versions of Hugo and a theme no longer have to stay in step because neither is installed.&lt;/p&gt;
&lt;p&gt;The part the plan did not predict is where the effort went. Converting front matter took an afternoon. The old URLs, the features nobody had written down, the corpus that behaves differently from the sample, the four hosts that each need one fact stated explicitly, and the checks that make any of it safe to change again — that was the migration. A static site generator is a small problem. A static site is a corpus with a history, and the history is the expensive part.&lt;/p&gt;
</description><pubDate>Thu, 05 Nov 2026 02:55:00 GMT</pubDate><category>blog</category><category>blog</category><category>astro</category><category>hugo</category><category>web</category><author>Zeyang Lin</author></item><item><title>This Month for Pythonistas - April 2026</title><link>https://blueberrypy.netlify.app/post/this-month-for-pythonistas-2026-04/</link><guid isPermaLink="true">https://blueberrypy.netlify.app/post/this-month-for-pythonistas-2026-04/</guid><description>&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; datetime &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; date&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(date.today().year, date.today().month)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# 2026 4&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img alt=&quot;issue-2026-04&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1280&quot; height=&quot;708&quot; src=&quot;/_astro/splash.B5_2pwJJ_lLOzs.webp&quot;&gt;&lt;/p&gt;
&lt;p&gt;Welcome back Pythonistas! This is the April 2026 issue of “This Month for Pythonistas”, bringing you curated Python news, tutorials, articles, podcasts and community highlights.&lt;/p&gt;
&lt;p&gt;Before we continue, please note that this blog is synced across the following platforms:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://blueberry-py.github.io/blog/post/this-month-for-pythonistas-2026-04/&quot;&gt;Github Pages&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blueberrypy.netlify.app/post/this-month-for-pythonistas-2026-04/&quot;&gt;Netlify&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blueberrypy.onrender.com/post/this-month-for-pythonistas-2026-04/&quot;&gt;Render&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blueberrypy-blog.vercel.app/post/this-month-for-pythonistas-2026-04/&quot;&gt;Vercel&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Ready? Let’s get started!&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;events--social&quot;&gt;Events &amp;amp; Social&lt;/h2&gt;
&lt;h3 id=&quot;reflecting-on-five-years-as-the-psfs-first-cpython-developer-in-residence&quot;&gt;&lt;a href=&quot;https://pyfound.blogspot.com/2026/04/reflecting-on-five-years-as-psfs-first.html&quot;&gt;Reflecting on Five Years as the PSF’s First CPython Developer in Residence&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The article reflects on &lt;em&gt;Łukasz Langa&lt;/em&gt;’s nearly five-year tenure as the PSF’s first CPython Developer in Residence, highlighting contributions like transitioning to GitHub issues, automating the CLA process, introducing free threading, and modernizing the interactive shell. The role will continue with Meta’s sponsorship through mid-2027. The position has expanded from one to five full-time engineers, ensuring its stability. Łukasz expresses gratitude to the Steering Council and excitement about moving to Vancouver while joining Meta, emphasizing ongoing commitment to the Python community.&lt;/p&gt;
&lt;h3 id=&quot;djangocon-europe-2026&quot;&gt;DjangoCon Europe 2026&lt;/h3&gt;
&lt;p&gt;DjangoCon Europe goes to Athens, Greece this year, from April 15th to 19th. More info can be found &lt;a href=&quot;https://2026.djangocon.eu/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;introducing-gpt55&quot;&gt;&lt;a href=&quot;https://openai.com/index/introducing-gpt-5-5/&quot;&gt;Introducing GPT‑5.5&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;OpenAI released GPT-5.5 which excels in coding, knowledge work, scientific research and cybersecurity, matching GPT-5.4’s latency with stronger performance. It has higher token efficiency and stricter safeguards. Now available for Plus/Pro/Business/Enterprise users; API versions launch soon. GPT-5.5 Pro delivers better accuracy for complex tasks.&lt;/p&gt;
&lt;h3 id=&quot;introducing-claude-opus-47&quot;&gt;&lt;a href=&quot;https://www.anthropic.com/news/claude-opus-4-7&quot;&gt;Introducing Claude Opus 4.7&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://www.anthropic.com/_next/image?url=https%3A%2F%2Fwww-cdn.anthropic.com%2Fimages%2F4zrzovbb%2Fwebsite%2F96ea2509a90e527642c822303e56296a07bcfce4-1920x1080.png&amp;amp;w=3840&amp;amp;q=75&quot; alt=&quot;claude-opus-4.7&quot;&gt;&lt;/p&gt;
&lt;p&gt;Claude Opus 4.7, Anthropic’s latest model, is now generally available. It significantly advances Opus 4.6 in advanced software engineering, handling difficult coding tasks with greater autonomy, precision, and consistency. The model also features substantially improved vision, higher-resolution image understanding, and more creative, professional outputs. It demonstrates stronger reasoning, better instruction following, and enhanced multimodal capabilities. With safeguards for cybersecurity and expanded access across products and cloud platforms, Opus 4.7 aims to accelerate complex workflows while maintaining reliability and safety.&lt;/p&gt;
&lt;h3 id=&quot;qwen36-plus-towards-real-world-agents&quot;&gt;&lt;a href=&quot;https://qwen.ai/blog?id=qwen3.6&quot;&gt;Qwen3.6-Plus: Towards Real World Agents&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://qianwen-res.oss-accelerate.aliyuncs.com/Qwen3.6/Figures/3.6_plus_banner.png&quot; alt=&quot;qwen3.6-plus-image&quot;&gt;&lt;/p&gt;
&lt;p&gt;Qwen has launched &lt;em&gt;Qwen3.6-Plus&lt;/em&gt;, a major upgrade featuring dramatically enhanced agentic coding capabilities and improved multimodal reasoning. The model now supports a 1M context window by default and excels in complex tasks like frontend development, terminal operations, and automated task execution. It demonstrates state-of-the-art performance across coding benchmarks (SWE-bench, Terminal-Bench 2.0), general agent tasks, and multimodal understanding (MMMU, document analysis, video reasoning).&lt;/p&gt;
&lt;h3 id=&quot;glm-51-towards-long-horizon-tasks&quot;&gt;&lt;a href=&quot;https://z.ai/blog/glm-5.1&quot;&gt;GLM-5.1: Towards Long-Horizon Tasks&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;GLM-5.1 is Z.ai’s next-generation flagship model designed for agentic engineering tasks with significantly improved coding capabilities. It achieves state-of-the-art performance on SWE-Bench Pro and leads on NL2Repo and Terminal-Bench 2.0 benchmarks. Unlike previous models that plateau early, GLM-5.1 excels at long-horizon optimization, demonstrated by achieving 6× better results over 600 iterations on vector database optimization, sustaining 3.6× speedup over 1,000+ turns on ML workloads, and building a complete Linux desktop environment over 8 hours through continuous refinement.&lt;/p&gt;
&lt;h3 id=&quot;kimi-k26-advancing-open-source-coding&quot;&gt;&lt;a href=&quot;https://www.kimi.com/blog/kimi-k2-6&quot;&gt;Kimi K2.6: Advancing Open-Source Coding&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://kimi-file.moonshot.cn/prod-chat-kimi/kfs/4/2/2026-04-20/1d7j2jpl3v89kkei5mq70?x-tos-process=image%2Fauto-orient%2C1%2Fstrip%2Fignore-error%2C1&quot; alt=&quot;kimi-k2.6&quot;&gt;&lt;/p&gt;
&lt;p&gt;Kimi K2.6 is an open-source model from Moonshot featuring advanced coding, long-horizon execution, and agent swarm capabilities. It demonstrates significant improvements over K2.5 in complex engineering tasks, autonomously handling multi-step workflows across programming languages like Rust, Go, and Python. The model excels at long-running tasks—such as optimizing financial engines and deploying models—with strong tool-calling accuracy (96.60%). K2.6 also enables coding-driven frontend design and full-stack development, while its &lt;em&gt;Agent Swarm&lt;/em&gt; architecture scales to 300 sub-agents executing 4,000 coordinated steps. Used in proactive agents like &lt;em&gt;OpenClaw&lt;/em&gt; and &lt;em&gt;Hermes&lt;/em&gt;, it supports 24/7 autonomous operations and collaborative multi-agent systems through Claw Groups, achieving state-of-the-art performance on benchmarks like SWE-Bench and Terminal-Bench 2.0.&lt;/p&gt;
&lt;h3 id=&quot;the-next-evolution-of-the-agents-sdk&quot;&gt;&lt;a href=&quot;https://openai.com/en-US/index/the-next-evolution-of-the-agents-sdk/&quot;&gt;The next evolution of the Agents SDK&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The article discusses the next evolution of OpenAI’s Agents SDK, introducing enhanced capabilities for building AI agents. The updated SDK enables developers to create agents that can inspect files, execute commands, edit code, and handle long-term tasks within controlled sandbox environments. Key features include configurable memory, sandbox-aware orchestration, filesystem tools, MCP integration for tool use, and native sandbox execution with providers like Blaxel and Daytona. The architecture separates harness from compute, supports durable execution through snapshotting, and provides standardized primitives for building reliable, scalable agent systems with improved security and performance.&lt;/p&gt;
&lt;h2 id=&quot;new-versions&quot;&gt;New Versions&lt;/h2&gt;
&lt;h3 id=&quot;python-3150a8-3144-and-31313-are-out&quot;&gt;&lt;a href=&quot;https://blog.python.org/2026/04/python-3150a8-3144-31313/&quot;&gt;Python 3.15.0a8, 3.14.4 and 3.13.13 are out!&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;3.15.0 alpha 8 is expected to be the last alpha build before beta 1 comes out in May 2026. You can find the full release schedule of Python 3.15 &lt;a href=&quot;https://peps.python.org/pep-0790/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;3.14.4 and 3.13.13 are bug fix releases for Python 3.14 and 3.13 respectively, both with binary as well as tarball distributions.&lt;/p&gt;
&lt;h2 id=&quot;tutorials&quot;&gt;Tutorials&lt;/h2&gt;
&lt;h3 id=&quot;deeplearningais-efficient-inference-with-sglang-text-and-image-generation&quot;&gt;DeepLearning.ai’s &lt;a href=&quot;https://www.deeplearning.ai/short-courses/efficient-inference-with-sglang-text-and-image-generation/&quot;&gt;Efficient Inference with SGLang: Text and Image Generation&lt;/a&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;In this course, you’ll build a clear mental model of how inference works (from input tokens to generated output) and learn why the memory bottleneck exists. From there, you’ll implement the KV cache from scratch to store and reuse intermediate attention values within a single request. Then you’ll go further with RadixAttention, SGLang’s approach to sharing KV cache across requests by identifying common prefixes using a radix tree. Finally, you’ll apply these same optimization principles to image generation using diffusion models.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;deeplearningais-spec-driven-development-with-coding-agents-from-paul-everitt&quot;&gt;DeepLearning.ai’s &lt;a href=&quot;https://www.deeplearning.ai/short-courses/spec-driven-development-with-coding-agents/&quot;&gt;Spec-Driven Development with Coding Agents&lt;/a&gt; from Paul Everitt&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;In this course, you’ll write project constitutions, plan and validate features in iterative loops, and apply the same repeatable workflow to both fresh and legacy codebases. You’ll also see how specs preserve context across agent sessions, reduce cognitive debt, and improve intent fidelity, keeping your agent aligned with what you actually want.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;deeplearningais-building-multimodal-data-pipelines-from-snowflake&quot;&gt;DeepLearning.ai’s &lt;a href=&quot;https://www.deeplearning.ai/short-courses/building-multimodal-data-pipelines/&quot;&gt;Building Multimodal Data Pipelines&lt;/a&gt; from Snowflake&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;Images, audio, and video make up a growing share of the data companies generate today, but most pipelines are still built for structured data alone. This course teaches you to build AI-powered pipelines that process multimodal data and turn it into LLM-ready text.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;realpythons-variables-in-python-usage-and-best-practices&quot;&gt;RealPython’s &lt;a href=&quot;https://realpython.com/python-variables/&quot;&gt;Variables in Python: Usage and Best Practices&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://realpython.com/cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/UPDATE-Variables-in-Python_Watermarked.7d8b51f3adad.jpg&quot; alt=&quot;realpython-variables-in-python&quot;&gt;&lt;/p&gt;
&lt;p&gt;In Python, “variables” are symbolic names that refer to objects or values stored in memory, created by assigning a value with the &lt;code&gt;=&lt;/code&gt; operator. They are dynamically typed, so their type can change through reassignment, and naming follows rules like using letters, digits, and underscores but not starting with a digit, with snake_case preferred for readability. Variables can be used in expressions, as counters, accumulators, flags, loop variables, or data storage, and they exist in scopes (global, local, non-local, built-in) that determine accessibility. Python also supports type hints, multiple assignment, iterable unpacking, assignment expressions, and pattern matching for creating variables, while attributes in classes provide namespace-like behavior, and &lt;code&gt;del&lt;/code&gt; can remove variables from scope.&lt;/p&gt;
&lt;h2 id=&quot;articles&quot;&gt;Articles&lt;/h2&gt;
&lt;h3 id=&quot;cutting-python-web-app-memory-over-31&quot;&gt;&lt;a href=&quot;https://mkennedy.codes/posts/cutting-python-web-app-memory-over-31-percent/&quot;&gt;Cutting Python Web App Memory Over 31%&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The article from &lt;em&gt;Michael Kennedy&lt;/em&gt; details how Michael Kennedy reduced his Python web app memory usage from 1,988 MB to 472 MB (over 31% reduction, saving 3.2 GB total) using five key techniques: migrating to Quart (async Flask) with a single Granian worker, replacing the MongoEngine ODM with a Raw+DataClass database pattern, isolating the search indexer into a subprocess (cutting it from 708 MB to 22 MB), moving heavy library imports like boto3 and pandas from global to local function-level imports, and shifting in-memory caches to disk-based caching using the diskcache library.&lt;/p&gt;
&lt;h3 id=&quot;python-introducing-profiling-explorer&quot;&gt;&lt;a href=&quot;https://adamj.eu/tech/2026/04/03/python-introducing-profiling-explorer/&quot;&gt;Python: introducing profiling-explorer&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The author introduces &lt;strong&gt;profiling-explorer&lt;/strong&gt;, a new Python tool for exploring profiling data from pstats files generated by Python’s built-in profilers. It provides a web-based interface with features like dark mode, sortable columns, search filtering, and navigation between callers and callees. The tool was motivated by the author’s optimization work where the command-line pstats interface felt clunky. The article also explains Python’s three profilers — profile (deprecated), profiling.tracing (cProfile), and the new sampling profiler Tachyon in Python 3.15 — and provides instructions for generating pstats files and using profiling-explorer to analyze them, sponsored by Rippling.&lt;/p&gt;
&lt;h3 id=&quot;django-fixing-a-memory-leak-from-python-314s-incremental-garbage-collection&quot;&gt;&lt;a href=&quot;https://adamj.eu/tech/2026/04/20/django-python-3.14-incremental-gc/&quot;&gt;Django: fixing a memory “leak” from Python 3.14’s incremental garbage collection&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The article details an out-of-memory error encountered when running Django migrations on Python 3.14, specifically on a resource-constrained Heroku server. Python 3.14 introduced &lt;strong&gt;incremental garbage collection&lt;/strong&gt; to reduce pause times, but this algorithm struggled with Django’s cyclical objects, causing memory usage to spike beyond limits. The author implemented a workaround by extending Django’s migrate command to force full garbage collection after each migration using &lt;code&gt;gc.collect()&lt;/code&gt;, which resolved the issue. Coincidentally, the Python core team announced they would revert incremental garbage collection in Python 3.14.5 due to widespread memory concerns, validating the problem and rendering the workaround temporary.&lt;/p&gt;
&lt;h3 id=&quot;using-a-pdbrc-file-to-customize-the-python-debugger&quot;&gt;&lt;a href=&quot;https://treyhunner.com/2026/04/customizing-pdb-with-pdbrc/&quot;&gt;Using a &lt;code&gt;~/.pdbrc&lt;/code&gt; file to customize the Python Debugger&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The article explores customizing Python’s built-in debugger (pdb) via a &lt;code&gt;.pdbrc&lt;/code&gt; configuration file. It details how to set up persistent aliases, command shortcuts, and environment adjustments to streamline debugging workflows. The author provides practical examples, such as defining custom commands and automating routine tasks, demonstrating how &lt;code&gt;.pdbrc&lt;/code&gt; enhances productivity by reducing repetitive input. The piece also touches on best practices for organizing configurations and ensuring compatibility across different debugging sessions, making pdb more adaptable to individual developer preferences and complex project requirements.&lt;/p&gt;
&lt;h3 id=&quot;building-a-python-library-in-2026&quot;&gt;&lt;a href=&quot;https://stephenlf.dev/blog/python-library-in-2026/&quot;&gt;Building a Python Library in 2026&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This blog post provides a comprehensive guide to building Python libraries in 2026, emphasizing modern tools and best practices. The author recommends using &lt;strong&gt;uv&lt;/strong&gt; from Astral as the central tool for project initialization, dependency management, building, and publishing. Key components include: a standard &lt;code&gt;src&lt;/code&gt; layout, &lt;code&gt;pyproject.toml&lt;/code&gt; metadata, linting/formatting with &lt;strong&gt;ruff&lt;/strong&gt;, type checking with &lt;strong&gt;mypy&lt;/strong&gt; (or alternatives), testing with &lt;strong&gt;pytest&lt;/strong&gt; and coverage, CI enforcement via GitHub Actions, and pre-commit hooks. The author also explores publishing options beyond PyPI and examines real-world implementations from OpenAI and Polars, demonstrating how these tools streamline modern Python package development.&lt;/p&gt;
&lt;h3 id=&quot;why-pylocktoml-includes-digital-attestations&quot;&gt;&lt;a href=&quot;https://snarky.ca/why-pylock-toml-includes-digital-attestations/&quot;&gt;Why pylock.toml includes digital attestations&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This blog post from &lt;em&gt;Brett Cannon&lt;/em&gt; explains why &lt;code&gt;pylock.toml&lt;/code&gt; includes digital attestations to enhance Python package security. Triggered by a recent PyPI project hack, the author highlights how &lt;em&gt;trusted publishing&lt;/em&gt; allows continuous deployment systems to securely upload packages without exposing credentials. Digital attestations verify that a package genuinely originated from its expected CD system. When recorded in &lt;code&gt;pylock.toml&lt;/code&gt;, publisher details for each package enable automated or manual verification to detect suspicious changes, such as missing or altered attestation data. Ultimately, the author recommends maintainers adopt trusted publishing with attestations, use lock files like &lt;code&gt;pylock.toml&lt;/code&gt;, and regularly review attestation consistency to catch potential supply chain attacks.&lt;/p&gt;
&lt;h3 id=&quot;continual-learning-for-ai-agents&quot;&gt;&lt;a href=&quot;https://blog.langchain.com/continual-learning-for-ai-agents/&quot;&gt;Continual learning for AI agents&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The blog post from Langchain explains that continual learning for AI agents can occur at three distinct layers: the model (weight updates using techniques like SFT or RL), the harness (optimizing the code and tools around the model), and the context (updating configuration, instructions, skills, or memory). While most discussions focus on model-level learning, the harness and context layers offer practical ways to improve agents over time. Traces — the full execution logs of agents — are central to all approaches, enabling analysis and improvement. The harness can be refined by reviewing traces to suggest code changes, while context can be updated at agent, user, or organization levels, either offline or in real-time. Tools like LangSmith and frameworks like Deep Agents support these patterns, allowing AI systems to continuously learn and adapt.&lt;/p&gt;
&lt;h3 id=&quot;pixi-one-package-manager-for-python-and-cc-libraries&quot;&gt;&lt;a href=&quot;https://codecut.ai/uv-pixi-comparison/&quot;&gt;pixi: One Package Manager for Python and C/C++ Libraries&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The article compares &lt;strong&gt;uv&lt;/strong&gt; and &lt;strong&gt;pixi&lt;/strong&gt; as Python package managers, explaining that while uv excels at fast dependency resolution and lockfiles for pure Python projects from PyPI, it cannot install compiled C/C++ system libraries like GDAL, requiring separate OS package managers. &lt;strong&gt;pixi&lt;/strong&gt; solves this by managing both Python packages from PyPI and compiled libraries from conda-forge in a single tool, with automatic lockfiles, multi-platform support, built-in task running, and project-level environments. The author recommends using uv for simple Python projects and pixi when working with compiled dependencies, geospatial libraries, or needing unified package management across platforms.&lt;/p&gt;
&lt;h3 id=&quot;learning-rust-made-me-a-better-python-developer&quot;&gt;&lt;a href=&quot;https://belderbos.dev/blog/rust-made-me-a-better-python-developer/&quot;&gt;Learning Rust Made Me a Better Python Developer&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Learning Rust improved the author’s Python development by forcing explicit thinking about data ownership, error handling, and edge cases. Rust’s compiler enforces strict patterns that prevent common bugs: ownership rules stop unexpected mutations, Result types make failure explicit in return types, and exhaustive pattern matching ensures all cases are handled. Though Python’s type system can approximate these concepts, Rust’s compiler builds a disciplined reflex. The author now writes cleaner, more predictable Python — asking who owns data before mutating, modeling errors explicitly, and treating all possible states — even though Rust and Python serve different roles (performance vs. orchestration) and aren’t direct competitors.&lt;/p&gt;
&lt;h3 id=&quot;what-every-dev-should-know-about-ai-sandboxes&quot;&gt;&lt;a href=&quot;https://read.engineerscodex.com/p/every-dev-should-know-about-ai-sandboxes&quot;&gt;What every dev should know about AI sandboxes&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;AI sandboxes are critical for safely running AI agents, protecting production systems from potentially harmful actions. The threat model has evolved: agents may confidently execute wrong instructions, not just malicious attacks. Isolation levels range from lightweight containers (fast but share kernel) to MicroVMs (hardware-level isolation but slower), gVisor (userspace kernel), OS-level primitives like Bubblewrap (zero overhead), and simulated environments. Trade-offs exist between speed and security. Vendors like E2B (Firecracker-based), Modal (gVisor), and Daytona (container-based) offer solutions. Building your own sandbox is discouraged unless it’s your core product, as managing security, observability, and lifecycle complexity distracts from primary goals.&lt;/p&gt;
&lt;h3 id=&quot;long-running-agents&quot;&gt;&lt;a href=&quot;https://addyosmani.com/blog/long-running-agents/&quot;&gt;Long-running Agents&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Long-running agents are AI systems that maintain progress across hours, days, or weeks, overcoming the limitations of traditional chat-based agents that forget and fail over long tasks. They require solving three core problems: finite context windows, lack of persistent state, and unreliable self-verification. Leading approaches from Anthropic, Cursor, and Google converge on decoupling the model’s reasoning loop from execution sandboxes and durable session logs, while implementing patterns like checkpoint-and-resume, memory banks, and separate evaluators to ensure reliability. These systems enable economically feasible delegation of complex, multi-day work, though challenges remain around cost, security, alignment drift, and defining work that can survive autonomous execution.&lt;/p&gt;
&lt;h3 id=&quot;scaling-managed-agents-decoupling-the-brain-from-the-hands&quot;&gt;&lt;a href=&quot;https://www.anthropic.com/engineering/managed-agents&quot;&gt;Scaling Managed Agents: Decoupling the brain from the hands&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Anthropic’s &lt;em&gt;Managed Agents&lt;/em&gt; service decouples the “brain” (Claude and its harness) from the “hands” (execution sandboxes) and the “session” (event log) through stable, general-purpose interfaces. This architecture — inspired by operating system virtualization — addresses the fragility of earlier monolithic designs where components were tightly coupled in single containers. By treating each component as interchangeable “cattle” rather than precious “pets”, the system gains reliability, security (credentials are isolated from execution), and performance (reducing time-to-first-token by 60-90%). The meta-harness design is opinionated about interfaces but unopinionated about specific implementations, allowing it to evolve alongside model improvements.&lt;/p&gt;
&lt;h3 id=&quot;multi-agent-coordination-patterns-five-approaches-and-when-to-use-them&quot;&gt;&lt;a href=&quot;https://claude.com/blog/multi-agent-coordination-patterns&quot;&gt;Multi-agent coordination patterns: Five approaches and when to use them&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The Claude blog outlines five multi-agent coordination patterns for teams building AI systems. The generator-verifier pattern loops output between generation and validation for quality-critical work. Orchestrator-subagent uses a lead agent to delegate clear, bounded subtasks. Agent teams employ persistent workers for independent, long-running parallel work. Message bus routes events through publish-subscribe for evolving pipelines. Shared state lets agents collaborate through a common knowledge store. The authors recommend starting with orchestrator-subagent as the simplest pattern, then evolving as needs clarify, emphasizing that patterns are building blocks often combined in production systems rather than mutually exclusive choices.&lt;/p&gt;
&lt;h3 id=&quot;managing-context-in-long-run-agentic-applications&quot;&gt;&lt;a href=&quot;https://slack.engineering/managing-context-in-long-run-agentic-applications/&quot;&gt;Managing context in long-run agentic applications&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://slack.engineering/wp-content/uploads/sites/7/2026/03/investigation_notebook.png&quot; alt=&quot;slack-engineering-investigation-notebook&quot;&gt;&lt;/p&gt;
&lt;p&gt;The article discusses managing context in long-running agentic systems, focusing on Slack’s approach to maintaining coherence across multi-agent investigations. It addresses challenges posed by limited language model context windows and proposes three complementary channels: the Director’s Journal for structured memory, the Critic’s Review for credibility-scored findings, and the Critic’s Timeline for consolidated, evidence-based chronology. These mechanisms enable specialized agent roles while preserving alignment and creativity, allowing systems to operate effectively over extended interactions. The solution emphasizes online summarization rather than accumulating message history, ensuring scalability and trustworthiness.&lt;/p&gt;
&lt;h3 id=&quot;components-of-a-coding-agent&quot;&gt;&lt;a href=&quot;https://magazine.sebastianraschka.com/p/components-of-a-coding-agent&quot;&gt;Components of A Coding Agent&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This article by Sebastian Raschka explains the core components of coding agents (like Claude Code and Codex CLI) that make LLMs more effective for programming tasks. The author describes six key building blocks:&lt;/p&gt;
&lt;p&gt;(1) Live Repo Context - understanding the project structure and environment;
(2) Prompt Shape and Cache Reuse - efficiently packaging and caching stable information;
(3) Tool Access and Use - enabling structured tool calls with validation;
(4) Minimizing Context Bloat - compressing and deduplicating history;
(5) Structured Session Memory - maintaining both full transcripts and distilled working memory;
and (6) Delegation with Subagents - splitting tasks into bounded subtasks.&lt;/p&gt;
&lt;p&gt;The article emphasizes that the harness layer often matters as much as the underlying model itself, explaining why coding agents feel significantly more capable than the same models in plain chat interfaces.&lt;/p&gt;
&lt;h3 id=&quot;all-your-agents-are-going-async&quot;&gt;&lt;a href=&quot;https://zknill.io/posts/all-your-agents-are-going-async/&quot;&gt;All your agents are going async&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The post argues that AI agents are shifting from synchronous chat to asynchronous, background workflows, breaking HTTP request‑response transport. Async agents need durable state and push-based delivery because they outlive connections, push unprompted updates, switch devices, and serve multiple users. Current solutions like Anthropic Channels, Cloudflare Sessions, and OpenClaw’s WhatsApp model address state or delivery but often rely on polling or custom backends. The author advocates a durable, realtime session layer—bi‑directional, multi‑device, and resilient—that separates conversation state from transport, enabling reliable async collaboration between humans and agents.&lt;/p&gt;
&lt;h3 id=&quot;why-were-rethinking-cache-for-the-ai-era&quot;&gt;&lt;a href=&quot;https://blog.cloudflare.com/rethinking-cache-ai-humans/&quot;&gt;Why we’re rethinking cache for the AI era&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Cloudflare’s analysis reveals that 32% of network traffic originates from automated sources, including AI bots and crawlers. Unlike human users, AI traffic exhibits high-volume sequential requests targeting long-tail content across websites, significantly raising cache miss rates and straining CDN infrastructure. This has caused real-world impacts like Wikipedia’s 50% surge in bandwidth usage and service slowdowns across platforms like SourceHut and Fedora. Current cache algorithms such as LRU struggle under AI’s constant scanning behavior. Cloudflare proposes AI-aware solutions including alternative cache replacement algorithms (SEIVE, S3FIFO), machine learning-based caching, and ultimately a separate cache layer dedicated to AI traffic to maintain performance for human users.&lt;/p&gt;
&lt;h3 id=&quot;your-harness-your-memory&quot;&gt;&lt;a href=&quot;https://blog.langchain.com/your-harness-your-memory/&quot;&gt;Your harness, your memory&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://storage.ghost.io/c/97/88/97889716-a759-46f4-b63f-4f5c46a13333/content/images/size/w1248/format/webp/2026/04/image--9--1.png&quot; alt=&quot;langchain-deep-agents&quot;&gt;&lt;/p&gt;
&lt;p&gt;Agent harnesses — the systems that coordinate LLMs with tools and data — are becoming the standard way to build AI agents, and they are fundamentally tied to memory management. Using closed, proprietary harnesses means surrendering control of your agent’s memory to third parties, which creates significant lock-in. Memory is what allows agents to learn from interactions and deliver personalized experiences, making it a crucial competitive advantage. The article argues that both memory and harnesses should be open and independently owned to maintain flexibility and avoid platform dependency. To address this, the author introduces Deep Agents as an open-source, model-agnostic framework that gives developers full control over their agents’ memory storage and retrieval.&lt;/p&gt;
&lt;h3 id=&quot;oh-memories-whered-you-go&quot;&gt;&lt;a href=&quot;https://weaviate.io/blog/engram-internal-use-case&quot;&gt;Oh Memories, Where’d You Go&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Engram&lt;/em&gt; is Weaviate’s memory product (in private preview) designed to store context beyond what fits in Claude Code’s built-in MEMORY.md file (~200 lines). The author tested it by building an MCP server integration but initially found Claude ignored Engram because MEMORY.md loads with zero latency. The solution involved categorizing memories (communication-style, domain-context, tool-preferences, workflow) and integrating at specific session lifecycle points. Testing showed Engram excelled at “decision archaeology” (30% faster with reasoning chains recalled), but failed on planning tasks where Claude defaults to forward-moving. Key improvements needed include fire-and-forget saves, automatic memory capture pipelines, and deterministic retrieval hooks at session start.&lt;/p&gt;
&lt;h3 id=&quot;the-spec-layer&quot;&gt;&lt;a href=&quot;https://blog.matt-rickard.com/p/the-spec-layer&quot;&gt;The Spec Layer&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The blog advocates for spec-driven development (SDD) to constrain AI agents’ execution freedom and prevent “wrong kind of correct” mistakes. Unlike humans, agents make locally valid errors like disabling tests or reusing existing patterns. Written specs provide durable intent that narrows choices at implementation time. Historical protocol examples (RFCs for IP, HTTP, TLS, HTML) demonstrate how specs enable multiple implementations over decades. The ideal spec should be declarative, layered, and cheap to revise, with mechanical enforcement moved to lint, schemas, and tests. The goal is a narrow interface between human intent and machine execution: smaller specs, harder checks, and less guessing.&lt;/p&gt;
&lt;h3 id=&quot;i-still-prefer-mcp-over-skills&quot;&gt;&lt;a href=&quot;https://david.coffee/i-still-prefer-mcp-over-skills/&quot;&gt;I Still Prefer MCP Over Skills&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The author argues that MCP (Model Context Protocol) is superior to Skills for connecting LLMs to external services because it’s an API abstraction where the LLM only needs to know the “what”, not the “how”. MCP offers zero-install remote usage, seamless auto-updates, proper authentication handling, true portability, sandboxing, and smart tool discovery. Skills, however, require CLI installation, can’t work in many environments like ChatGPT or Perplexity, create deployment and secret management nightmares, and bloat the context window. He concludes that MCP should be the standard for connecting to services, while Skills should only be used for teaching LLMs knowledge about existing tools or workflows — not as replacements for actual service connectors.&lt;/p&gt;
&lt;h3 id=&quot;the-beginning-of-programming-as-well-know-it&quot;&gt;&lt;a href=&quot;https://bitsplitting.org/2026/04/01/the-beginning-of-programming-as-well-know-it/&quot;&gt;The Beginning of Programming as We’ll Know It&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The article discusses the impact of AI coding assistants on the programming profession. While AI tools like Claude and Codex can now complete significant coding tasks in minutes, the author argues that human programmers remain essential during this transitional period. Humans bring unique qualities like taste, wisdom, and caution that AI lacks. The author emphasizes that AI-generated code must be reviewed and corrected by humans before it can be considered real work. Despite AI’s impressive capabilities, there’s a “reality distortion field” around AI outputs that can mislead developers. The conclusion is that programmers who embrace AI while maintaining skepticism and human oversight will be better equipped than ever, while those who refuse these tools will fall behind.&lt;/p&gt;
&lt;h3 id=&quot;the-cult-of-vibe-coding-is-insane&quot;&gt;&lt;a href=&quot;https://bramcohen.com/p/the-cult-of-vibe-coding-is-insane&quot;&gt;The Cult Of Vibe Coding Is Insane&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This article criticizes the “vibe coding” trend where developers avoid examining underlying code, instead relying solely on vague AI conversations. After Claude’s source code leak revealed poor quality, the author argues that “pure vibe coding” is a myth — human contributions still occur through language and infrastructure frameworks. Bad software isn’t inevitable with AI; it’s a conscious choice. The author explains that AI excels at cleaning up technical debt when given proper guidance through collaborative dialogue, and developers should actively steer AI toward high-quality outcomes rather than accepting mediocrity. The core message: poor software quality is a decision, not a necessity.&lt;/p&gt;
&lt;h3 id=&quot;claude-is-not-your-architect-stop-letting-it-pretend&quot;&gt;&lt;a href=&quot;https://www.hollandtech.net/claude-is-not-your-architect/&quot;&gt;Claude Is Not Your Architect. Stop Letting It Pretend.&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The article warns against using AI like Claude as a software architect, arguing that while AI agents are excellent implementers, they cannot make real architectural decisions. AI is “pathologically agreeable” — always validating ideas enthusiastically without the crucial ability to say “no” or push back on complexity. It produces generic “Jenga tower” architectures that look sound but aren’t tailored to specific teams, constraints, or production realities. The real danger is that engineers are reduced to implementing AI-designed tickets, while accountability vanishes — when systems fail, humans stay up debugging decisions they didn’t make. The solution: humans must design, AI must implement.&lt;/p&gt;
&lt;h2 id=&quot;podcasts&quot;&gt;Podcasts&lt;/h2&gt;
&lt;h3 id=&quot;-corepy&quot;&gt;🥝 core.py&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://open.spotify.com/episode/5pD08pb1Tt7Z7k2ZSIdih9&quot;&gt;Episode 29: Is CPython developed with AI now?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;-realpython-podcast&quot;&gt;🐍 RealPython Podcast&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/podcasts/rpp/290/&quot;&gt;Episode 290: Advice on Managing Projects &amp;amp; Making Python Classes Friendly&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/podcasts/rpp/291/&quot;&gt;Episode 291: Reassessing the LLM Landscape &amp;amp; Summoning Ghosts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/podcasts/rpp/292/&quot;&gt;Episode 292: Becoming a Better Python Developer Through Learning Rust&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;-python-bytes-podcast&quot;&gt;🥧 Python Bytes Podcast&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://pythonbytes.fm/episodes/show/476/common-themes&quot;&gt;#476 Common themes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://pythonbytes.fm/episodes/show/477/lazy-frozen-and-31-lighter&quot;&gt;#477 Lazy, Frozen, and 31% Lighter&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;-talk-python-to-me&quot;&gt;🦜 Talk Python to me&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://talkpython.fm/episodes/show/543/deep-agents-langchains-sdk-for-agents-that-plan-and-delegate&quot;&gt;#543: Deep Agents: LangChain’s SDK for Agents That Plan and Delegate&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://talkpython.fm/episodes/show/544/wheel-next-packaging-peps&quot;&gt;#544: Wheel Next + Packaging PEPs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://talkpython.fm/episodes/show/545/owasp-top-10-2025-list-for-python-devs&quot;&gt;#545: OWASP Top 10 (2025 List) for Python Devs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://talkpython.fm/episodes/show/546/self-hosting-apps-for-python-people&quot;&gt;#546: Self hosting apps for Python people&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;-vs-code-insiders-podcast&quot;&gt;🚀 VS Code Insiders Podcast&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.vscodepodcast.com/21&quot;&gt;Episode 21: Inside The Agent Loop with Pierce Boggan&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;repositories&quot;&gt;Repositories&lt;/h2&gt;
&lt;h3 id=&quot;nousresearchhermes-agent-mit&quot;&gt;&lt;a href=&quot;https://github.com/NousResearch/hermes-agent&quot;&gt;NousResearch/hermes-agent&lt;/a&gt; (MIT)&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;The self-improving AI agent built by Nous Research. It’s the only agent with a built-in learning loop — it creates skills from experience, improves them during use, nudges itself to persist knowledge, searches its own past conversations, and builds a deepening model of who you are across sessions.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;dropseedplain-bsd-3&quot;&gt;&lt;a href=&quot;https://github.com/dropseed/plain&quot;&gt;dropseed/plain&lt;/a&gt; (BSD-3)&lt;/h3&gt;
&lt;p&gt;Forked from Django, &lt;code&gt;plain&lt;/code&gt; is an opinionated Python web framework which is ready for the AI Agent age. You can visit their &lt;a href=&quot;https://plainframework.com/&quot;&gt;official website&lt;/a&gt; for more information.&lt;/p&gt;
&lt;h3 id=&quot;smelloscopesmello-mit&quot;&gt;&lt;a href=&quot;https://github.com/smelloscope/smello&quot;&gt;smelloscope/smello&lt;/a&gt; (MIT)&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;Capture outgoing HTTP requests from your Python code and browse them in a local web dashboard — including gRPC calls made by Google Cloud libraries.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;p&gt;As we wrap up this journey together, I want to take a moment to express my gratitude for your reading. If you’ve enjoyed this issue and would like to help sustain this blog, please consider &lt;a href=&quot;https://github.com/blueberry-py/blog/stargazers&quot;&gt;starring this blog on github&lt;/a&gt;, it would be great motivation for me to keep updating!&lt;/p&gt;
&lt;p&gt;Alright, that concludes the April Edition of “This Month for Pythonistas”. Thank you again for reading my post. I hope you enjoy it or find something useful. Happy coding and see you in May! 👋&lt;/p&gt;
</description><pubDate>Thu, 30 Apr 2026 13:00:00 GMT</pubDate><category>python</category><category>python</category><category>news</category><category>podcast</category><category>AI</category><category>llm</category><category>linux</category><category>blog</category><author>Zeyang Lin</author></item></channel></rss>