Python Weekly (Issue 772 November 19 2026)

Welcome to issue 772 of Python Weekly. One of my portfolio companies, Drafted, is looking to connect with AI leaders at large enterprises and frontier AI labs. Drafted helps enterprises build and own specialized AI models trained on their proprietary data. They also work with frontier labs on expert data, evaluations, and post-training.


They're looking to meet CTOs, Chief AI Officers, Heads of AI, AI Product Managers, and AI Transformation Leads at large enterprises, as well as research and product leads at frontier AI labs. If you're in one of these roles or know someone who is, reply to this email, and I'll make an introduction.


The Agentic Engineering Playbook top engineers are using

Most engineers are stuck babysitting AI one prompt at a time. A handful have figured out how to build agents that plan, execute, and self-correct on their own. Sign up for The Code and get The Complete Playbook for Agentic Engineering. Claude Code, subagents, MCP, all of it.


News

PyCon US Talks, Tutorials, Charlas, and Poster CFPs are open until December 19, 2026.


Articles, Tutorials and Talks

An in-depth look at what makes Python's uv package manager slow, examining bottlenecks in dependency resolution, package installation, caching, network requests, and concurrency. Real-world benchmarks reveal how optimizations such as parallel prefetching, efficient data structures, and filesystem operations help uv achieve its speed while exposing remaining performance challenges.

An analysis of 354,763 PyPI projects found that 1,623 contain unguarded imports of standard library modules removed in Python 3.12 and 3.13, potentially causing compatibility failures. Among the 60,000 most downloaded projects, 852 are affected, including 544 that haven't been updated in over two years, highlighting the risks of abandoned dependencies.

Sebastian Raschka explains how LLMs represent token positions, covering learned absolute embeddings, sinusoidal encodings, and Rotary Position Embeddings (RoPE), with mathematical explanations and PyTorch implementations. He also examines how modern LLM architectures use partial RoPE, NoPE, and learned relative position biases, exploring their tradeoffs in efficiency and long-context performance.

This video explores how functional programming principles, such as pure functions and immutable data, improve Python code readability and testability. It also demonstrates the functional core, imperative shell pattern for separating business logic from infrastructure concerns.

PyPI has introduced stricter validation of uploaded Python source distributions and wheels to prevent archive parser inconsistencies that could allow malicious packages to bypass security checks. The changes restrict legacy tar formats and problematic ZIP comments, improving supply chain security while requiring minimal changes from most package maintainers.

Two malicious releases of Microsoft's agent-framework package on PyPI contained credential-stealing malware that executed automatically at Python startup through .pth files, targeting environment variables, cloud tokens, and CI/CD secrets. SafeDep detected both compromised versions shortly after publication, highlighting the risks of compromised package publishing access and malicious dependencies in Python's software supply chain.


The daily AI newsletter read by millions. TLDR AI is free, curated by engineers from OpenAI, Adobe, and Google DeepMind. It’s a 5-minute read, delivered every weekday morning.


Laurence Tratt demonstrates how CPython can be adapted to use the yk meta-tracing JIT compiler with fewer than 450 lines of additional code, improving execution performance. The experimental implementation outperforms standard CPython on 12 of 13 benchmarks and CPython's experimental JIT on 8 of 13, highlighting the potential of meta-tracing for Python optimization.

Alex Chan introduces funkycache, a Python library that uses decorators and SQLite to persist function results and automatically invalidate cached data when source code or dependencies change. It supports Pydantic serialization, configurable cache keys, and generator caching, reducing warm builds of his static website to approximately half a second.

Close reduced CI execution time for nearly 58,000 Python integration tests from approximately 12 minutes to 2.5 minutes by replacing static pytest test splitting with dynamically orchestrated workers. The system uses centralized job scheduling, AWS Spot Instances, and automatic work redistribution when workers are interrupted to improve test execution efficiency while maintaining similar infrastructure costs.

Learn how to identify and eliminate N+1 queries in Django using select_related(), prefetch_related(), and SQL profiling tools to reduce unnecessary database operations. A practical example demonstrates reducing query counts from 61 to 2, with additional guidance on optimizing serializers, avoiding over-fetching, and preventing regressions through automated tests.

