Planet Python
Last update: November 23, 2025 10:43 AM UTC
November 22, 2025
Daniel Roy Greenfeld
TIL: Default code block languages for mkdocs
Really useful for making inline code examples have code highlighting.
November 22, 2025 12:08 PM UTC
Brett Cannon
Should I rewrite the Python Launcher for Unix in Python?
I want to be upfront that this blog post is for me to write down some thoughts that I have on the idea of rewriting the Python Launcher for Unix from Rust to pure Python. This blog post is not meant to explicitly be educational or enlightening for others, but
November 22, 2025 12:18 AM UTC
Bruno Ponne / Coding The Past
Data Science Quiz For Humanities
Test your skills with this interactive data science quiz covering statistics, Python, R, and data analysis.
November 22, 2025 12:00 AM UTC
Stéphane Wirtel
Claude Code : comment un assistant IA m'a fait gagner des jours de développement
TL;DR
Après une semaine d’utilisation intensive de Claude Code1 pendant PyCon Ireland et sur mes projets personnels, je suis complètement bluffé par les gains de productivité. L’outil m’a permis de migrer automatiquement le site Python Ireland de Django 5.0 vers 5.2 et Wagtail 6.2 vers 7.2, de développer un outil de conversion de livres scannés en 5 minutes, et de générer une documentation complète en quelques minutes. Contrairement à Cursor ou Windsurf, Claude Code s’intègre partout (PyCharm, VS Code, Zed, Neovim, ligne de commande), ce qui en fait un véritable game changer pour les développeurs professionnels.
November 22, 2025 12:00 AM UTC
Armin Ronacher
LLM APIs are a Synchronization Problem
November 22, 2025 12:00 AM UTC
November 21, 2025
Trey Hunner
Python Morsels Lifetime Access Sale
November 21, 2025 10:42 PM UTC
Tryton News
Security Release for issue #14366
Cédric Krier has found that trytond does not enforce access rights for data export (since version 6.0).
Impact
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low
- User Interaction: None
- Scope: Unchanged
- Confidentiality: High
- Integrity: None
- Availability: None
Workaround
There is no workaround.
Resolution
All affected users should upgrade trytond to the latest version.
Affected versions per series:
trytond:- 7.6: <= 7.6.10
- 7.4: <= 7.4.20
- 7.0: <= 7.0.39
- 6.0: <= 6.0.69
Non affected versions per series:
trytond:- 7.6: >= 7.6.11
- 7.4: >= 7.4.21
- 7.0: >= 7.0.40
- 6.0: >= 6.0.70
Reference
Concerns?
Any security concerns should be reported on the bug-tracker at https://bugs.tryton.org/ with the confidential checkbox checked.
1 post - 1 participant
November 21, 2025 03:00 PM UTC
Security Release for issue #14363
Abdulfatah Abdillahi has found that sao does not escape the completion values. The content of completion is generally the record name which may be edited in many ways depending on the model. The content may include some JavaScript which is executed in the same context as sao which gives access to sensitive data such as the session.
Impact
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low
- User Interaction: Required
- Scope: Unchanged
- Confidentiality: High
- Integrity: High
- Availability: None
Workaround
There is no general workaround.
Resolution
All affected users should upgrade sao to the latest version.
Affected versions per series:
sao:- 7.6: <= 7.6.10
- 7.4: <= 7.4.20
- 7.0: <= 7.0.39
- 6.0: <= 6.0.68
Non affected versions per series:
sao:- 7.6: >= 7.6.11
- 7.4: >= 7.4.21
- 7.0: >= 7.0.40
- 6.0: >= 6.0.69
Reference
Concerns?
Any security concerns should be reported on the bug-tracker at https://bugs.tryton.org/ with the confidential checkbox checked.
1 post - 1 participant
November 21, 2025 03:00 PM UTC
Security Release for issue #14364
Mahdi Afshar has found that trytond does not enforce access rights for the route of the HTML editor (since version 6.0).
Impact
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low
- User Interaction: None
- Scope: Unchanged
- Confidentiality: High
- Integrity: Low
- Availability: None
Workaround
A possible workaround is to block access to the html editor.
Resolution
All affected users should upgrade trytond to the latest version.
Affected versions per series:
trytond:- 7.6: <= 7.6.10
- 7.4: <= 7.4.20
- 7.0: <= 7.0.39
- 6.0: <= 6.0.69
Non affected versions per series:
trytond:- 7.6: >= 7.6.11
- 7.4: >= 7.4.21
- 7.0: >= 7.0.40
- 6.0: >= 6.0.70
Reference
Concerns?
Any security concerns should be reported on the bug-tracker at https://bugs.tryton.org/ with the confidential checkbox checked.
1 post - 1 participant
November 21, 2025 03:00 PM UTC
Security Release for issue #14354
Mahdi Afshar and Abdulfatah Abdillahi have found that trytond sends the trace-back to the clients for unexpected errors. This trace-back may leak information about the server setup.
Impact
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low
- User Interaction: None
- Scope: Unchanged
- Confidentiality: Low
- Integrity: None
- Availability: None
Workaround
A possible workaround is to configure an error handler which would remove the trace-back from the response.
Resolution
All affected users should upgrade trytond to the latest version.
Affected versions per series:
trytond:- 7.6: <= 7.6.10
- 7.4: <= 7.4.20
- 7.0: <= 7.0.39
- 6.0: <= 6.0.69
Non affected versions per series:
trytond:- 7.6: >= 7.6.11
- 7.4: >= 7.4.21
- 7.0: >= 7.0.40
- 6.0: >= 6.0.70
Reference
Concerns?
Any security concerns should be reported on the bug-tracker at https://bugs.tryton.org/ with the confidential checkbox checked.
2 posts - 2 participants
November 21, 2025 03:00 PM UTC
Django Weblog
DSF member of the month - Akio Ogasahara
For November 2025, we welcome Akio Ogasahara as our DSF member of the month! ⭐
Akio is a technical writer and systems engineer. He contributed to the Japanese translation for many years. He has been a DSF member since June 2025. You can learn more about Akio by visiting Akio's X account and his GitHub Profile.
Let’s spend some time getting to know Akio better!
Can you tell us a little about yourself (hobbies, education, etc.)
I was born in 1986 in Rochester, Minnesota, to Japanese parents, and I’ve lived in Japan since I was one. I’ve been fascinated by machines for as long as I can remember. I hold a master’s degree in mechanical engineering. I’ve worked as a technical writer and a software PM, and I’m currently in QA at a Japanese manufacturer.
I'm curious, where does your nickname “libratech” come from?
I often used “Libra” as a handle because the symbol of Libra—a balanced scale—reflects a value I care deeply about: fairness in judgment. I combined that with “tech,” from “tech writer,” to create “libratech.”
How did you start using Django?
Over ten years ago, I joined a hands-on workshop using a Raspberry Pi to visualize sensor data, and we built the dashboard with Django. That was my first real experience.
What other framework do you know and if there is anything you would like to have in Django if you had magical powers?
I’ve used Flask and FastAPI. If I could wish for anything, I’d love “one-click” deployment that turns a Django project into an ultra-lightweight app running on Cloudflare Workers.
What projects are you working on now?
As a QA engineer, I’m building Pandas pipelines for quality-data cleansing and creating BI dashboards.
What are you learning about these days?
I’m studying for two Japanese certifications: the Database Specialist exam and the Quality Control Examination (QC Kentei).
Which Django libraries are your favorite (core or 3rd party)?
Django admin, without question. In real operations, websites aren’t run only by programmers—most teams eventually need CRM-like capabilities. Django admin maps beautifully to that practical reality.
What are the top three things in Django that you like?
- Django admin
- Strong security
- DRY by design
You have contributed a lot on the Japanese documentation, what made you contribute to translate for the Japanese language in the first place?
I went through several joint surgeries and suddenly had a lot of time. I’d always wanted to contribute to open source, but I knew my coding skills weren’t my strongest asset. I did, however, have years of experience writing manuals—so translation felt like a meaningful way to help.
Do you have any advice for people who could be hesitant to contribute to translation of Django documentation?
Translation has fewer strict rules than code contributions, and you can start simply by creating a Transifex account. If a passage feels unclear, improve it! And if you have questions, the Django-ja translation team is happy to help on our Discord.
I know you have some interest in AI as a technical writer, do you have an idea on how Django could evolve with AI?
Today’s AI is excellent at working with existing code—spotting N+1 queries or refactoring SQL without changing behavior. But code written entirely by AI often has weak security. That’s why solid unit tests and Django’s strong security guardrails will remain essential: they let us harness AI’s creativity safely.
Django is celebrating its 20th anniversary, do you have a nice story to share?
The surgeries were tough, but they led me to documentation translation, which reconnected me with both English and Django. I’m grateful for that path.
What are your hobbies or what do you do when you’re not working?
Outside of computers, I enjoy playing drums in a band and watching musicals and stage plays! 🎵
Is there anything else you’d like to say?
If you ever visit Japan, of course sushi and ramen are great—but don’t miss the sweets and ice creams you can find at local supermarkets and convenience stores! They’re inexpensive, come in countless varieties, and I’m sure you’ll discover a new favorite!🍦
Thank you for doing the interview, Akio !
November 21, 2025 01:00 PM UTC
Real Python
The Real Python Podcast – Episode #275: Building a FastAPI Application & Exploring Python Concurrency
What are the steps to get started building a FastAPI application? What are the different types of concurrency available in Python? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder's Weekly articles and projects.
November 21, 2025 12:00 PM UTC
Armin Ronacher
Agent Design Is Still Hard
November 21, 2025 12:00 AM UTC
November 20, 2025
Brett Cannon
The varying strictness of TypedDict
I was writing some code where I was using httpx.get() and its params parameter. I decided to use a TypedDict for the dictionary I was passing as the argument since it was for a REST API, where the potential keys were fully known. I then ran Pyrefly over my
November 20, 2025 09:18 PM UTC
November 19, 2025
Django Weblog
Twenty years of Django releases
On November 16th 2005, Django co-creator Adrian Holovaty announced the first ever Django release, Django 0.90. Twenty years later, today here we are shipping the first release candidate of Django 6.0 🚀.
Since we’re celebrating Django’s 20th birthday this year, here are a few release-related numbers that represent Django’s history:
- 447 releases over 20 years. That’s about 22 per year on average. We’re at 38 so far for 2025. Fun fact: 33 of those releases predate PyPI, and were published via the Django website only!
- 131 security vulnerabilities addressed in those Django releases. Our security issues archive is a testament to our stellar track-record.
- 262,203 releases of Django-related packages. Django’s community ecosystem is gigantic. There’s tens of releases of Django packages per day as of 2025. There were 52 just today. With the caveat this depends a lot on what you classify as a "Django" package.
This is what decades’ worth of a stable framework looks like. Expect more gradual improvements and bug fixes over the next twenty years’ worth of releases. And if you like this kind of data, check out the State of Django 2025 report by JetBrains, with lots of statistics on our ecosystem (and there’s a Get PyCharm Pro with 30 % Off & Support Django offer).
Support Django
If you or your employer counts on Django’s 20 years of stability, consider whether you can support the project via donations to our non-profit Django Software Foundation.
Once you’ve done it, post with #DjangoBirthday and tag us on Mastodon / on Bluesky / on X / on LinkedIn so we can say thank you!
Of our US $300,000.00 goal for 2025, as of November 19th, 2025, we are at:
- 58.7% funded
- $176,098.60 donated
November 19, 2025 03:27 PM UTC
Real Python
Build a Python MCP Client to Test Servers From Your Terminal
Follow this Python project to build an MCP client that discovers MCP server capabilities and feeds an AI-powered chat with tool calls.
November 19, 2025 02:00 PM UTC
PyCharm
At JetBrains, we love seeing the developer community grow and thrive. That’s why we support open-source projects that make a real difference — the ones that help developers learn, build, and create better software together. We’re proud to back open-source maintainers with free licenses and to contribute to initiatives that strengthen the ecosystem and the […]
November 19, 2025 01:40 PM UTC
Django Weblog
Django 6.0 release candidate 1 released
Django 6.0 release candidate 1 is now available. It represents the final opportunity for you to try out a mosaic of modern tools and thoughtful design before Django 6.0 is released.
The release candidate stage marks the string freeze and the call for translators to submit translations. Provided no major bugs are discovered that can't be solved in the next two weeks, Django 6.0 will be released on or around December 3. Any delays will be communicated on the on the Django forum.
Please use this opportunity to help find and fix bugs (which should be reported to the issue tracker), you can grab a copy of the release candidate package from our downloads page or on PyPI.
The PGP key ID used for this release is Natalia Bidart: 2EE82A8D9470983E
November 19, 2025 12:00 PM UTC
Real Python
Quiz: Build a Python MCP Client to Test Servers From Your Terminal
Learn how to create a Python MCP client, start an AI-powered chat session, and run it from the command line. Check your understanding.
November 19, 2025 12:00 PM UTC
Django Weblog
Going build-free with native JavaScript modules
For the last decade and more, we've been bundling CSS and JavaScript files. These build tools allowed us to utilize new browser capabilities in CSS and JS while still supporting older browsers. They also helped with client-side network performance, minimizing the content to be as small as possible and combining files into one large bundle to reduce network handshakes. We've gone through a lot of build tools iterations in the process; from Grunt (2012) to Gulp (2013) to Webpack (2014) to Parcel (2017) to esbuild (2020) and Vite (2020).
And with modern browser technologies there is less need for these build tools.
- Modern CSS supports many of the features natively that the build tools were created for. CSS nesting to organize code, variables, @supports for feature detection.
- JavaScript ES6 / ES2015 was a big step forward, and the language has been progressing steadily ever since. It now has native module support with the import / export keywords
- Meanwhile, with HTTP/2 performance improvements, parallel requests can be made over the same connection, removing the constraints of the HTTP/1.x protocol.
These build processes are complex, particularly for beginners to Django. The tools and associated best practices move quickly. There is a lot to learn and you need to understand how to utilize them with your Django project. You can build a workflow that stores the build results in your static folder, but there is no core Django support for a build pipeline, so this largely requires selecting from a number of third party packages and integrating them into your project.
The benefit this complexity adds is no longer as clear cut, especially for beginners. There are still advantages to build tools, but you can can create professional results without having to use or learn any build processes.
Build-free JavaScript tutorial
To demonstrate modern capabilities, let's expand Django’s polls tutorial with some newer JavaScript. We’ll use modern JS modules and we won’t require a build system.
To give us a reason to need JS let's add a new requirement to the polls; to allow our users to add their own suggestions, instead of only being able to vote on the existing options. We update our form to have a new option under the selection code:
or add your own <input type="text" name="choice_text" maxlength="200" />
Now our users can add their own options to polls if the existing ones don't fit. We can update our voting view to handle this new option, with more validation:
- If there is no vote selection we handle adding the new option
- If there is no vote selection nor a new
choice_text, we show an error - Also show an error if both are selected.
With our logic getting more complex it would be nicer if we had some JavaScript to do this. We can build a script that handles some of the form validation for us.
// Note the "export default" to make this function available for other modules.
export default function initFormValidation() {
document.getElementById("polls").addEventListener("submit", function (e) {
const choices = this.querySelectorAll('input[name="choice"]');
const choiceText = this.querySelector('input[name="choice_text"]');
const hasChecked = [...choices].some(r => r.checked);
const hasText = choiceText?.value.trim() !== "";
if (!hasChecked && !hasText) {
e.preventDefault();
alert("You didn't select a choice or provide a new one.");
}
if (hasChecked && hasText) {
e.preventDefault();
alert("You can't select a choice and also provide a new option.");
}
});
}
Note how we use export default in the above code. This means form_validation.js is a JavaScript module. When we create our main.js file, we can import it with the import statement:
import initFormValidation from "./form_validation.js";
initFormValidation();
Lastly, we add the script to the bottom of our details.html file, using Django’s usual static template tag. Note the type="module" this is needed to tell the browser we will be using import/export statements.
<script type="module" src="{% static 'polls/js/main.js' %}"></script>
That’s it! We got the modularity benefits of modern JavaScript without needing any build process. The browser handles the module loading for us. And thanks to parallel requests since HTTP/2, this can scale to many modules without a performance hit.
In production
To deploy, all we need is Django's support for collecting static files into one place and its support for adding hashes to filenames. In production it is a good idea to use ManifestStaticFilesStorage storage backend. It stores the file names it handles by appending the MD5 hash of the file’s content to the filename. This allows you to set far future cache expiries, which is good for performance, while still guaranteeing new versions of the file will make it to users’ browsers.
This backend is also able to update the reference to form_validation.js in the import statement, with its new versioned file name.
Future work
ManifestStaticFilesStorage works, but a lot of its implementation details get in the way. It could be easier to use as a developer.
- The support for
import/exportwith hashed files is not very robust. - Comments in CSS with references to files can lead to errors during collectstatic.
- Circular dependencies in CSS/JS can not be processed.
- Errors during collectstatic when files are missing are not always clear.
- Differences between implementation of StaticFilesStorage and ManifestStaticFilesStorage can lead to errors in production that don't show up in development (like #26329, about leading slashes).
- Configuring common options means subclassing the storage when we could use the existing OPTIONS dict.
- Collecting static files could be faster if it used parallelization (pull request: #19935 Used a threadpool to parallelise collectstatic)
We discussed those possible improvements at the Django on the Med 🏖️ sprints and I’m hopeful we can make progress.
I built django-manifeststaticfiles-enhanced to attempt to fix all these. The core work is to switch to a lexer for CSS and JS, based on Ned Batchelder’s JsLex that was used in Django previously. It was expanded to cover modern JS and CSS by working with Claude Code to do the grunt work of covering the syntax.
It also switches to using a topological sort to find dependencies, whereas before we used a more brute force approach of repeated processing until we saw no more changes, which lead to more work, particularly on storages that used the network. It also meant we couldn't handle circular dependencies.
To validate it works, I ran a performance benchmark on 50+ projects, it’s been tested issues and with similar (often improved) performance. On average, it’s about 30% faster.
While those improvements would be welcome, do go ahead with trying build-free JavaScript and CSS in your Django projects today! Modern browsers make it possible to create great frontend experiences without the complexity.
November 19, 2025 08:13 AM UTC
Python GUIs
Getting Started With DearPyGui for GUI Development — Your First Steps With the DearPyGui Library for Desktop Python GUIs
Getting started with a new GUI framework can feel daunting. This guide walks you through the essentials of DearPyGui. From installation and first app to widgets, layouts, theming, and advanced tooling.
November 19, 2025 08:00 AM UTC
November 18, 2025
The Python Coding Stack
I Don’t Like Magic • Exploring The Class Attributes That Aren’t Really Class Attributes • [Club]
This syntax, used for data classes and typing.NamedTuple, confused me when first learning about these topics. Here’s why, and why it’s no longer confusing.
November 18, 2025 10:01 PM UTC
PyCoder’s Weekly
Issue #709: deepcopy(), JIT, REPL Tricks, and More (Nov. 18, 2025)
November 18, 2025 07:30 PM UTC
Real Python
Break Out of Loops With Python's break Keyword
Learn how Python’s break lets you exit for and while loops early, with practical demos from simple games to everyday data tasks.
November 18, 2025 02:00 PM UTC
Mike Driscoll
Black Friday Python Deals Came Early
Black Friday deals came early this year. You can get 50% off of any of my Python books or courses until the end of November. You can use this coupon code at checkout: BLACKISBACK The following links already have the discount applied: Python eBooks Python 101 Python 201: Intermediate Python The Python Quiz Book Automating […]
The post Black Friday Python Deals Came Early appeared first on Mouse Vs Python.
