Python Weekly (Issue 721 November 6 2025)

Welcome to issue 721 of Python Weekly. Let's get straight to the links this week.

Choose the Right AI Tools

With thousands of AI tools available, how do you know which ones are worth your money? Subscribe to Mindstream and get our expert guide comparing 40+ popular AI tools. Discover which free options rival paid versions and when upgrading is essential. Stop overspending on tools you don't need and find the perfect AI stack for your workflow.


News

This PEP introduces syntax for lazy imports as an explicit language feature.

This PEP allows unpacking with and * inside list, set, and dict comprehensions and generator expressions. It makes flattening and merging in comprehensions more concise and flexible.


Articles, Tutorials and Talks

The video features an in-depth chat with Sebastián Ramírez, the creator of FastAPI, discussing how FastAPI became one of Python's fastest-growing frameworks, its focus on developer experience, the challenges of managing an open source project, and upcoming plans including FastAPI Cloud. Sebastián also shares personal stories on community management, handling criticism, and his views on education and software development.

Using background tasks to reliability execute signal receivers.

The video explains how the Context Object Pattern helps reduce repeated function arguments by grouping related data into a single object, simplifying function signatures and improving maintainability. It also discusses the trade-offs, like increased coupling, and suggests using Python protocols to keep code decoupled and testable, recommending context objects mainly for higher-level functions rather than low-level utilities.

The post explains how Python 3.14 introduces a safe, standardized way to debug live Python processes using the new sys.remote_exec API, enabling safe code injection and inspection without risking program stability. It provides examples of remotely injecting debug code into running processes, accessing variables, and even implementing REPL-like interactions for live debugging in production environments.

Run training and inference on fast, affordable cloud GPUs. No setup, no queues, just results. Sign up today and unlock a random credit bonus between $5 and $500. SPONSOR

The pots details the effort to make NumPy's test suite thread-safe for free-threaded Python by using the pytest-run-parallel plugin to run tests under multiple threads. It required fixing numerous thread-safety issues, especially around setup/teardown methods, global state like random number generation, and temporary file usage, sometimes marking tests as thread-unsafe when they couldn't be fixed. The project improved NumPy's ability to support multithreaded execution and ensured the test suite could run reliably in this context.

The video is a comprehensive tutorial on building a Django CRM from scratch, integrating Google Contacts syncing, time-series analytics with TimescaleDB, and production-ready automation using modern Python tools. It covers everything from setting up the Django project, implementing OAuth authentication, managing database models and relationships, to visualizing analytics with Chart.js and automating workflows with GitHub Actions.

The post explains best practices for optimizing filtered vector queries in PostgreSQL using the pgvector extension, reducing query times from tens of seconds to single-digit milliseconds. Key strategies include using HNSW vector indexes stored entirely in memory, applying post-filtering with iterative scans, structuring queries correctly with ORDER BY and LIMIT, simplifying WHERE conditions, and leveraging EXPLAIN ANALYZE to ensure efficient query planning and index usage.

Learn practical optimization hacks, from data structures to built-in modules, that boost speed, reduce overhead, and keep your Python code clean.

A practical journey through the challenges, decisions, and messy reality behind training state-of-the-art language models

A proposal for moving Django to an annual release cycle.


Interesting Projects, Tools, and Libraries

A lightweight vLLM implementation built from scratch.

Pipelex is developing the open standard for repeatable AI workflows. Write business logic, not API calls.

An opinionated Python framework offering modular architecture, type-safe dependency injection, and FastAPI-style routing to build scalable apps with minimal setup.

Write Arduino code in pure Python. Reduino transpiles Python scripts into efficient Arduino C++ and uploads automatically. A simple, intuitive way to control sensors, LEDs, and actuators without touching C++.

A versatile, production-ready Django project template for any use case Build SaaS applications, API backends, web apps, or internal tools with one template.

OCR model that handles complex tables, forms, handwriting with full layout.

A modern static site generator by the creators of Material for MkDocs.

Automate complex workflows by describing how you think through them.

A PyTorch library for solving imaging inverse problems using deep learning.


New Releases

The Django team released security updates for versions 5.2.8, 5.1.14, and 4.2.26 addressing two issues: a moderate-severity denial-of-service vulnerability in HttpResponseRedirect and related classes on Windows, and a high-severity SQL injection vulnerability via the _connector keyword in QuerySet and Q objects. Users are strongly encouraged to upgrade immediately to these patched versions to protect their applications.


Upcoming Events and Webinars

There will be following talks

  • Extending AI agents: Custom tools and Model Context Protocol

  • Durable Python

There will be following talks

  • Python 3.14 release - What's new?

  • Detection Engineering: From Origins to CI/CD-Driven Defense

There will be following talks

  • Modular LLM Architecture

  • Vietnamese to English Slang Converter Python App

There will be following talks

  • Data-Driven Batteries: Modeling State of Charge and Health from Operational Data

  • Stochastic Models in Energy Storage Operating Environments

  • ArviZ 1.0: Refactoring for flexibility, extensibility, and power

  • Python Visualisation Tools

There will be following talks

  • Faireness and Inclusivity in AI Systems

  • Building a price comparison website using AI

There will be a talk, Building a Chat Agent Using Chainlit.


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.