ZAR introduces a Rust-based archive format with a native Python API, combining parallel Zstandard compression, content deduplication, versioned commits, encryption, and selective file restoration. In the author's benchmark, it compressed a 525 MiB source tree in 0.86 seconds versus 11 seconds for ZIP and 24.91 seconds for 7z, demonstrating substantial speed improvements.

Daniel Lemire demonstrates JSON processing speeds of up to 277 GB/s using Python 3.14's free-threaded build and the SIMD-accelerated fastsimdjson library on a 192-core server. Benchmarks show substantial performance improvements over conventional JSON parsers and multiprocessing approaches on several workloads, highlighting the potential of GIL-free multithreading for large-scale data processing.

Learn data structures and algorithms in Python in this beginner's course. This course covers arrays, linked lists, stacks, queues, hash tables, trees, heaps, and graphs, plus recursion, searching, sorting, and interview prep. Each topic is explained with custom animations and visualizations alongside Python code examples. By the end, you will understand how the most important data structures work inside and know when to use each one.


Interesting Projects, Tools, and Libraries

PaperOrchestra is a multi-agent framework for automated AI research paper writing.

A Claude Code skill bundle for bug hunting and external red-team work - 82 skills, 15 slash commands, 681 disclosed-report patterns curated across 24 core vulnerability classes, plus enterprise identity + infrastructure attack matrices.

Multi-tier framework for evaluating AI agent skills and plugins with quality gates, semantic overlap detection, synthetic evaluation dataset generation, and live agent evaluation that measures how skills affect agent behavior.

Durable, file-based long-term memory for AI agents. Five-package plugin family: SDK, CLI, MCP server, Hermes adapter, and a LangGraph BaseStore. No vector database, no embeddings.

AI agent skills to be professional at 2D and 3D.

Make your own app expensive to reverse. A build-time audit, harden and verify harness for native binaries and mobile apps, built to counter AI-assisted reverse engineering.

Compile annotated Python to native binaries. Typed subset, opt-in CPython fallback.

Open-source Python framework to build, simulate, train and deploy AI robots, with open hardware that runs UMI policies on any arm.

Pytml is a lightweight, open-source PyScript alternative that lets developers run Python directly in HTML using a single script tag, with support for DOM interaction, UI controls, and Python packages through Pyodide.

Authorization conformance harness for MCP servers: test a live server against your own policy, as every identity, and produce evidence an auditor can verify.


Upcoming Events and Webinars

There will be following talks

  • What's New in Contributing to Django?

  • Batteries-Included vs. Speed: The Django/FastAPI Debate

There will be a talk, Data analysis and visualisation with King.

There will be following talks

  • It's Not the Model, It's the User – From an AI Chat to Dark Factory

  • Nobody Clicked Anything: How a Hijacked LiteLLM Slipped In Through an AI Agent's Toolchain

There will be following talks

  • Modelling the mass movement of the population during evacuation

  • What is the average, actually?

  • Optimizing algorithms

There will be a talk, How to evaluate your first AI agent.

There will be following talks

  • Prototype first to ship with confidence: How a PM with design skills takes features from idea to GA

  • The Dark Side of LLMs: Why We Pretend Shadow AI Doesn't Exist

There will be a talk, Engineering Production-Ready AI Agents with LangGraph.

There will be a talk, Beyond the Prompt: Building Intelligent AI Agents for Real-World Applications.

There will be following talks

  • Beyond the Model: Jointly Optimising Hardware, Engines and Harnesses for Local Inference

  • The Grammar of Graphics - Bringing Sanity to Data Visualisation

There will be following talks

  • Metadata as Infrastructure

  • From Code to C-Level: Strategic Business Communication for Engineers

There will be following talks

  • PyLadies and Teaching Programming in the Age of AI

  • Shipping Code You Can Trust: A Practical Guide for Coding with AI


Our Other Newsletters

Programmer Weekly - A free weekly newsletter for programmers.

Founder Weekly - A free weekly newsletter for entrepreneurs featuring best curated content, must read articles, how to guides, tips and tricks, resources, events and more.