social.dk-libre.fr is a Fediverse instance that uses the ActivityPub protocol. In other words, users at this host can communicate with people that use software like Mastodon, Pleroma, Friendica, etc. all around the world.
This server runs the snac software and there is no automatic sign-up process.
🐍💻 Bandit helps keep Python applications secure, and it’s one of the PSF’s Fiscal Sponsorees! When you donate, you’re supporting the devs & maintainers behind tools that make #Python safer and stronger for everyone.
💛 donate today: https://psfmember.org/civicrm/contribute/transact/?reset=1&id=42
🐍🚀 Out now: pylast 7.3.0
* Add support for Python 3.16
* Add functionality and CLI to export all your scrobbles:
python -m pylast export your_username
https://github.com/pylast/pylast#exporting-your-scrobbles
⚠️ But grab an API key and do it before 1st December:
https://support.last.fm/t/api-keys-will-require-pro-from-1st-december/121030
Working on renaming and updating a few odds and ends with another ancient, small #programming project of mine. It's a wireless password generator script written in #Python. I wrote it ages ago before routers started building the functionality in, but I figure it might be a good idea to keep it around anyway as a just-in-case. I used to even include easygui to draw simple graphical windows, but realized it was unnecessary for something this straight forward.
📞 PyCon CZ 2027 is calling for proposals!
Come share your ideas with the Czech Python community in Pilsen, 16–18 April 2027!
🐍 We're looking for talks and workshops on Python, web development, data science, AI, community building and more.
Beginner-friendly topics and first-time speakers are welcome! Mentorship, financial assistance and free childcare available.
📅 Deadline: 17 January 2027, 23:59 AoE
Submit your proposal: https://cz.pycon.org/2027/cfp/
Adopting Python 3.15's lazy imports: a 4× faster CLI, and where they didn't help
Compute! Paris is a new annual conference for open source computation and data, and Project Jupyter will be there on Nov 25–26. Thanks to the organizing team for bringing it together.
Fernando Pérez gives the opening keynote. Planet Jupyter is a full track on the Jupyter ecosystem. A sprint and dev all-hands follow for anyone who wants to build with us.
Join us in person! Sign up here: https://compute.events/paris2026/
#Compute #Jupyter #OpenSource #Python #DataScience #TechConf #Paris
you've missed #swisspythonsummit 2026? no problem: you can now watch the talks online: https://media.ccc.de/search/?q=swiss+python+summit+2026
enjoy 🍿
#pyladies #python #conference
🐍 IT'S HAPPENING!!
PyCon Sweden 2026 is officially open! 🎉
So many Pythonistas, all in one place, two days — let's go Stockholm! 🇸🇪💙💛
See you in the hallways ✨
New post in the Muru series: a toolbar on every page.
Under muructl run, Muru can add a development toolbar to each HTML page, with the record it kept of the request behind it: its timings, what it logged, any error, and every request the page went on to make. Nothing is installed into the application, so it works the same for Flask, Django or any WSGI or ASGI app, and since Muru keeps the records itself, it works across multiple worker processes.
https://grahamdumpleton.me/posts/2026/11/muru-a-toolbar-on-every-page/
Wanna know which supreme leader gets to read your email? #moreHomework
Python Tip #323 (of 365):
You're allowed to rely on dictionary order.
>>> fruit_counts = {"apple": 2, "banana": 4, "mango": 1}
>>> for fruit in fruit_counts:
... print(fruit)
...
apple
banana
mango
Dictionaries maintain the insertion order of their keys.
🧵 (1/3)
🎉 Congratulations to this year's Malcolm Tredinnick Memorial Prize award winner, @raffaellasuardini
Excellent job, and our community is all the better because of your efforts.
https://www.djangoproject.com/weblog/2026/nov/19/malcolm-prize-awarded-to-raffaella-suardini/
“Python's textwrap module has a wrap function for wrapping text.”
Read more 👉 https://pym.dev/wrapping-text/
«A Gopher server in 9 lines of Python»
There is no better way to learn a specification than implementing it.
https://en.andros.dev/blog/cf3110ec/a-gopher-server-in-9-lines-of-python/
PSF grants have helped #Python communities worldwide grow for over a decade! 🌍
This year, the community helped us reopen grants for a special funding round. Help us bring back more grants in 2027 with your donations and memberships 💝
Donate today: https://donate.python.org/
https://docs.python.org/3/whatsnew/3.15.html
It's already been a couple of days but I just got around to reading the release notes.
I'm most excited about https://docs.python.org/3/whatsnew/3.15.html#pep-798-unpacking-in-comprehensions - the weird double comprehensions has _always_ given me a headache!
Python Tip #322 (of 365):
Remove a key that might not exist with a default pop value.
Do this:
session.pop("username", None)
Not this:
if "username" in session:
del session["username"]
The dictionary pop method deletes a key and returns its value. Like "del", it raises a KeyError for a missing key:
>>> rooms = {"Pink": "Room 403", "Ocean": "Room 205"}
>>> rooms.pop("Garden")
Traceback (most recent call last):
...
KeyError: 'Garden'
🧵 (1/3)
New post in the Muru series: noticing and responding.
Conditions watch Muru's own figures, such as the share of requests from AI crawlers or the health of a payment service, and can trigger an overlay that responds while the condition holds and ends once it is over, leaving nothing to change back.
It also covers a trap where a response hides its own cause from the condition that triggered it.
https://grahamdumpleton.me/posts/2026/11/muru-noticing-and-responding/
GitHub will block pull_request_target by default in public repos on Dec 2. It runs with your secrets, so workflows running fork PR code can expose them. Background and guidance is on the Alpha-Omega blog; our post has the overview: https://pyfound.blogspot.com/2026/11/de-fanging-dangerous-triggers-in-github.html #Python #Security #SupplyChain
🍵
boostedHey Fedi,
I am losing my #job . I have been applying for positions but the search is not going well for now. If you know anyone who is hiring please do let me know.
I am a self taught #programmer with 10-ish years experience. I have lots of experience in #python , but also in #webdev #fullstackdeveloper . I am available starting next month in Germany or remote.
If you don't know, please boost for reach?
#jobsuche #jobsearch
The PSF’s Developer in Residence program has a real impact on #Python #security. Targeted funding often covers the roles, but not the less visible supporting roles behind their success. Your donations and memberships keep our DiRs hands-on where they are needed.
Donate today: https://donate.python.org/
🐍 Tomorrow is the day!!
Stockholm, we're coming for you 🇸🇪
If you're joining us at Clarion Hotel — your bags are (hopefully) packed, your schedule is starred, and your brain is ready for two days of Python, people, and good vibes ✨
See you tomorrow! We have an opening at 9:00 AM — don't be late, our speakers aren't waiting for you to find parking 😄
Can't wait to see you all there 💙💛
January 2016. Almost 11 years ago since I started using a vintage #PenPlotter to learn #Python to keep my programming skills sharp.
This is a video from January 2016 using a HP 7470A drawing a "zentangle."
The way PyPI claims packages not built at e.g. github or google but on your on infrastructure are "insecure" IMHO runs counter to where we should be going as an open-source ecosystem. Discriminating against e.g. self-hosted #forgejo or platforms like #codeberg in favor of github and google is a bad look in 2026.
New post in the Muru series: overlays on a schedule.
A read-only hour for the nightly backup, a maintenance page on Saturday night, a new release at 9am on Monday. Each change is meant to last a while, and usually lives in a cron job or in someone's memory.
Muru lays changes like these over a site's configuration, by hand or on a schedule, and takes them away afterwards. A timed cutover is skipped if the new release fails its health check.
https://grahamdumpleton.me/posts/2026/11/muru-overlays-on-a-schedule/
Part 2/2 of my CPython internals series is out! 🐍
Part 1 followed Python source into tokens. This final article picks up at the PEG parser and follows the AST, symbol tables, code generation, optimisations, bytecode, and the evaluation loop.
All to explain how 3 lines of Python end up printing `42`. Includes CPython source references and commands you can try yourself.
https://veldakiara.com/blog/how-cpython-compiles-and-runs-python-code/
Python Tip #321 (of 365):
Loop over dictionary keys explicitly with keys().
>>> counts = {"computers": 2, "cats": 1, "ducks": 3}
>>> for name in counts.keys():
... print(name)
...
computers
cats
ducks
Looping over a dictionary gives keys (see tip #45), so that keys method call is unnecessary.
It isn't meaningfully slower: keys returns a view, not a copy.
https://mastodon.social/@treyhunner/116070603866714422
🧵 (1/2)
What's New in Python 3.15:
resource
* Add new constants: RLIMIT_NTHR, RLIMIT_UMTXP, RLIMIT_THREADS, RLIM_SAVED_CUR, and RLIM_SAVED_MAX. (Contributed by Serhiy Storchaka.)
As we close out 2026, the PSF is running our annual fundraiser with an important message: Python is for everyone 💛🐍🌏💙
Your support helps keep #Python open & thriving for everyone, including our 20 incredible Fiscal Sponsorees!
Donate today 👉 https://linktr.ee/thepsf
🐍🚀 Out now: PrettyTable 3.19.0
Displays tabular data in a ASCII table format.
💧 Drop EOL Python 3.10
🔧 Fix a couple of bugs, one a regression in 3.18.0
https://github.com/prettytable/prettytable/releases/tag/3.19.0
Non-user facing stuff:
🔒 Lock GitHub Actions: https://hugovk.dev/blog/2026/lock-github-actions/
〰️ Use ubuntu-slim for lightweight jobs
🪢 prek priorities for parallel performance
🏎️ Faster mypy and coverage.py
Just released! 🚀
🪑 PrettyTable 3.17.0
https://github.com/prettytable/prettytable/releases/tag/3.17.0
Add support for Python 3.15, drop 3.9, test 3.13t-3.15t
Set dicts with column-specific config for all column-specific attrs
Update type hints
Replace pre-commit with prek
& more!
🐍🚀 Out now: Python 3.15 alpha 7!
This is the first one with lazy imports (PEP 810) and frozendict (PEP 814)! Try it out and give us feedback.
https://discuss.python.org/t/python-3-15-0-alpha-7/106475
☃️ Just one alpha left until the feature freeze! Core team: get your PEPs in!
#Python #Python315 #release PEP810 #LazyImports #PEP814 #frozendict
🐍🚀 Out now: the final 3.15 beta, live from the #EuroPython sprints!
All the same goodies as beta 3, plus the official macOS installer now also installs the free-threaded `python3.15t` binary.
And thanks to 3.16 RM @savannah for helping out!
https://discuss.python.org/t/python-3-15-0-beta-4-is-here/108208
New post in the Muru series: scaling to zero.
Most Python web servers keep every worker they start, so a server hosting small sites and previews holds memory for applications nobody is using.
The Muru daemon first drops an idle release to no workers, keeping the host that has already imported the app, so waking it only needs a fork. When memory matters more, the host stops too.
https://grahamdumpleton.me/posts/2026/11/muru-scaling-to-zero/
Python Tip #320 (of 365):
Use "in" to check whether a dictionary has a key.
Don't use the get method when you really need a containment check.
Do this:
if color not in quantities:
print(f"Uh oh! There's no value for {color}")
Not this:
if not quantities.get(color):
print(f"Uh oh! There's no value for {color}")
More on this:
https://pym.dev/using-dictionaries-in-python/#key-check
🧵 (1/3)
I wrote a tool to grade you email domain setup… in Django! :)
how do you score?
Progéniture commence Python (en maths... bon) et le prof leur fait faire direct des fonctions !! C'est courant de faire ça en maths ? parce que moi, les fonctions, je ne les introduis qu'après bcp d'autres notions (comme les variables, les types, les listes, voir les fichiers...). Ca n'a pas l'air de géner Progéniture, mais à la fois, c'est Progéniture... Je me demande si c'est ok pour les débutant·es de faire ça (je veux dire, s'iels arrivent à comprendre le concept). Des idées ?
#python #computerscience
Episode 41 of @RuntimeArguments is live at RuntimeArguments.fm: "Efficiency at Any Scale, with Marlon Dutra". Our first-ever guest! Longtime friend Marlon Dutra of Meta, whom Jim @jammcq met on IRC back in the LTSP days, leads a practical tour of software efficiency, and his case is that it isn't just for huge systems: your code may run on a five-year-old phone, in a car for decades, or up a cloud bill. Efficiency also isn't performance. Make something 20% slower and 10x cheaper, and if nobody notices, that's a win. Measure first (even a text file beats no data), then CPU (big O, hot paths, profilers, CPU time vs. wall time), memory (by Marlon's rough count, about 75% of the cost of a server rack, plus cache lines and locality), I/O (N+1 queries, Parquet, SSD wear) and networking (batch your round trips, and back off exponentially so your retries don't take down your own servers). Wolf @YesJustWolf brings a story of profiling an accidentally quadratic docs build that dropped from 20 minutes to 24 seconds. Marlon's five-line code examples are on our GitHub: https://github.com/Runtime-Arguments/efficiency. Also: the show has passed 5,000 downloads. Thank you for listening!
As always, we want to know what you think:
feedback@RuntimeArguments.fm
https://www.buzzsprout.com/2469780/episodes/20098898
#SoftwareEfficiency #Performance #Profiling #BigO #CloudCosts #Python #Parquet #Networking #SoftwareEngineering #Programming #SoftwareDevelopment #TechPodcast
Since 2015, the PSF Grants Program has awarded $3M+ to support Pythonistas worldwide. Thanks to you, we reopened in 2026 for a special funding round. Help us bring back more grants in 2027 with donations & memberships 💛💙
Read grantee stories and donate: https://donate.python.org/
Please I want some more feminine & non-binary energy in my #django / #python "blogs to check out" list --> drop rec's??
It's fine to link your own blog and bonus points if self-promotion usually gives you the ick: I explicitly want to hear from you quieter folks lurking around in the django/python communities too.
Also definitely no need to be an exclusively technical blog either; we humans are multi-faceted after all <3
NEF File Manager 1.2 ist da! 🎉
Neu u. a.:
• Admin-Modus: ein Lister bekommt für eine Weile Root-Rechte
• Markdown- & Mermaid-Vorschau
• Flat View: Dateien aus allen Unterordnern in einer Liste
• PDF: Text markieren, durchsuchen, auf Seitenbreite zoomen
• Oberflächensprache in den Einstellungen wählbar
• Viele Fixes, besonders für Windows
Je viens de libérer 33Go d'espace sur mon disque dur en faisant `rm -rf ~/.virtualenvs`
Le virtualenv le plus ancien datait de 2013
RE: https://mastodon.social/@sirosen/117624411098782316
📢 @sirosen just cut a new release of #pip_tools — v7.7.0! It's the first one shipped from its new home under the #PyPA 🎉
$ python3.15 -Im pip install --upgrade pip-tools
🎷➡️ 📦 I wrote up how we moved it out of Jazzband: https://webknjaz.me/prose/pip-tools-moves-to-pypa/
🕰️ And you can find Stephen's account of this at https://sirosen.net/2026/11/15/pip-tools-770.html
📝 https://pip-tools.pypa.io/en/stable/changelog/
🔏 https://pypi.org/project/pip-tools/7.7.0/
🐍 #Python 📦 #Packaging
👥 https://github.com/sponsors/sirosen / https://github.com/sponsors/webknjaz 💰
Yo! pip-tools v7.7.0 is here. It is good. it fixes bugs and it drops old Python and pip versions. It continues to work. It does the same thing it has done for years.
If you want to read about it, I wrote up a retrospective: https://sirosen.net/2026/11/15/pip-tools-770.html
And @webknjaz has one as well:
https://webknjaz.me/prose/pip-tools-moves-to-pypa/We're out here, trying to build friendships and community and software that lasts.
New post: Muru: scaling from what the workers report.
Adding workers when they are all busy isn't new. What the Muru daemon adds is a diagnosis of why requests are waiting, from what the workers report, which can say the answer is more threads, fewer threads because of the GIL, less garbage, not blocking the event loop, or a worker group for one slow endpoint.
https://grahamdumpleton.me/posts/2026/11/muru-scaling-from-what-the-workers-report/
Python Tip #319 (of 365):
Name your regular expression capture groups.
Capture groups are neat, but it can be confusing figuring out what the group numbers represent:
>>> match = re.search(r"(\d{2})/(\d{2})/(\d{4})", "from 12/22/1629")
>>> match[3]
'1629'
🧵 (1/3)
The next #PyData #Helsinki #meetup is on Tuesday, 24 November 2026 at Sievo, right next to the Helsinki Central railway station.
We'll hear how you model the mass movement of a population during an evacuation, why "the average" is a trickier question than it looks, and how to make your algorithms faster, plus one more talk still to be announced.
And as always, the PyData Helsinki #quiz will not leave us alone.
#DataScience #Python #Algorithms
https://pydata-helsinki.fi/events/2026-11-24-sievo/?utm_source=fediverse
Who's using the walrus operator in #Python lately?
If you don't know, it's also called an assignment expression.
Here are some examples:
New post: Muru: working with Kubernetes, not around it.
Kubernetes already handles rollouts, traffic and scaling, so Muru aims to fit in rather than duplicate any of it. The post covers a shutdown delay in place of a preStop hook, restarting and resizing a container in place, autoscaling on busy worker slots rather than CPU, and running migrations as a Job.
https://grahamdumpleton.me/posts/2026/11/muru-working-with-kubernetes-not-around-it/
#Python Friday #357: Moving PythonFriday.dev to #Zensical
https://pythonfriday.dev/2026/11/357-moving-pythonfriday-to-zensical/
Remembering Tim Peters (1952–2026), author of the Zen of Python (PEP 20) and creator of Timsort.
His code shaped a language, and his wisdom inspired a community.
The code remains. The inspiration lives on. 🕊️
“As the Zen of Python says, explicit is better than implicit.”
Read more 👉 https://pym.dev/unnecessary-syntax/
Happy to announce bgt 26.3.0, the best way to reliably run background threads in #Python that comes with only one, but really cool change: easy async work units!
Python Tip #225 (of 365):
Avoid creating local variables that share a name with a global variable.
This is called SHADOWING, and it can make for confusing code.
Assigning to a variable inside a function normally makes a LOCAL variable:
>>> phrase = "Hi!"
>>> def set_phrase(name):
... phrase = f"Hello {name}"
>>> set_phrase("Trey")
>>> phrase
'Hi!'
The global phrase never changed. The function makes a LOCAL phrase that disappears when it returns.
🧵 (1/3)
Python Tip #318 (of 365):
Don't shadow built-in names like list, sum, and input.
Python ALLOWS you to use list as a variable name, but then you can't use the list function from the same scope:
>>> list = ["apple", "banana", "cherry"]
>>> numbers = list(range(10))
Traceback (most recent call last):
...
TypeError: 'list' object is not callable
🧵 (1/5)
Just merged: Python 3.16's http module will support the new HTTP QUERY method from RFC 10008.
https://docs.python.org/dev/whatsnew/3.16.html#http
https://github.com/python/cpython/pull/155786
https://github.com/python/cpython/issues/153309
You can test it out in December's 3.16 alpha 3, or build from source.
Tomorrow. 👀
The DjangoCon Europe 2027 CFP closes on 15 November.
Last chance to send us your talk or workshop idea. One final push.
You know what to do → https://pretalx.evolutio.pt/djangocon-europe-2027/ 🎤
New post: Muru: a better tenant in a container.
Running gunicorn or uvicorn in a container usually means doing a lot by hand. Under muructl serve, Muru checks your worker settings against the container's limits, replaces a worker before the container runs out of memory, answers probes on a port of its own, shuts down cleanly on SIGTERM, and runs with a read-only root as any user.
https://grahamdumpleton.me/posts/2026/11/muru-a-better-tenant-in-a-container/
The latest release of pip supports installing specific dependency groups from a standard lock file, which means I can simplify the last little rough edge of my recommended “boring” #Python dependency management setup. I’ve updated the blog post to cover how it works:
https://www.b-list.org/weblog/2022/may/13/boring-python-dependencies/
Python Tip #317 (of 365):
For complex substitutions, pass a function to re.sub.
Python's re.sub performs a regular expression substitution, replacing matches with replacement text.
But it'll also take a FUNCTION, which accepts a match object and returns replacement text:
>>> def lowercase_match(match):
... return match.group().lower()
...
>>> "don't know".title()
"Don'T Know"
>>> re.sub(r"[a-z]'[A-Z]", lowercase_match, "Don'T Know")
"Don't Know"
🧵 (1/3)
Curious what the PSF has been up to in 2026? Check out our ✨ fundraiser launch blog post ✨ that includes some of our highlights from 2026! https://pyfound.blogspot.com/2026/11/python-is-for-everyone-join-in-psf-year.html #PythonForEveryone #Python
There are 3 ways to join the PSF's 2026 fundraiser:
- Donate directly 🎁
- Become a member 🪪
- Share this post 🔄 bonus points for quote posting with your #Python story!
Learn more and donate: https://donate.python.org/
The PSF's 2026 end-of-year fundraiser is live 🐍🚀
#Python is for everyone—and it takes everyone to keep it thriving. Support the PSF, the Python community, and the language we love.
Join in today 💛💙 https://donate.python.org/
🚀️ YOGA v1.4.0 released!
This new version adds support of #Python 3.15 and the Assimp library was updated to v6.0.6.
➡️ https://github.com/wanadev/yoga/releases/tag/v1.4.0
Enjoy! 😁️
New post: Muru: canaries without a service mesh.
Starting a new release beside the old one protects you from a release which can't start, but not from one which starts fine and then fails some of its requests. Under the Muru daemon, a new release can be given a share of the traffic, judged against the release already serving, and rolled back by itself if it does worse.
https://grahamdumpleton.me/posts/2026/11/muru-canaries-without-a-service-mesh/
To rid myself of the new incomplete provenance red badge of shame on PyPI, here's argon2-cffi-bindings 26.2.0!
As a bonus it comes with stable ABI drivers for free-threaded Python 3.15 and later.
Special thanks to Kraken, Privacy Solutions GmbH and Klaviyo for supporting me as Dedicated Organization tier patrons! 💛 I can't stress enough how important the support of every single sponsor (💖 https://github.com/sponsors/hynek/ 💖) is for unpleasant work like this.
https://github.com/hynek/argon2-cffi-bindings/releases/tag/26.2.0
Python Tip #316 (of 365):
Time code with time.perf_counter.
Do this:
from time import perf_counter
start = perf_counter()
process(data)
elapsed = perf_counter() - start
Not this:
from time import time
start = time()
process(data)
elapsed = time() - start
time.time returns the current time, as the operating system's clock reports it. That clock can be adjusted while your code runs (by your OS syncing it for example).
🧵 (1/3)
🐍🚀 Out now: Humanize 4.17.0
Does stuff like duration into "3 minutes ago".
https://github.com/python-humanize/humanize/releases/tag/4.17.0
🇱🇰 Add Sinhala (si_LK) locale
🔄 Add support for Python 3.16, drop EOL 3.10
🧰 Fix 20 bugs
⛔ Doesn't include 36 closed PRs, mostly LLM stuff. Many of which were duplicate PRs of other PRs.
It's not so much fun when your project is an example in agentic repos. Surprise, people just run the command and open another dupe!
https://github.com/python-humanize/humanize/issues/512
#Python #release #Humanize
New post: "Muru: releases, not restarts"
With gunicorn or mod_wsgi, a deploy usually means new code over the old and a reload. Under the Muru daemon each deploy is a release of its own, started beside the one serving. Traffic moves once it is ready, and the old release is kept warm, so rolling back is a routing change. The daemon itself can even be restarted without the releases noticing.
https://grahamdumpleton.me/posts/2026/11/muru-releases-not-restarts/
Python Tip #315 (of 365):
Don't reach for random.random.
Need a random integer? Don't multiply a random float and convert the result. The randint function does that more directly.
Do this:
random.randint(1, 6)
Not this:
int(random.random() * 6) + 1
In JavaScript, Math.random is the random number generation utility. Need a random integer? Use Math.random. Need a random item from an array? Use Math.random.
More on this:
https://pym.dev/random-numbers/
🧵 (1/3)
In Memoriam: Tim Peters 1952–2026 https://lobste.rs/s/romf5e #person #python
https://discuss.python.org/t/in-memoriam-tim-peters-1952-2026/110028
RE: https://mastodon.social/@glyph/117596368192808497
Glyph is right, but beware of this:
```
In [1]: a = 'foo'
In [2]: type(a)
Out[2]: str
In [3]: b = a[0]
In [4]: type(b)
Out[4]: str
In [5]: s = a.encode()
In [6]: type(s)
Out[6]: bytes
In [7]: t = s[0]
In [8]: type(t)
Out[8]: int
```
I mean, `Out[4]`.
@thecybersecguru as I am reading this, the most basic type annotation possible would have caught this bug (you’ll get an int, not a bytes!) not to mention testing. how on earth did this make it through an audit
“In Python, the syntax for calling a function is the same as the syntax for making a new class instance.”
Read more 👉 https://pym.dev/class-or-function/
How a 1-line Python bug destroyed 18 months of security audit trust, forced a major Certificate Authority (CA) to shut down its public TLS business, and turned 384-bit crypto keys into single-byte integers you could brute-force in microseconds.
eMudhra's custom key-migration script:key_bytes[0] instead of a full slice or 48-byte buffer. Modern HSMs didn't fail. Cryptography didn't break. The bug sliced off all but the FIRST byte of 48-byte ECDSA private scalars, generating "compromised" 8-bit keys like 4, 56, and 155. Anyone with the public key could reverse-engineer the private key in milliseconds. 🤯
Worst part? They operated like this for 18 months through TWO WebTrust audits. It only got caught because of a third-party researcher.
Read the absolute madness of how it went down ⬇️ https://thecybersecguru.com/news/emudhra-ca-key-incident-python-bug/
#Cybersecurity #Infosec #Cryptography #Python #Coding #DataSec #TechNews #eMudhra #bugbounty
Back in 2021, I created this animation that shows the differential growth of disinformation on Twitter.
Edit: removed audio track so it plays like a GIF, I think?
Another day, another supply chain attack. This time, the #jazzband edition. We'll never catch a break… 😮💨
🐍 CALL FOR VOLUNTEERS — PyCon Sweden 2026!
8 days to go and we need YOU! PyCon Sweden is built entirely by passionate volunteers — no corporate machine, just people who love this community.
✅ Free conference access
✅ Behind the scenes of a real community event
✅ No experience needed — just enthusiasm!
📩 info@pycon.se or DM us!
Nov 19–20 | Stockholm 🇸🇪
Had another fun day of programming today. A month into building Muru with AI, seven days a week, and I can't remember the last time something was engaging, fulfilling and fun all at the same time. I still get out for a walk and do the gardening too.
I wrote about why it feels like a lifestyle choice as I edge towards retirement. If Muru sounds like something you would use, I would love to hear what you need from it.
https://grahamdumpleton.me/posts/2026/11/ai-as-a-lifestyle-choice/
Python Tip #314 (of 365):
Split on multiple separators with re.split.
>>> import re
>>> tags = "python;regex,strings"
>>> re.split(r'[,;]', tags)
['python', 'regex', 'strings']
The string split method can split on only one separator string.
The re.split function splits on a regular expression, which makes it great for splitting on multiple separators.
🧵 (1/2)
Many WSGI apps eventually need websockets, which usually means running a separate ASGI server behind a proxy, or porting everything to ASGI.
In the latest Muru post, a Flask view instead hands the request to an ASGI application in the same worker, so it can still check the user is logged in first. I also cover mounting ASGI beside WSGI and serving gRPC.
https://grahamdumpleton.me/posts/2026/11/muru-wsgi-and-asgi-together/
Many WSGI apps eventually need websockets, which usually means running a separate ASGI server behind a proxy, or porting everything to ASGI.
In the latest Muru post, a Flask view instead hands the request to an ASGI application in the same worker, so it can still check the user is logged in first. I also cover mounting ASGI beside WSGI and serving gRPC.
https://grahamdumpleton.me/posts/2026/11/muru-wsgi-and-asgi-together/
“The Car class isn't technically a subclass of Goose, but it's seen as a sort of virtual subclass.”
Read more 👉 https://pym.dev/goose-typing/
The November edition of the PSF Board Office Hour is about to begin 🐍 🗒️ 2 PM UTC. Join us to share how we can help your community, express your perspectives, and provide feedback for the PSF! #Python
https://pyfound.blogspot.com/2026/10/mark-your-calendars-psf-board-office.html
Python Tip #313 (of 365):
Don't use match-case as a switch statement.
Do this:
if day in ("saturday", "sunday"):
return "weekend"
else:
return "weekday"
Not this:
match day:
case "saturday" | "sunday":
return "weekend"
case _:
return "weekday"
The match version adds indentation and doesn't even rely on the "structural" part of structural pattern matching.
More on this:
https://pym.dev/switch-case-in-python/
🧵 (1/2)
Most Python web applications are developed over plain HTTP and deployed behind HTTPS, so Secure cookies, HTTP/2 and generated URLs only get properly exercised once deployed. Testing that locally usually means a proxy and a certificate to set up, which few people bother with.
With a Muru development run you add --https and it generates the certificate for you. If you use mkcert your browser already trusts it, and there is no proxy to configure.
https://grahamdumpleton.me/posts/2026/11/muru-https-in-development/
“For example, what if you wanted to launch another program from within Python, pass it inputs, and then capture its output?”
Read more 👉 https://pym.dev/running-subprocesses-in-python/
#Python question: I have a couple of scripts (custom commands for building Rust projects). They don't rely on any pip dependencies, but there's a dir with a few modules.
An installation step should be unnecessary and I have no need to distribute this via PyPI. Inclusion as a git submodule under the projects where they're needed seems sufficient.
I'm not stuck, but I thought I'd ask in case anyone had advice or similar examples?
Python Tip #312 (of 365):
Use the "utf-8-sig" encoding for CSV files.
Many CSV files start with an invisible byte order mark (BOM).
When read as "utf-8", the first column name starts with a UTF-8 BOM character:
>>> rows[0]
{'\ufeffdate': '2026-10-01', 'kwh': '12.5'}
🧵 (1/3)
Today's Muru post looks at importing a Python web application once and forking the workers from it, something I always wanted for mod_wsgi daemon mode but couldn't have.
Preloading can quietly break applications that open a socket or start a thread at import time, so Muru checks what the import left behind, falls back to per-worker imports if needed, and tells you what to fix. Processes, threads and free-threaded Python get a look too.
https://grahamdumpleton.me/posts/2026/11/muru-import-once-fork-many/
“Python 3.15 also has a big syntax addition: explicit lazy imports.”
Read more 👉 https://pym.dev/python315/
Python Tip #311 (of 365):
Make directories with parents and exist_ok.
Like this:
pathlib.Path("reports/2026").mkdir(parents=True, exist_ok=True)
Without "parents=True", the mkdir method raises an exception when parent directories are missing:
>>> reports = Path("reports/2026")
>>> reports.mkdir()
FileNotFoundError: [Errno 2] No such file or directory: 'reports/2026'
Passing "parents=True" will create missing parent directories.
🧵 (1/3)
New post in my series on Muru: how it fits together.
It explains the edge, controller, host and workers, and the path a request takes through them. Because each part is separate, each can be replaced without disturbing the others, which is what makes reloads, blue/green deploys and canaries possible. After years of mod_wsgi under Apache, that's what I most wanted to get right.
https://grahamdumpleton.me/posts/2026/11/muru-how-it-fits-together/
What's New in Python 3.15:
warnings
* Improve filtering by module in warnings.warn_explicit() if no module argument is passed. It now tests the module regular expression in the warnings filter not only against the filename with .py stripped, but also against module names constructed starting from different parent directories of the filename (with /__init__.py, .py and, on Windows, .pyw stripped). (Contributed by Serhiy Storchaka.)
What's New in Python 3.15:
Upgraded JIT compiler
Results from pyperformance suite: 8-9% geometric mean performance improvement over the standard CPython interpreter built with all optimisations enabled on x86-64 Linux.
On AArch64 macOS, 12-13% speedup over the tail calling interpreter with all optimisations enabled.
The speedups versus no JIT builds range from roughly 15% slowdown to over 100% speedup on x86-64 Linux and AArch64 macOS.
https://docs.python.org/3.15/whatsnew/3.15.html#upgraded-jit-compiler
Python Tip #310 (of 365):
Match objects by their type and attributes with match-case.
With a Point dataclass:
>>> point = Point(x=0, y=4)
>>> match point:
... case Point(x=0, y=0):
... print("At the origin")
... case Point(x=0, y=y):
... print(f"On the y-axis at {y}")
... case Point(x=x, y=y):
... print(f"At ({x}, {y})")
...
On the y-axis at 4
More on this:
https://pym.dev/match-case-parsing-python/
🧵 (1/3)
3.14 vient de dépasser 3.10
3.13 vient de dépasser 3.11
et dans quelques jours 3.15 dépasse 3.7, ma préférée, tristesse…
Python Tip #309 (of 365):
Match dictionaries by their keys with match-case.
>>> response = {"type": "rectangle", "width": 3, "height": 4}
>>> match response:
... case {"type": kind}:
... print(f"Object is {kind}")
... case {"error": message}:
... print(f"Error: {message}")
... case _:
... print("Unknown response")
...
Object is rectangle
🧵 (1/3)
Python Tip #309 (of 365):
Match dictionaries by their keys with match-case.
>>> response = {"type": "rectangle", "width": 3, "height": 4}
>>> match response:
... case {"type": kind}:
... print(f"Object is {kind}")
... case {"error": message}:
... print(f"Error: {message}")
... case _:
... print("Unknown response")
...
Object is rectangle
🧵 (1/3)
“Python code is meant to be read and understood by humans as well as the Python interpreter.”
Read more 👉 https://pym.dev/unnecessary-syntax/
CPU-Auslastung in Linux anzuzeigen, geht es auch mit top oder dessen neueren Programme. Aber einen zeitlichen Verlauf dafür gibt es ein anderes Programm.
In meinem aktuellen Blogeintrag schreibe ich über dieses Programm und wie man es mit Python kombinieren kann.
#python #linux #AlmaLinux #blog
https://sven-essen.de/2026/11/05/sysstat-linux-python-cpu-prozess-grafisch-visualisieren/
On Tuesday Nov 24th, I'll be at IndyPy (hosted by @sixfeetup) presenting "What's new in the Django community?" Spoiler, it's going to consist of a bunch of questions and for each question the audience gets right, I'll make a donation to the DSF. If you like Django, trick questions or snarky, self-deprecating humor, come join!
It's a hybrid event, so as long as you're awake you can join in and participate. Please register ahead of time though.
https://www.meetup.com/indypy/events/311855037/ #Django #Python
When the eMudhra Intermediate CA was compromised, the #Python ecosystem had to move fast.
Within two days, fixes shipped for certifi, Python, pip, uv, sigstore, virtualenv, conda & more, with PyPI and python.org patched as well.
Read how PSF #security staffing made the difference, and what’s next:
https://pyfound.blogspot.com/2026/11/how-python-ecosystem-responded-to.html
@kfdm @pganssle It's already showing up: six has dropped from the last day's top 20: https://pypistats.org/top
And there's a dip in the daily downloads: https://pypistats.org/packages/six?smooth=true
(Chart with seven-day smoothing to mask the weekend dips, zoomed to exclude the old metadata counts before August: https://blog.pypi.org/posts/2026-08-31-download-counts/)
#Python #six #PyPI
@wsvincent opened a thread on modernizing Django’s APIs (DEP 0017), and @carlton joined in.
I linked my earlier proposal for a pluggable JSON backend. It tackles a different layer, but could be complementary.
What should Django handle in core, and what should stay flexible? I’d love your thoughts on both topics in the forum!
@cinebox Yes:
'This way, if you run unaudited code in an environment that cares about FIPS, the code will raise exceptions if it uses a non-valid hash, but during code audit the callsites can be marked clearly as "usedforsecurity=False", and be used as before.
'In non-FIPS environments, the flag would be ignored.'
https://github.com/python/cpython/issues/53462
#Python
Huh, I assumed the #python hashlib’s “usedforsecurity” argument switched it over to some constant-time algorithm, but it seems more like its just there so FIPS-compliant environments can reject weak algorithms?
Python Tip #308 (of 365):
Match tuple-like data by shape with match-case.
>>> point = (3, 4)
>>> match point:
... case (x, y):
... print(f"2D point ({x}, {y})")
... case (x, y, z):
... print(f"3D point ({x}, {y}, {z})")
...
2D point (3, 4)
🧵 (1/3)
In my last post I wrote about where Muru, my new Python web hosting project, came from. Now it's time to see it running.
This first look covers development mode: serving a WSGI app with one command, an access log that separates time spent queueing from time spent in your code, and reloads that start a new release beside the old one, so a broken import never takes the server down.
https://grahamdumpleton.me/posts/2026/11/a-first-look-at-muru/
“There's also now an official way to invent your own sentinel values in Python.”
Read more 👉 https://pym.dev/python315/
Should you delete Python syntax that isn't strictly necessary?
Not always. An explicit "return None", an "else" after a "return", using the keyword for an argument, and trailing commas are all technically unnecessary, but all of those can make code easier to read and understand.
I just published a new article on different kinds of "unnecessary" syntax in Python and why I often prefer to use these.
The TL;DR: explicit is better than implicit
[$] Portable Python scripts with dependencies
A basic Python script is portable: it can be copied between machines with little concern about compatibility. A script that depends on third-party packages requires quite a bit mor [...]
RE: https://fedi.lwn.net/@lwn/117558707586696470
I wrote another article for LWN. This one is on maintaining a portable Python script that has third-party dependencies. It's less messy than it used to be.
The article is subscriber-only right now but you can use this link to read it:
https://lwn.net/SubscriberLink/1104646/ab9835bf6db98879/
We’re excited to welcome Joshua Mcshannon as the PSF’s newest Infrastructure Engineer! Joshua will help support python.org, @pypi, and @pycon US infrastructure and add much-needed on-call redundancy.
Say hello when you see him in the repos 🐍 👋 #Python
https://pyfound.blogspot.com/2026/11/joshua-mcshannon-joins-psf-as.html
Twenty years ago the idea for mod_wsgi was taking shape. It did the best it could within the constraints of Apache, but there was always a list of things I wanted to do and couldn't.
Now on sabbatical, and with AI tools taking on the coding, I've started on Muru, a new system for hosting Python web apps. It handles WSGI, ASGI and gRPC, and is built around what Python apps need in production.
https://grahamdumpleton.me/posts/2026/11/twenty-years-of-mod-wsgi/
RE: https://publicidentity.net/@jezdez/117430338753331167
Quick update on the wind-down work on Jazzband since last week:
pip-tools has moved to PyPA, wagtailmenus to Wagtail Nest, and sorl-thumbnail back to Mario-César Señoranis.
Of the 82 projects I'm tracking, 11 are marked as complete, 4 as archived, and 11 are preparing to move. More moves are under discussion, including proposals for Django Commons (27 projects are currently in the preparation or decision phase).
Thanks to everyone helping!
I've kicked off the wind-down work on @jazzband and have sent out emails to most (all?) project leads and people involved.
In case there is a Jazzband project you care about, please check out the dedicated project board and engage: https://github.com/orgs/jazzband/projects/16/views/7
16 digits of pi not enough?
>>> import math
>>> print(math.pi)
3.141592653589793
You can ask Python for more digits and it'll tell you a bunch more... and they'll be mostly incorrect!
>>> print(f"{math.pi:.47f}")
3.14159265358979311599796346854418516159057617188
Notice the difference?
3.141592653589793238462643383279502884197169399
Python Tip #307 (of 365):
Make dataclasses instead of named tuples.
Do this:
@dataclass
class Room:
name: str
number: int
Not this:
class Room(NamedTuple):
name: str
number: int
The biggest problem with named tuples is that... they're tuples.
They support ALL tuple behaviors, even concatenation:
>>> purple = Room("Purple", 301)
>>> blue = Room("Blue", 401)
>>> purple + blue
('Purple', 301, 'Blue', 401)
🧵 (1/3)
une vidéo étonnante où une personne arrive à localiser un extrait d'une vidéo de caméra extérieure de surveillance grâce aux effets doppler de sons d'avion se cachant dans le fond sonore et aux données ouvertes des tracés de vol des avions de ligne : https://www.youtube.com/watch?v=UytYrhYLOKI
La démarche est outillée en Python, mais la vidéo met surtout l'accent sur la compréhension des phénomènes physiques et sur l'OSINT : le renseignement basé sur l'opensource.
We’re excited to welcome Brett Smith as the PSF’s new Security Developer 🐍🔒 Brett joins @sethmlarson and @miketheman to help scale #security response for the #Python ecosystem.
https://pyfound.blogspot.com/2026/10/announcing-new-security-developer-2026.html
🐍🚀 Out now: UltraJSON 6.1.0
No functional changes, only in binary wheels released to PyPI.
9 new:
GraalPy 3.13:
macOS arm64
Linux x86_64 (manylinux_2_28)
Linux x86_64 (manylinux_2_28)
Windows x86_64
PyPy3.12:
macOS x86_64
macOS arm64
Linux x86_64 (manylinux_2_28)
Linux aarch64 (manylinux_2_28)
Windows x86_64
5 changed:
PyPy 3.11 wheels re-tagged from pp73 to pp80
3 removed:
PyPy3.11 wheels that PyPy v8.0 can't target
https://github.com/ultrajson/ultrajson/releases/tag/6.1.0
#Python #release #UltraJSON
🎤 You could be on this stage. Have an idea you've been wanting to share?
DjangoCon Europe 2027 is looking for speakers.
Your idea doesn't need to be perfect. It just needs to start somewhere. Got a talk in mind? 👀
Python Tip #306 (of 365):
Don't use tuples for list-like data.
Do this:
colors = ["pink", "purple", "green", "blue"]
Not this:
colors = ("pink", "purple", "green", "blue")
Tuples are TECHNICALLY just immutable lists, but their immutability isn't the primary reason that we use them.
We mostly use tuples to distinguish list-like data from tuple-like data.
🧵 (1/3)
# programming, AI
I don’t know how I feel about this, but I just whipped up a web app using Python and a new tool I had heard about, niceGUI. It’s a clever name. It abstracts away most of the work in setting up a web server, but keeps the logic in Python, which makes it pretty easy for me. You just write in a simple layout container and what controls go in it and you are pretty much done. Unless you want to change the look. Then you are stuck trying to figure out what CSS classes to use because they are defined by other projects, Tailwind and Quasar, which assume you know your way around CSS.
While spending an hour searching for answers I found myself on Deepwiki.com. This uses a large language model (they call it Devin) which had already indexed the niceGUI documents and code on the GitHub repository. I had hit a dead end, so I asked it my formatting question. And 10 seconds later it gave me the exact answer, with an explanation, and a couple of examples, plus links to the code. I tried another one, and it answered just as easily, adding to the previous results. I was able to fix my page in with 5 queries, and the answers worked every time.
So here’s an example of an LLM that I could check that really helped me in my task. It didn’t write my code, but it simplified my work enormously. Am I wasting resources? I can only hope these LLMs get more efficient over time. China is learning to do this simply because the USA won’t let them use powerful chips. The next year will be interesting.
If you're interested in similar stories you can watch the recording of my PyCon US 2026 talk
https://youtu.be/EKayPgbD6J0?is=53oTajuCuc1cF5yt
“Even though we typically use duck typing in Python, this is one of the few cases where we actually practice strong type-checking.”
Read more 👉 https://pym.dev/when-to-use-notimplemented/
Another Python project hit by a problem I discussed at PyCon US 2026: AI makes producing reports cheap, while reviewing, validating and fixing them still takes real maintainer time.
After 17 years, Andi Albrecht has decided to stop maintaining sqlparse, used by Django and many other projects.
Thank you Andi for all these years of work ❤️
What's New in Python 3.15:
ast
* Add color parameter to dump(). If True, the returned string is syntax highlighted using ANSI escape sequences. If False (the default), colored output is always disabled. (Contributed by @stanfromireland.)
* The command-line output is now syntax highlighted by default. This can be controlled using environment variables. (Contributed by @stanfromireland.)
Python Tip #305 (of 365):
Split only as much as you need with maxsplit.
Do this:
key, value = line.split("=", maxsplit=1)
Not this:
key, *rest = line.split("=")
value = "=".join(rest)
Calling split without maxsplit breaks when the value contains the separator:
>>> line = "API_KEY=3q2+7w=="
>>> key, value = line.split("=")
Traceback (most recent call last):
...
ValueError: too many values to unpack (expected 2, got 4)
🧵 (1/3)
Spent some time this weekend working on izaya, a Django htmx autocomplete widget. I couldn't find an existing one that did what I needed: single and multi-select, relevance ranking and per-lookup access control.
If you're looking for something similar, give it a look. It needs Python 3.14+ and Django 6.0+.
“Compared to the very slow tracing profiler, the sampling profiler has basically no overhead at all.”
Read more 👉 https://pym.dev/python315/
It's happened! @pganssle has released a new dateutil:
"dateutil 4.0 requires Python 3.11 or later and no longer depends on six."
https://github.com/dateutil/dateutil/releases/tag/4.0.0
PyPI downloads in October: https://hugovk.dev/top-pypi-packages/
15. python-dateutil 1,126,142,541
16. six 1,096,144,423
Expect six to drop towards zero.
❯ uvx pipdeptree --reverse -p six
No packages matched using the following patterns: six
This #CybersecurityAwarenessMonth, I made 7 #Python releases, when 2 were originally planned for October. Altogether, we made 16 Python releases, when 5 were originally planned. Just 1 of the extras (3.15rc3) was not a security release.
1 x 3.16
4 x 3.15
3 x 3.14
3 x 3.13
2 x 3.12
2 x 3.11
1 x 3.10
Huge thanks to @sovtechfund for supporting my work. Also the other release managers @savannah, @Yhg1s, Pablo, and Ned for all the macOS builds, and @sethmlarson helping coordinate all this security.
Throw back to 2017, plotting an illustration of a skeleton in three views by J.G. Heck (1852). Plotted on a HP DraftPro DXL (24”x36”).
Happy Halloween! 💀
Python Tip #257 (of 365):
Consider "import datetime as dt".
The fact that the datetime module and the datetime class are spelled the same way is VERY confusing.
You could use a "from" import:
from datetime import datetime
Now datetime means the class.
But if later on you also want the date class, you're importing that name too, and hoping no local date variable ever shadows it. I definitely use the variable name date, so this is a problem for me.
🧵 (1/3)
Python Tip #304 (of 365):
Import the whole module when a name isn't clear.
Do this:
import random
color = random.choice(colors)
Not this:
from random import choice
color = choice(colors)
More on this:
https://pym.dev/4-ways-import-module-python/
🧵 (1/3)
boostedTu habites pas loin de Biarritz, tu fais du Python (ou tu voudrais) ?
Tu ne savais pas que la PyConFR c'était ce week-end ? C'est pas grave : l'événement est gratuit, viens, on gère ton inscription a l'accueil !
https://www.pycon.fr/2026/fr/venue.html
(Et fais passer le pouet a tes voisins)
Python Tip #303 (of 365):
Remember that strings are iterables of strings.
Python doesn't have a character type, which usually makes things easier.
If name is a string, name[0] returns a string, and strings have a lower method:
>>> name = "Ada"
>>> name[0].lower()
'a'
🧵 (1/6)
💖 I'm sponsoring PyPi because supply chain attacks are real.
Python Tip #302 (of 365):
Use // instead of truncating with int.
Do this:
mid_point = len(sequence) // 2
Not this:
mid_point = int(len(sequence) / 2)
Between two integers, // divides and returns an integer directly.
It's also a bit more efficient than dividing to get a floating point number and then converting that back to an integer.
More on this:
https://pym.dev/integer-division/
🧵 (1/2)
„Torvalds’s first publicly released chatbot code was in January this year, when he vibe-coded a project in Python because he didn’t know enough Python. The programming language kids learn in high school. The guy who runs the kernel couldn’t get his head around #Python.“
#PivotToAi #Linux #VibeCoding
@davidgerard
https://pivot-to-ai.com/2026/10/14/linux-kernel-goes-full-ai-slop-code-hides-chatbot-commits/
“In Python 3.15, the open function uses UTF-8 as its default encoding on every operating system, so a file written on one machine reads the same on every other machine.”
Read more 👉 https://pym.dev/python315/
Congratulations to the newest PSF Community Service Award recipients!
Abhijeet, Elena, @hugovk, @khorn, and @sabderemane have each made lasting contributions to the Python community. From conferences to founding initiatives to education worldwide, their service to the community deserves recognition and celebration!
https://pyfound.blogspot.com/2026/10/announcing-psf-community-service-award.html
🐍🛡️🎙️ Check out PSF Security Developer in Residence @sethmlarson on the Real Python Podcast!
Hear about the latest in #Python #security: LLMs and vulnerability triage, trusted publishing on PyPI, PEP 770 SBOMs, and CI/CD tips.
🚀 It's out!
🥧 Please install and enjoy Python 3.14!
https://discuss.python.org/t/python-3-14-0-final-is-here/104210?u=hugovk
🐍🚀 Out now: Tablib 3.11.0
Python Module for Tabular Datasets in XLS, CSV, JSON, YAML, &c.
Drop EOL Python 3.10
Fix a bug with lazy imports on 3.15
A couple of other bugfixes
Not included:
16 closed LLM PRs (several duplicating each other)
https://github.com/jazzband/tablib/releases/tag/v3.11.0
#Python #release #Tablib
Forget* about Python 3.14, all the cool kids are trying out Python 3.15.0 alpha 1 (but not on production)! 🚀
🔬 PEP 799: A dedicated profiling package for Python profiling tools
💬 PEP 686: Python now uses UTF-8 as the default encoding
🌊 PEP 782: A new PyBytesWriter C API to create a Python bytes object
⚠️ Better error messages
https://discuss.python.org/t/python-3-15-alpha-1/104358?u=hugovk
* Please don't forget about 3.14...
Just released! 🚀🚀🚀🚀🚀
Pillow 12.0.0
https://fosstodon.org/@pillow/115379893139846791
norwegianblue 0.23.0
https://github.com/hugovk/norwegianblue/releases/tag/0.23.0
pypinfo 23.0.0
https://github.com/ofek/pypinfo/blob/master/CHANGELOG.rst#2300
Humanize 4.14.0
https://github.com/python-humanize/humanize/releases/tag/4.14.0
Tablib 3.9.0
https://github.com/jazzband/tablib/releases/tag/v3.9.0
#Python #release #Pillow #pypinfo #Humanize #norwegianblue #Tablib
Just released! 🚀
📜 Python Docs Sphinx Theme, with added Arabic, French, Romanian and Russian translations.
https://github.com/python/python-docs-theme/releases/tag/2025.10
#Python #release #PythonDocsSphinxTheme #Sphinx #theme #translations
Just released! 🚀
🎨 termcolor 3.2.0
https://github.com/termcolor/termcolor/releases/tag/3.2.0
🟣 Expose `can_colorize` as public API
🟢 Add support for Python 3.15 (🥉 at https://pyreadiness.org/3.15/)
🔴 Drop support for EOLish Python 3.9
Out now: pepotron 1.6.0, with the new Python 3.16 schedule:
❯ pep 3.16
https://peps.python.org/pep-0826/
❯ pep 8
https://peps.python.org/pep-0008/
❯ pep lazy
Score Result
90 PEP 810: Explicit lazy imports
73 PEP 690: Lazy Imports
68 PEP 217: Display Hook for Interactive Use
68 PEP 802: Display Syntax for the Empty Set
57 PEP 227: Statically Nested Scopes
https://peps.python.org/pep-0810/
❯ uvx pepotron 3.16
https://peps.python.org/pep-0826/
https://mastodon.social/@peps@feedsin.space/116122903304128032
🐍🚀 Out now: pylast 7.1.0!
pylast is a Python interface to https://last.fm and https://libre.fm
🎹 Replace HTTPX with HTTPX2
🎶 Remove legacy Python 2 code
🪇 And five bug fixes
https://github.com/pylast/pylast/releases/tag/7.1.0
#Python #release #LastFM #LibreFM #scrobbler #pylast
🐍🚀 Out now: Humanize 4.16!
Add Latvian language localization
Add i18n support for naturalsize() and French translation
Performance improvements: 1.07x - 8.4x
Lazy imports for Python 3.15+
Drop experimental Python 3.13 free-threaded
Refactor: simplify scientific() and extract _SUPERSCRIPT_MAP constant
And seven assorted bug fixes!
https://github.com/python-humanize/humanize/releases/tag/4.16.0
#Python #Humanize #release
Python Tip #301 (of 365):
Don't delete "unnecessary" syntax that makes code more readable.
def earliest_date(date1, date2):
if parse(date1) < parse(date2):
return date1
else:
return date2
We don't necessarily NEED that "else"! We could delete it and outdent that last "return":
if parse(date1) < parse(date2):
return date1
return date2
But SHOULD we?
More on this:
https://pym.dev/unnecessary-else-statements/
🧵 (1/4)
“In Python, it's not always easy to tell the difference between a class and a function...”
Read more 👉 https://pym.dev/class-or-function/
Updated CPython Triage Guidelines and Process wrt AI-based contributions
https://discuss.python.org/t/updated-triage-guidelines-and-process-for-our-ai-policy/109717
I just launched a new Python Morsels course: Lazy Looping in Python 🔁
Python's "for" loops can only loop forward one item at a time, so we use looping helpers (like zip) to augment our loops.
This course teaches how to build your own looping helpers with generators and iterators.
It also includes a Daily Recall pack: spaced repetition questions that unlock as you progress, so you actually REMEMBER what you learn.
The first section is free.
Ca a l'air d'une solution sympathique pour aider deux parties du monde qui ne veulent pas trop se parler à se parler bien. https://github.com/MattHandzel/gdoc-sync/tree/main #synchronisation #markdown #google #documentation #opensource #python
Inspired by Astral's tooling, and thanks to Zanie for implementing, the CPython project now has a couple of labels to help us deal with low-quality AI contributions.
If we add "AI-needs-explanation" to a PR or issue, the Bedevere bot will ask the author to explain their changes in their own words, and links to the policy.
"AI-guidelines-not-met" is similar, but also closes it.
https://discuss.python.org/t/updated-triage-guidelines-and-process-for-our-ai-policy/109717
#Python #CPython #AI
Python Tip #300 (of 365):
Separate the steps of a function with blank lines.
If you're using an auto-formatter like ruff or Black, you won't have control over most of your whitespace.
But how you use blank lines within functions is still up to you.
More on this:
https://pym.dev/embrace-whitespace/
🧵 (1/3)
I need to maintain a version of python 3.12 locally, indefinitely.
What is the best way to do this, so I can build it on a new system OR docker.
@Rye If you really mean indefinitely, I would put it in a container (like Docker) now. Both because, as another reply said, you'll probably wind up having to deal with more and more out of date software components as time goes on, and because if your thing gets hacked in the future (which becomes more likely the more out of date components you use), you can probably limit the damage to within the container.
That bring said, I have personally found pyenv to do quite a good job at conveniently installing old Python versions for local use. uv presumably works well too, I just don't have much experience with using it for this purpose.
django-tui 26.2 needs no setup 🎉
cd into any Django project and run:
uvx django-tui
No pip install, no INSTALLED_APPS. It finds your manage.py (even from a subdirectory), loads your .env files and uses the project’s own virtualenv, so your Django version and apps are the ones running.
Then browse and run your management commands, or query your models in the shell.
“The utilities in the textwrap module are meant to operate on text that represents just one paragraph.”
Read more 👉 https://pym.dev/wrapping-text/
🐍📢 Get 30+ #Python titles for only $18 with The Ultimate Python, Machine Learning & AI Engineering Humble Bundle! You can customize your donation split: click "Adjust Donation" → "Custom Amount" to boost the % going to the PSF! https://www.humblebundle.com/software/ultimate-python-machine-learning-ai-engineering-bundle-202-software
Hi! I'm looking for a job or gig! I live in the US (Central Indiana), and would much much rather work remotely.
I have system administration experience with #WindowsServer, #Linux, and #OpenBSD professionally. I strongly prefer the #BSD family of OSes and am willing to work with #NetBSD and #FreeBSD professionally and have played with them off the job. I have done this for about three years.
I also know graphic design. My preferred programs are #GIMP and #Inkscape, but I can use #Photoshop or #Illustrator if need be. I have done this for a decade.
I have skills in development, especially web development, and have professionally developed with #Javascript, #Python, and #Go. I also am trying to familiarize myself with #VisualBasic6 for legacy maintenance. I also have experience working with Microsoft #SQLServer databases, as well as played with other major SQL servers. I've also played with many other languages. I'm also willing to familiarize myself with a tech stack on the fly. As implied, I am willing to touch legacy code.
I have also designed websites, and am quite familiar with #HTML and #CSS. I also got #JQuery to play nicely as well.
I am a jack of all trades, with my strongest skills I feel be in system administration and graphic design.
LLMs and generative AI are something I prefer to avoid where possible. I have experience with working under tight deadlines with a micromanaging boss before recent hype around LLMs, though I'd rather avoid such things if possible.
Python Tip #299 (of 365):
Return Boolean expressions directly.
Do this:
def is_even(n):
return n % 2 == 0
Not this:
def is_even(n):
if n % 2 == 0:
return True
else:
return False
That "n % 2 == 0" condition will have a value of either True or False... which is also what we then return.
So there's no need for an "if" statement and returning the result of the boolean expression directly is clearer.
🧵 (1/3)
“The print function is handy for showing output at the terminal, but that's not its only use.”
Read more 👉 https://pym.dev/print-features/
🐍🚀 Out now: a full sweep of security releases of Python 3.11-3.15
🔒📜 They address the compromised eMudhra intermediate CA keys. These keys are now blocked by the ssl module as a last resort against their use. Normal uses of pip, including to upgrade pip itself, are now safe from attacks based on those compromised keys, even if pip hasn’t been updated yet.
https://discuss.python.org/t/python-3-15-2-3-14-10-3-13-18-3-12-16-and-3-11-18-are-out/109678
#Python #release #Python315 #Python314 #Python313 #Python312 #Python311 #eMudhra
🐍🚀 Out now: Python 3.15 beta 3!
💤 Lazy imports!
🧊 frozendict builtin!
💂 sentinel builtin!
📉 Tachyon profiler!
🖼️ Frame pointers everywhere!
🛅 Unpacking in comprehensions!
🗣️ UTF-8 as the default encoding!
🆕 Package startup config files!
⌨️ TypedDict and TypeForm!
🐎 Faster JIT!
🎨 More colour!
🚌 & more!
Library maintainer? We *strongly encourage* you to add 3.15 to your CI and test during the beta. And send us those bugs reports!
https://discuss.python.org/t/python-3-15-0-beta-3-is-here/107866?u=hugovk
#Python #Python315 #CPython #release
“Something to keep in mind is that sys.platform actually represents the operating system that your Python interpreter was built for, while platform.system() returns the operating system that your Python interpreter is currently running on.”
Read more 👉 https://pym.dev/operating-system-checks/
Python Tip #298 (of 365):
When creating lots of class instances, save memory with __slots__.
class Point:
__slots__ = ("x", "y", "z")
def __init__(self, x, y, z):
(self.x, self.y, self.z) = (x, y, z)
🧵 (1/3)
At #swisspythonsummit, Olena Kutsenko showed us how data in real-time pipelines can turn into gremlins if not anonymized properly 😬
Bringing uv and ty together https://lobste.rs/s/dfieqa #python
https://astral.sh/blog/uv-ty-integration
“When it comes to code readability, whitespace is your friend.”
Read more 👉 https://pym.dev/embrace-whitespace/
Python Tip #297 (of 365):
Avoid making metaclasses if you can.
There's usually an easier tool for the job.
Metaclasses customize the behavior of CLASSES the same way classes customize the behavior of their instances. They're powerful, but they can also make for code that's overly complex and hard to understand.
Fortunately, many problems that COULD be solved with a metaclass often have a simpler solution.
🧵 (1/2)
“I find that I very rarely need the random function, because I often need random integers, not random floating point numbers.”
Read more 👉 https://pym.dev/random-numbers/
In response to the eMudhra / emSign certificate security incident we've published guidance for Python users to update CA certificates: https://discuss.python.org/t/information-for-python-users-regarding-emudhra-emsign-ca-certificate-security-incident/109576
Python Tip #296 (of 365):
Always use functools.wraps when making a decorator.
from functools import wraps
from time import perf_counter
def time_runs(func):
@wraps(func)
def wrapper(*args, **kwargs):
start = perf_counter()
return_value = func(*args, **kwargs)
print(f"{func.__name__} ran in {perf_counter()-start} seconds")
return return_value
return wrapper
🧵 (1/4)
@thejoyraises Configure the bot with a cooldown so there's time to detect and contain malware. In this case, the malicious wheels and images were removed within three hours.
https://blog.yossarian.net/2025/11/21/We-should-all-be-using-dependency-cooldowns
#Python #LLM #OpenSource #cooldowns
Capslocktober rose chez les manchots : la journée de célébration principale pour la communauté du #logiciellibre a eu lieu ce mercredi 21 octobre avec la participation enthousiaste de #Nodejs, #GitLab, #musl, #Apache Traffic Server, #Python Pillow, #Bind, #Java et bien sûr #PHP
https://linuxfr.org/users/krunch/journaux/capslocktober-rose-chez-les-manchots
“Another reason I tend to avoid implicit string concatenation is that it can sometimes cause bugs by accidentally using it.”
Read more 👉 https://pym.dev/implicit-string-concatenation/
Recap blog post from Day 3 of Python Core Sprint, my last day of the sprint.
Now I'm going to focus my energy for #SeaGL!
https://mariatta.ca/posts/python-core-sprint-2026-day-3/
#python #infrastructure #governance
Cut a new security-focused release of `pypi-publish` v1.14.3. It features my deptree hash-pinning work and on top of it, @sethmlarson also removed some revoked CAs from certifi-shipped TLS trust store in the deptree that might affect Sigstore-related components.
Upgrade, please! #Python #packaging #GitHub #security #PyPA
https://github.com/pypa/gh-action-pypi-publish/releases/tag/v1.14.3
Python Tip #295 (of 365):
Avoid needless deep copying.
Often a deepcopy call can be replaced by a comprehension, a slice, or some other operation that makes new objects.
When you copy a list of dictionaries, you get a NEW list pointing to the SAME dictionaries.
So if you plan to mutate those dictionaries, a shallow copy isn't enough.
🧵 (1/4)
💻 Computer und Programmierung mal anders – mit Linux für Schülerinnen und Schüler!
TUXEDO ist Teil der Code Week Bayern!
Mach mit bei unseren Workshops in Augsburg:
🔧 29.10.2026 – Hardware zum Anfassen
🐍 05.11.2026 – Erste Schritte mit Python
📅 Wann? Jeweils von 16:30 bis 18:30 Uhr
📍 Wo? TUXEDO Headquarters, Alter Postweg 101, 86159 Augsburg, 12. Stock
👉 Bitte melde dich vorher an!
https://my.tuxedocomputers.com/event/linux-workshop-zur-code-week-bayern-2026-26/register
Na próxima semana, o Grupo de Trabalho de Diversidade e Inclusão da PSF terá seu horário de atendimento mensal no Discord da PSF! Junte-se em October 27, 10 PM UTC, no #psf-diversity para conversar, fazer perguntas e compartilhar seus projetos 🐍🗺️ #Python https://pyfound.blogspot.com/2026/07/the-psf-d-workgroup-are-starting-office.htm
The PSF Diversity & Inclusion Workgroup monthly office hours are next week on the PSF Discord! Join us on Tuesday October 27th, 10 PM UTC, in #psf-diversity to chat, ask questions, and share what you're working on 🐍🗺️ #Python https://pyfound.blogspot.com/2026/07/the-psf-d-workgroup-are-starting-office.html
The newest PSF Board is excited to continue monthly PSF Board Office Hours into 2027! We welcome you to join these sessions to share with us how we can help your community, express your perspectives, and provide feedback for the PSF 🐍📣 #Python
https://pyfound.blogspot.com/2026/10/mark-your-calendars-psf-board-office.html
RE: https://fosstodon.org/@ThePSF/117480035407379102
On macOS, Mole can clear out your .venv and venv dirs, in case you have old certifi.
https://github.com/tw93/mole#purge
$ brew install mole
$ mo purge --dry-run # review first
$ mo purge # interactive
$ mo purge --yes # non-interactive
...
Estimated space freed: 13.33GB | Items: 399
You may need to point to your dev dir with --paths
It also cleans out things like .tox, .nox, __pycache__, .pytest_cache, .mypy_cache, .ruff_cache build, dist, node_modules.
#Python #Mole #venv #certifi #eMudhra #macOS
In response to the eMudhra / emSign certificate security incident we've published guidance for Python users to update CA certificates: https://discuss.python.org/t/information-for-python-users-regarding-emudhra-emsign-ca-certificate-security-incident/109576
And @pganssle has published dateutil 3.0.0:
"This is the last major version of dateutil that will support any version of Python older than 3.11. The next release will be the 4.x series, which will support Python 3.11 and later."
https://github.com/dateutil/dateutil/releases/tag/3.0.0
dateutil has 905k PyPI downloads/month, and is the main dependant of six (895k):
https://hugovk.dev/top-pypi-packages/
🧹 PR "Drop support for Python < 3.11 and remove six" is +355 -1,447:
🐍🚀 Out now: expedited security releases of Python 3.15 and 3.14, and a special security release of 3.13
They all upgrade the bundled pip to version 26.2.2, which includes certifi 2026.10.19 to address the eMudhra / emSign CA certificate security incident.
https://discuss.python.org/t/python-3-15-1-3-14-9-and-3-13-17-are-out/109595
Just released: Python Docs Sphinx Theme 2025.9! 🚀
This enables translations of the theme and adds translations for:
Brazilian Portuguese
Greek
Japanese
Polish
Simplified Chinese
Spanish
Swedish
Traditional Chinese
Turkish
Thanks to all our translators!
https://github.com/python/python-docs-theme/releases/tag/2025.9
#Python #docs #Sphinx #PythonDocsTheme #PythonDocsSphinxTheme
Just released: Python Docs Sphinx Theme 2025.9.2! 🚀
Add German, Korean and Indonesian translations
Fix html page translation
Fix Copy button copying line numbers
Fix search button cutting off long translations
https://github.com/python/python-docs-theme/releases/tag/2025.9.2
#Python #docs #Sphinx #PythonDocsTheme #PythonDocsSphinxTheme
Just released: Python 3.14.0 release candidate 3! 🚀🐍
🪄 Finally, the final release candidate
🪄 We fixed *another* bug that required the ".pyc magic number" to be increased
🪄 The ABI isn't changing, and wheels built for rc1 and rc2 should still work
👤 This was the first release @savannah shadowed!
🏆 Please test and report bugs!
https://discuss.python.org/t/python-3-14-0rc3-is-go/103815?u=hugovk
Just released! 🚀
🎶 pylast 6.0.0
🎤 A Python interface to Last.fm and Libre.fm
📯 Restore proxy support (potential breaking change: proxies are now always stored as a dict, before it was a str or dict)
🪇 Drop support for almost-EOL Python 3.9
Just released! 🚀
em-keyboard 5.3.0
🎲 Pick a random emoji from a search. For example:
❯ em --search music --random
Copied! 👩🎤 woman_singer
🧛♂️ Drop support for Python 3.9
Just released! 🚀
flake8-implicit-str-concat 0.6.0
A Flake8 plugin to identify those unjoined strings that a first Black run leaves behind:
"111111111111111111111" "222222222222222222222"
I hear there's another big release tomorrow? This release adds support for Python 3.14 and for once code changes were needed due to AST deprecation removals.
Also drop support for almost-very-nearly-EOL Python 3.9.
https://github.com/flake8-implicit-str-concat/flake8-implicit-str-concat/releases/tag/0.6.0
#Python #flake8 #release #Python314 #Python39
Just released: Python 3.15.0a4 and look at those JIT numbers!
I heard you like alphas?
Just released! Python 3.15.0a5, this time built against `main` from today instead of last month! 🚀
https://discuss.python.org/t/python-3-15-0-alpha-5-yes-another-alpha/105721
By popular demand (@miketheman), pypistats now has a `--sort` option so you can sort by other columns such as date, rather than the default downloads.
Out now!
Python 3.14.3 and 3.13.12!
All the best bugfixes!
https://discuss.python.org/t/python-3-14-3-and-3-13-12-are-now-available/105995
🐍🅰️ Out now, Python 3.15 alpha 6!
PEP 799: A high-frequency, low-overhead, statistical sampling profiler
PEP 798: Unpacking in comprehensions with * and **
PEP 686: Python now uses UTF-8 as the default encoding
PEP 782: A new PyBytesWriter C API to create a Python bytes object
PEP 728: TypedDict with typed extra items
The JIT compiler has been significantly upgraded with up to 7-8% speedup
🧊 Just two more alphas until the feature freeze! 🧊
https://discuss.python.org/t/python-3-15-0-alpha-6/106122
#Python #Python315 #release
🐍🚀 Out now: Python 3.15 beta 2!
Still all this good stuff:
💤 Lazy imports!
🧊 frozendict builtin!
💂 sentinel builtin!
📉 Tachyon profiler!
🖼️ Frame pointers everywhere!
🧳 Unpacking in comprehensions!
8️⃣ UTF-8 default encoding!
🆕 Startup config files!
⌨️ Loadsa typing!
🎨 More colour!
🚌 & more!
Library maintainer? Add 3.15 to your CI and keep those bug reports coming!
https://discuss.python.org/t/python-3-15-0-beta-2-is-here/107610
Out now: Python 3.14.6 and 3.13.14!
A day late to include a last-minute OpenSSL release in the installers. Thanks to @standupmaths for the help with the release notes :)
https://discuss.python.org/t/python-3-14-6-and-3-13-14-are-now-available/107714
#Python #CPython #Python314 #Python313 #release
Out now: PrettyTable 3.18!
Library to display tabular data in a visually appealing ASCII table format.
Lots of stuff here, including performance improvements, some thanks to improvements in wcwidth dependency.
Add support for:
Python 3.16
reStructuredText tables
multiline headers
captions in Markdown
And more!
https://github.com/prettytable/prettytable/releases/tag/3.18.0
#Python #release #PrettyTable
Out now: linkotron 0.7!
CLI to format links in a shorter format.
🖇️ Format regular links
🔗 Format GHSA links -- thanks @stanfromireland!
🖇️ Add support for Python 3.15-3.16
🔗 Stop testing experimental 3.13t
Maybe one day I'll remember how to write reStructuredText links but now I don't need to:
❯ linkotron example.com --rst
Copied! `example.com <https://example.com>`__
In response to the eMudhra / emSign certificate security incident we've published guidance for Python users to update CA certificates: https://discuss.python.org/t/information-for-python-users-regarding-emudhra-emsign-ca-certificate-security-incident/109576
Recap blog post from Day 2 of Python Core Sprint.
Tl;dr: The bots are migrated over to Cabotage (from Heroku) smoothly without anyone noticing any downtime.
Read for more details
https://mariatta.ca/posts/python-core-sprint-2026-day-2/
#Python #infrastructure
The PSF is hiring a CPython Developer in Residence! Full-time, remote, $70K–170K (US) or comparable contractor rates abroad. Help keep Python’s core healthy and support the volunteers who maintain it. Apply by Nov 19:
https://pythonsoftwarefoundation.applytojob.com/apply/or9un7DlwI/CPython-Developer-In-Residence
Python Tip #294 (of 365):
Use exceptions to pass error messages to users.
You can use exceptions to transmit error messages to an end user from arbitrary places within your program's call stack without messily calling sys.exit all over the place.
Catch exceptions with messages users shouldn't see, and raise your own exception with a message they SHOULD see:
class WeatherError(Exception):
"""Raised when we can't show the user a forecast."""
🧵 (1/5)
Django Pictures 2.0.1 and 1.9.1 ship with a fix for Pillow 13 and multi-line alt-texts.
Special thanks to @amureki for discovering this one.
Cut a new security-focused release of `pypi-publish` v1.14.3. It features my deptree hash-pinning work and on top of it, @sethmlarson also removed some revoked CAs from certifi-shipped TLS trust store in the deptree that might affect Sigstore-related components.
Upgrade, please! #Python #packaging #GitHub #security #PyPA
https://github.com/pypa/gh-action-pypi-publish/releases/tag/v1.14.3
Recap blog post of day 1 (and 0) of my experience at PyCon Core Sprint.
https://mariatta.ca/posts/python-core-sprint-2026-day-1/
#python
Python Tip #293 (of 365):
Write context managers with contextlib.contextmanager.
Instead of making a class with __enter__ and __exit__ methods, we can make a context manager out of a function:
🧵 (1/4)
I've kicked off the wind-down work on @jazzband and have sent out emails to most (all?) project leads and people involved.
In case there is a Jazzband project you care about, please check out the dedicated project board and engage: https://github.com/orgs/jazzband/projects/16/views/7
RE: https://publicidentity.net/@jezdez/117430338753331167
Quick update on the wind-down work on Jazzband since last week:
pip-tools has moved to PyPA, wagtailmenus to Wagtail Nest, and sorl-thumbnail back to Mario-César Señoranis.
Of the 82 projects I'm tracking, 11 are marked as complete, 4 as archived, and 11 are preparing to move. More moves are under discussion, including proposals for Django Commons (27 projects are currently in the preparation or decision phase).
Thanks to everyone helping!
I've kicked off the wind-down work on @jazzband and have sent out emails to most (all?) project leads and people involved.
In case there is a Jazzband project you care about, please check out the dedicated project board and engage: https://github.com/orgs/jazzband/projects/16/views/7
Willing to cut a deal. . . [First-person: I / Second-person: you / Third-person: he / Indefinite: Someone] » 🌐
@vor@lgbtqia.space
I see your follow request, and I'm considering.
In the mid-1990s, I headed up the support team for a dialup ISP that I co-owned with a couple other guys. Our servers ran #Debian, and I put it on my desktop (with #gnome ) when IBM gave up on OS/2. In the 2010s, I got tired of being an admin, so I switched to #LinuxMint.
Right now, I'm enrolled at a state university to upgrade my associate's to a bachelor's so that I can use financial aid to pay for student insurance. No one is gonna hire me for anything because I'm old. I tried jobhunting for an entire year, and I can't live without insurance.
I volunteer coteach #Python to #highSchool #students over Zoom, and I serve as a judge for most elections.
I'm doing my best, and I don't have bandwidth for extra homework right now. I also don't store stuff on computers — mine or other people's. Ghu gave us external drives for a *reason*.
After getting another burst of PRs from a single account in a short period, we've set a limit of a max 3 PRs (including drafts) per account.
This does not affect members of the core or triage teams.
If you have more than 3 PRs already open, they stay open, but you won’t be able to open another before dropping below the limit.
https://discuss.python.org/t/pull-request-limits-for-cpython-repo/109564/1
PEP corner:
"After further discussion, we have decided to withdraw PEP 836. The Steering Council rightly sets a high bar for a proposal of this scope, and we don’t feel we have the personal bandwidth to carry the current version forward. We continue to believe in the technical direction outlined in the PEP, including free-threaded support and a method-based frontend, and remain optimistic about the JIT’s potential in CPython."
It's the Python CoreSprint in San Francisco this week! I'm not there, but I can see the repo is already busy!
Here's a handy diagram @pganssle has just added to the pathlib docs:
https://docs.python.org/3/library/pathlib.html#methods-and-properties
RE: https://mastodon.social/@hugovk/117365378328527529
Do you prefer reading Python 3.15 livetoot threads in blogpost form?
Good news!
https://hugovk.dev/blog/2026/releasing-python-3-15-0/
Python 3.15.0 release day!
First blocker, we're getting 503s on https://docs.python.org and https://buildbot.python.org, the latter of which is needed to check the tier 1 and 2 buildbots are passing, needed for a release.
It's a certificate issue from an incompatible pyOpenSSL upgrade. We're waiting for the US to wake up and poke it with a stick.
Any FOSS or other non-profit project or community that sends email?
I am happy to help :)
“This will allow us to close the file and then pass the temporary file's filename to wherever it needs to be, and then when the context manager exits, the file will be deleted automatically:”
Read more 👉 https://pym.dev/temporary-files/
I don't know what you're doing on the first Tuesday of even months for the next two years, but I've just planned out mine:
https://peps.python.org/pep-0790/#bugfix-releases
You can add Python releases to your calendar with this iCal:
Python Tip #292 (of 365):
Keep "try" blocks small with an "else" clause.
try:
count = int(text)
except ValueError:
print("That's not a number")
else:
print(f"Counting to {count}")
The "else" block runs only if the "try" block finished without raising an exception.
Why not put that print call at the bottom of the "try" block instead?
try:
count = int(text)
print(f"Counting to {count}")
except ValueError:
print("That's not a number")
🧵 (1/3)
Please congratulate our newest PSF Fellow Members for Q3, 2026! Their continued contributions to the Python ecosystem are so very important to our community. #Python
https://pyfound.blogspot.com/2026/10/announcing-python-software-foundation.html
Python Tip #107 (of 365):
Use the walrus operator to simplify "while" loops.
This generator function reads a file in chunks:
def read_in_chunks(path):
with open(path, mode="rb") as file:
chunk = file.read(8192)
while chunk:
yield chunk
chunk = file.read(8192)
Notice that "chunk = file.read(8192)" appears twice: once before the loop and once at the end.
This is a somewhat common pattern with "while" loops.
🧵 (1/2)
Python Tip #291 (of 365):
Check regex matches with the walrus operator.
Do this:
if match := UNITS_RE.search(string):
return match.groups()
Not this:
match = UNITS_RE.search(string)
if match:
return match.groups()
More on this:
https://pym.dev/using-walrus-operator/
🧵 (1/3)
“Using __slots__ can save memory because each instance of your class won't use a dictionary to store its attributes.”
Read more 👉 https://pym.dev/__slots__/
“But this fuzziness is consistent with Python's embrace of duck typing.”
Read more 👉 https://pym.dev/class-or-function/
Python Tip #290 (of 365):
Pretty-print data structures with pp.
>>> from pprint import pp
>>> pp(user)
{'name': 'Trey',
'languages': ['Python', 'JavaScript'],
'address': {'city': 'San Diego', 'state': 'CA'}}
🧵 (1/4)
Python quizz of the day:
```python
l = []
l.append(l)
m = []
m.append(m)
l == m
```
| True: | 0 |
| False: | 1 |
| RecursionError: maximum recursion depth exceeded: | 3 |
| Stack overflow: | 0 |
@adamchainz Nice writeup, glad you like it!
I also find it useful for checking stuff like release dates, latest patch versions, and looking up Ubuntu codenames <-> versions.
💡 Tip: you can check a few on one go:
$ eol django python postgresql
✍️ New post on using @hugovk’s norwegianblue tool to check end-of-life dates relevant to Django developers.
“NotImplemented is basically a way to signal to Python: I don't know how to perform this operation, go ask the other object instead.”
Read more 👉 https://pym.dev/when-to-use-notimplemented/
Python Tip #289 (of 365):
Add context to exceptions with add_note.
def load_config(path):
try:
return json.loads(Path(path).read_text())
except json.JSONDecodeError as error:
error.add_note(f"While parsing {path}")
raise
🧵 (1/4)
Thinking of writing all my #Python strings with escape codes and interpolations as `f""`, and all the others as `r''` (yes, I kinda like `bash`'s differentiation).
📰 Issue 359: Python 3.15 Is Here and Python 3.16 Alpha 1
https://django-news.com/archive/issue-359-python-315-is-here-and-python-316-alpha/
@xahteiwi This year was "Europe’s largest Python, AI & software engineering conference"... https://2026.pycon.de/
#Python
"The leading conference for applied AI with Open Source" is rather odd branding for a #Python conf.
Edit: ... and their `og:description` says "largest", which makes it doubly weird.
Looking for recommendations for really, truly beginner teach yourself #Python resources. Teenager friend is cautiously curious.
I’d like to point them to in-browser tutorials first while we work out what’s safe now for someone with only one computer.
I’ve liked RealPython before - still good?
I can do some sysadminning and over the shoulder, but would rather set them up to investigate independently, the way we learned
Ever wondered about the history of Python's 2 modules for randomness?
I wrote an article for LWN about that recently. It's now available for non-subscribers.
Python Tip #288 (of 365):
Show a value's repr with "!r" in f-strings.
>>> name = "Trey"
>>> print(f"Name: {name}")
Name: Trey
>>> print(f"Name: {name!r}")
Name: 'Trey'
By default, f-strings use the human-readable representation of an object (str instead of repr). The "!r" suffix forces the repr version.
Most objects have the same str and repr, but some (like strings and datetime.date objects) don't.
🧵 (1/4)
“When we pipe the output of this program to a file, by default, only the standard output stream will be piped to that file:”
Read more 👉 https://pym.dev/standard-error/
strtoolz now includes `replace_count()`, `replace_exactly()`, & `replace_nth()` https://pypi.org/project/strtoolz/
>>> strtoolz.replace_counted('A man, a plan, a canal, Panama', 'an', 'AN')
('A mAN, a plAN, a cANal, PANama', 4)
>>> strtoolz.replace_exactly('A man, a plan, a canal, Panama', 'an', 'AN', count=5)
...
ValueError: Only 4 occurrences could be replaced, required 5
>>> strtoolz.replace_nth('A man, a plan, a canal, Panama', 'an', 'AN', n=1)
'A man, a plAN, a canal, Panama'
With a little bit of working around pytest-asyncio not quite working yet, asgiref works with Python 3.16a1:
py316-test: OK (14.54=setup[0.96]+cmd[13.58] seconds)
congratulations :) (14.61 seconds)
✅ #python
Python 3.10 reached end of life a couple weeks ago.
If you maintain a library and you're wondering what's in Python 3.11 that you can use, here's a cheat sheet.
Upgrading to Python 3.14 because you like to stay one Python version behind at all times? This cheat sheet's for you too.
It's nowhere near comprehensive. I've tried to make short but useful.
The printable version shows more features and a support timeline More cheat sheets at http://pym.dev/cheat-sheets
Python Tip #287 (of 365):
Read tracebacks from the bottom up.
Traceback (most recent call last):
File "/home/trey/count.py", line 12, in <module>
main()
~~~~^^
File "/home/trey/count.py", line 9, in main
count_to(stop)
~~~~~~~~^^^^^^
File "/home/trey/count.py", line 4, in count_to
for n in range(1, number+1):
~~~~~~^~
TypeError: can only concatenate str (not "int") to str
🧵 (1/4)
“If something feels more like a function than a class, we often just call it a function.”
Read more 👉 https://pym.dev/class-or-function/
I plan to teach my daughter programming next year or so. But she doesn't read/write English.
A few months ago I saw a talk by/about a woman in tech, where she mentioned a localizable #Programming language (will find the video later).
Meanwhile, there exist #Python modules for parsing Python code, so in theory one could localize the syntax. An extra step would be to localize the stdlib.
Now I just need 48h days w/o health impacts.
So #python 3.15's new sentinels are... like Lisp symbols? Is there any fundamental difference?
Sounds similar to creating an empty class and using the class (and not a singleton instance) as value (but I see now it would make typing impossible)
And what does this mean? `total: None | float | NOTHING = NOTHING` (from https://mathspp.com/blog/pydonts/sentinel-builtin )
I suppose it's never too late to get to know #Python's `argparse` module a little bit better…
> The parse_args() method by default allows long options to be abbreviated to a prefix, if the abbreviation is unambiguous (the prefix matches a unique option): […]
And indeed:
> allow_abbrev - Allows long options to be abbreviated if the abbreviation is unambiguous (default: True)
Maybe that's something new? YMMV…
> Changed in version 3.5: allow_abbrev parameter was added.
The September 2026 contributions report, covering contributions to #Debian by #Freexian collaborators, is now available at https://www.freexian.com/blog/debian-contributions-09-2026/?utm_source=mastodon&utm_medium=social
Read about the new experimental backend for autopkgtest using pconr, the site visit in preparation for DebConf 27 and more.
We thank the organizations subscribing to our Long Term Support contracts (https://www.freexian.com/lts/?utm_source=mastodon&utm_medium=social) and consulting services (https://www.freexian.com/services/?utm_source=mastodon&utm_medium=social) for making this possible.
“You can use Python sets for removing duplicates, as long as you don't care about maintaining the order of your items.”
Read more 👉 https://pym.dev/practical-uses-of-sets/
The October edition of the PSF Board Office Hour is about to begin 🐍 🗒️ 9 PM UTC. Join us to share how we can help your community, express your perspectives, and provide feedback for the PSF! #Python
https://pyfound.blogspot.com/2025/10/a-new-psf-board-another-year-of-psf.html
Python Tip #286 (of 365):
Know your way around the Python docs.
The docs at https://docs.python.org/3/ have many different types of pages.
It's helpful to note which kind of page you're on and consider whether you're in the right place.
🧵 (1/4)
I've kicked off the wind-down work on @jazzband and have sent out emails to most (all?) project leads and people involved.
In case there is a Jazzband project you care about, please check out the dedicated project board and engage: https://github.com/orgs/jazzband/projects/16/views/7
🐍 Python 3.15: JIT experimental, UTF-8 y lazy imports https://www.linuxadictos.com/python-3-15-estrena-jit-experimental-utf-8-por-defecto-y-cambios-para-desarrolladores.html
How well do you know Python 3.15's new features?
I made a quiz of some of my favorite features so you can test yourself.
Comic from Pablo:
https://bsky.app/profile/did:plc:3cftygah4elv4znu3wrxtujv/post/3mxoq7wvk2227
(And a secret final message on the 3.10 tag)
Python Tip #285 (of 365):
Learn to use the help function.
>>> help(print)
Help on built-in function print in module builtins:
print(*args, sep=' ', end='\n', file=None, flush=False)
Prints the values to a stream, or to sys.stdout by default.
...
Note that help works offline. Even if you're stuck without Internet access, you can still read documentation.
🧵 (1/3)
Parsing JSON at tens of gigabytes per second… in Python https://lobste.rs/s/iufma5 #python
https://lemire.me/blog/2026/10/12/parsing-json-at-tens-of-gigabytes-per-second-in-python/
Wenn man wissen möchte, wie lange der Linuxrechner eingeschaltet war, kann man das mit dem Programm "last" machen.
Wenn man eine grafische Auswertung haben möchte, bietet sich Python dazu an. Wie man das machen könnte, zeige ich hier:
#python #almalinux #linux #pandas
https://sven-essen.de/2026/04/22/systemlaufzeit-auf-dem-rechner-grafisch-anzeigen-lassen/
RE: https://mastodon.social/@y2mango/117420695104747052
Holy cow, how have I not known about this before? Jump directly to the #Python function you're looking for! Or details of >1000 third-party packages!!
https://pyref.dev/
@f_dion 💡 Tip: before Python 3.15 is your minimum, instead of the lazy keyword, you can use __lazy_modules__ instead:
__lazy_modules__ = {"json"}
import json
import sys
Python 3.14 and earlier will ignore it, and 3.15+ does the lazy thing.
https://docs.python.org/3/whatsnew/3.15.html#whatsnew315-lazy-imports
https://docs.python.org/3/reference/datamodel.html#module.__lazy_modules__
#Python #python315 #LazyImports
“Dictionaries are meant to make it easy to look up the value that corresponds to a particular key.”
Read more 👉 https://pym.dev/using-dictionaries-in-python/
Python Tip #284 (of 365):
Import from another directory by adding it to sys.path.
from pathlib import Path
import sys
our_directory = Path(__file__).parent
sys.path.insert(0, str(our_directory / "vendored_utils"))
This is a bit of a hack. It works great in your own project, but I wouldn't want to see it in an installable package.
🧵 (1/3)
@creepy_owlet Yes, Tachyon helped me quickly find a bottleneck in @pillow:
boosted🚨 Important Announcement 🚨
Going forward all my packages will only "officially" support maintained #Python versions. Meaning since October only 3.14 and now 3.15.
This has no effect on Django version support.
CVEs will be backported to older 🐍 release.
“Whether something happens to be implemented as a class or a function is often just an implementation detail.”
Read more 👉 https://pym.dev/class-or-function/
Python Tip #283 (of 365):
Delay slow imports until they're needed.
Say your command-line tool has a "--plot" option that uses matplotlib.
If "import matplotlib.pyplot" sits at the top of your module, every run of your tool takes about 0.4 seconds to import matplotlib... even runs that never plot anything!
That's ~25 times longer than Python takes to start!
🧵 (1/4)
RE: https://mastodon.social/@hugovk/117288511700924676
Great #python315 release thread! 🧵
The @aio_libs @aiohttp ecosystem also supports #Python 3.15, by the way!
Python 3.15 introduces lazy imports, UTF-8 as the default encoding, faster experimental JIT performance, and new profiling tools.
https://linuxiac.com/python-3-15-released-with-faster-jit-lazy-imports-and-utf-8-by-default/
Scrippy : en finir avec script_final_old_v3_OK_last.py https://linuxfr.org/news/scrippy-en-finir-avec-script_final_old_v3_ok_last-py #administration_système #Python #python #script #devops
Wonderful proof of what you can achieve in a 3 morning long Open Source sprint in person, with the right people in the room, and enough time to relax. 🚀
Great job @carlton @lilyf @jacobtylerwalls @samueljsb @meshy @caleb and Simon 👏
#Django #DjangoOnTheMed #Python #Async #ORM
https://chaos.social/@carlton/117409521064859261
This month's Stack Report is going out now: Towards Async Transactions in Django
(And yes, it's also an advert for Django on the Med 🏖️).
https://noumenal.es/stack-report/towards-async-transactions-in-django/
Before 3.14, if we wanted to copy or move a file, we had to use Python's shutil module
Read more 👉 https://trey.io/flfwr9
I made a 14 question quiz on some hand-picked Python 3.15 features:
https://pym.dev/quiz/python-3.15
Take it before watching my video on 3.15 to see how many you already knew.
Guessing before you learn something helps learning stick better, even when the guesses are wrong (sometimes called the pretesting effect).
I doubt you'll get most of them right, even after the video. I just took it and got 13/14... and I made the quiz and have been studying these features for a while now.
I just played a text adventure game all about Python 3.15's new features.
uvx --python 3.15 whatsnewt
Score 299 of 375
Puzzles 14 of 18
Souvenirs 6 of 8
Rooms 14 of 15
Curiosities 0 of 11
Moves 26
I apparently left behind an abi3t badge and a swatch of colors.
And I never found xyzzy, plugh, newt, spam, zen, barry, thomas, pablo, donghee, savannah, or hugo.
That was fun, despite the noticeable Claudisms in the text.
also
✅ update 3.15 label:
https://github.com/python/cpython/labels
✅ rebuild devguide to update:
https://devguide.python.org/versions/
✅ unlock 3.15 branch
And I think that's it!
Hey, @savannah, you're up next with the first 3.16 alpha on Tuesday! 🚀
It's not over yet!
I updated PEP 790 https://github.com/python/peps/pull/5164, which also updates the PEPs API, which is used to point the docs at /3/ to 3.15, kicked off a docs build: https://docs.python.org/3/
Unpin https://mastodon.social/@hugovk/115333348041057866 and pin https://mastodon.social/@hugovk/117411399858939022 to my profile.
(3.14 might not be the newest, but we can still celebrate with pie!)
And then unlock the 3.15 branch so the core team can start merging 185 PRs that didn't get in during RC:
https://github.com/python/cpython/pulls?q=is%3Aopen+is%3Apr+base%3A3.15
🐍🚀 Out now: Python 3.15.0 final!
💤 Lazy imports!
🧊 frozendict builtin!
💂 sentinel builtin!
📉 Tachyon profiler!
🖼️ Frame pointers everywhere!
🛅 Unpacking in comprehensions!
🗣️ UTF-8 as the default encoding!
🛞 Stable ABI for free-threading!
🆕 Package startup config files!
⌨️ TypedDict & TypeForm!
🐎 Faster JIT!
🎨 More colour!
🚌 & more!
https://discuss.python.org/t/python-3-15-0-final-is-here/109415?u=hugovk
Huge thanks to @sovtechfund supporting my work as release manager and enabling another smooth release!
RE: https://mastodon.social/@hugovk/117411399858939022
🎉 Happy #Python 3.15 release to those who have been testing it in CI, and to everyone who prepped for it!
🐍🚀 Out now: Python 3.15.0 final!
💤 Lazy imports!
🧊 frozendict builtin!
💂 sentinel builtin!
📉 Tachyon profiler!
🖼️ Frame pointers everywhere!
🛅 Unpacking in comprehensions!
🗣️ UTF-8 as the default encoding!
🛞 Stable ABI for free-threading!
🆕 Package startup config files!
⌨️ TypedDict & TypeForm!
🐎 Faster JIT!
🎨 More colour!
🚌 & more!https://discuss.python.org/t/python-3-15-0-final-is-here/109415?u=hugovk
Huge thanks to @sovtechfund supporting my work as release manager and enabling another smooth release!
Python 3.15 is now out! 🐍🎉
My favorite new features include:
• UTF-8 default file encoding everywhere (less buggy cross-platform reads/writes!)
• a new sampling profiler with nearly no overhead
• explicit lazy imports: lazy import json
• unpacking in comprehensions: [*sub for sub in nested]
• a built-in sentinel type
• frozendict
• pprint(data, expand=True)
• re.prefixmatch
• more helpful error messages & more color
A short demo of all my favorites:
https://youtu.be/OD0QObnCZmA
🐍🚀 Out now: Python 3.15.0 final!
💤 Lazy imports!
🧊 frozendict builtin!
💂 sentinel builtin!
📉 Tachyon profiler!
🖼️ Frame pointers everywhere!
🛅 Unpacking in comprehensions!
🗣️ UTF-8 as the default encoding!
🛞 Stable ABI for free-threading!
🆕 Package startup config files!
⌨️ TypedDict & TypeForm!
🐎 Faster JIT!
🎨 More colour!
🚌 & more!
https://discuss.python.org/t/python-3-15-0-final-is-here/109415?u=hugovk
Huge thanks to @sovtechfund supporting my work as release manager and enabling another smooth release!
Windows complete, tags pushed upstream, Sigstore signing done, adding files to python.org... nearly there...
Python Tip #282 (of 365):
Read your package's data files with importlib.resources.
>>> from importlib import resources
>>> resources.files("dinner").joinpath("recipes.json").read_text()
'{"tacos": ["tortillas", "beans", "salsa"]}\n'
🧵 (1/3)
In the meantime, the GitHub Actions build has finished, SBOMs created and some things uploaded.
The Windows process has paused a couple of times, awaiting button clicks to approve signing of binaries. The whole release team gets emails about this, so no sneaking out signed releases. 🥷
The release artifact build failed, need to bump blurb in that lockfile too:
https://github.com/python/release-tools/actions/runs/37922985653/job/113795259513
Like this:
https://github.com/python/release-tools/pull/451
Now restarted that workflow with the existing CPython tag, no need for retag.
This builds source+docs tarballs and Android+iOS artifacts. Takes ~30 mins.
https://github.com/python/release-tools/actions/runs/37925506436
Ned Deily has started the macOS installer builds. And I've started the Windows installer builds, takes ~2 hours:
https://dev.azure.com/Python/cpython/_build/results?buildId=175636&view=results
📰 Issue 358: Django 6.1.2, 6.0.9, and 5.2.18 Security Releases and Djangonaut Space Session 7
https://django-news.com/archive/issue-358-django-612-609-and-5218-security/
OK, merged and released (really easy using Trusted Publishing, https://docs.pypi.org/trusted-publishers/), lockfile updated and backported.
https://github.com/python/cpython/pull/159058
https://github.com/python/cpython/pull/159060
Restarted the release and that's better now.
A temporary branch and tag has been pushed to my fork, and I need to verify the release commit does not contain any unexpected changes:
https://github.com/hugovk/cpython/commit/d220409a13b77de7a6c30abe16ea90db01528edc
All looks good. Next to start the installer and artifact builds.
Pushing the big launch button:
.venv/bin/python run_release.py --repository ../cpython --ssh-user hugovk --release 3.15.0
... and immediately ran into a bug with our changelog tool `blurb`, because we've had no new NEWS fragments since rc3 :)
This needs a fix in blurb, a new PyPI release, and then the docs lockfile regenerated and backported to 3.15.
Pydantic finally added support for Python 3.15 yesterday, and aiohttp on Monday, so I *could* use Python 3.15 rc3 to run the release scripts and release Python 3.15.0 final!
But... I'm going to respect our seven-day cooldown, and stick with 3.14.
You also use cooldowns for your dependencies, right?
https://blog.yossarian.net/2025/11/21/We-should-all-be-using-dependency-cooldowns
Python 3.15.0 release day (second attempt)!
✅ Release date updated in What's New in Python 3.15 https://github.com/python/cpython/pull/159053
✅ No release blockers https://github.com/python/cpython/labels/release-blocker
✅ No deferred blockers https://github.com/python/cpython/labels/deferred-blocker
✅ Buildbots all green https://buildbot.python.org/release-status/
What's New in Python 3.15:
tomllib
tomllib now supports TOML 1.1.0, a backwards compatible update:
* Newlines and trailing commas allowed in inline tables: tbl = { key = "a string", moar-tbl = { key = 1, }, }
* \xHH escapes for codepoints under 255, and \e for the escape character: csi = "\e["
* Seconds optional in datetime and time values: dt = 2010-02-03 14:15
(Contributed by Taneli Hukkinen.)
Wasserstand-Script angepasst. Es werden jetzt die Pegel der 2 berühmtesten Nebenflüsse des Rheins bei Worms in Echtzeit hingeschrieben, Pfrimm und Eisbach
Wenn sie keine API anbieten ,…
https://github.com/dewomser/baeche-in-rlp
Would people be interested in a blog post or perhaps a series of posts walking through the process of making some contributions to #Python?
I have some free time (i.e., unemployed), and a couple things I’d like to do, mostly in documentation, and I figured if there’s interest I can write it up.
i woke up this morning at 4:30am to use the bathroom and could not get back to sleep afterwards. As i lay in bed in the pre-dawn dark my mind went down strange pathways and i found myself having a revelation: there is an unmet need in the world for a program that can sort files - at the bit level! Thus, i wrote sortbits.py a simple command line tool to let you sort all of the bits in a file. You can either sort it in ascending order so the zeros come before the ones, or you can sort it in descending order so the ones come before the zeros. Once your file is sorted you will be able to use efficient search algorithms to find the exact bit that you are looking for. So here is the script for all to use and enjoy!
You're welcome.
https://moriels-musings.com/wp-content/uploads/2026/10/sortbits.py
“The TemporaryDirectory context manager is great if you need to temporarily change your current working directory or if you need anything more complex than a single temporary filename.”
Read more 👉 https://pym.dev/temporary-files/
PSA: Europe changes time forward soon, North America next, for the last time? https://anarc.at/blog/2026-10-08-dst-warning #news #time #debian-planet #python-planet
Python Tip #281 (of 365):
Bundle your package into one runnable file with zipapp.
$ python3 -m zipapp src -m "greet.cli:main" -p "/usr/bin/env python3" -o greet.pyz
$ python3 greet.pyz
Hello from greet!
$ ./greet.pyz
Hello from greet!
That ".pyz" file is a zip file holding everything in src (here, yesterday's greet package) plus a __main__.py file that zipapp writes at its root:
# -*- coding: utf-8 -*-
import greet.cli
greet.cli.main()
🧵 (1/3)
Python 3.6 added the "secrets" module to Python about 10 years ago. At that point, it had a "random" module for many years already.
If you've ever wondered why Python has two different modules for generating random numbers, you might enjoy this article I wrote about it for LWN.
It's subscriber-only at the moment, but this link will give you access to read it: https://lwn.net/SubscriberLink/1097468/337c54eb66d5ba97/
RE: https://mastodon.social/@hugovk/117401375574201367
if you're also looking forward to 3.15's (hopeful) release day tomorrow, check out Hugo's thread on what's new tibdits.
I've learned about a few things I'm definitely going to be using once I upgrade.
What's New in Python 3.15:
🦋 pprint 🖨️
* Add an expand keyword argument for pprint.pprint(), pprint.pformat(), pprint.pp(). If true, the output will be formatted similar to pretty-printed json.dumps() when indent is supplied. (Contributed by Stefan Todoran, Semyon Moroz and Hugo van Kemenade.)
* Add t-string support to pprint. (Contributed by Loïc Simon and Hugo van Kemenade.)
📺 Watch PSF Executive Director @baconandcoconut close out #RustConf2026 with a fireside chat on stewarding Rust and Python: AI's impact, security, governance, and leading global communities. https://youtu.be/z5_tEecNkRs?si=EFL6hA5nxAVp4Ied
Ondřej Kuzník, one of the python-ldap maintainer, on @LDAPcon 2026 stage
https://github.com/cannatag/ldap3
Python Tip #253 (of 365):
Avoid import side effects in your Python modules.
As a general rule, the top level of a module should only DEFINE things. Define functions, classes, constants and any other objects meant to be accessed after import. But don't print, prompt for input, write to files, etc.
🧵 (1/3)
Python Tip #280 (of 365):
Make your package runnable with a __main__.py file.
greet
├── cli.py
├── __init__.py
└── __main__.py
When you run a package with "python3 -m", Python runs its __main__.py file:
$ python3 -m greet
Hello from greet!
Without that file, the package can't be run directly:
$ python3 -m food_utils
No module named food_utils.__main__; 'food_utils' is a package and cannot be directly executed
🧵 (1/3)
What's New in Python 3.15:
🦋 pprint 🖨️
* Add an expand keyword argument for pprint.pprint(), pprint.pformat(), pprint.pp(). If true, the output will be formatted similar to pretty-printed json.dumps() when indent is supplied. (Contributed by Stefan Todoran, Semyon Moroz and Hugo van Kemenade.)
* Add t-string support to pprint. (Contributed by Loïc Simon and Hugo van Kemenade.)
“The next time you need to hard-wrap text in Python, check out the textwrap module's wrap and fill functions.”
Read more 👉 https://pym.dev/wrapping-text/
🗞️🐍check your inboxes, a new PSF newsletter shipped!
Want to stay up to date on the latest PSF, @pycon US, @pypi, and #Python news? Subscribe today: https://www.python.org/psf/newsletter/
I'm super excited! My `layout uv` PR was merged into direnv and shipped in v2.38.1. Jonas Chevalier was the final reviewer, decider, and he merged and released my PR. Many people contributed advice. I tried to write something that I needed myself, and in such a way it would be useful to everyone else and fit into the tool I was trying to grow.
If your Python project uses uv, put `layout uv` in your .envrc. When you cd into the project, direnv syncs the environment from your lockfile and puts it on your PATH, and it all unwinds when you leave.
direnv install: https://direnv.net/docs/installation.html
uv: https://docs.astral.sh/uv/
The PR (now closed, but for historical context): https://github.com/direnv/direnv/pull/1594
“For most applications of random numbers, the random module is good enough.”
Read more 👉 https://pym.dev/random-numbers/
Python Tip #279 (of 365):
Simplify your package's interface with __init__.py.
Yesterday's tip noted that an empty __init__.py file is common and completely fine.
But that file doesn't HAVE to be empty.
Python's json module is actually a package, and its __init__.py file imports all the objects relevant to json module users:
from .decoder import JSONDecoder, JSONDecodeError
from .encoder import JSONEncoder
🧵 (1/3)
What's New in Python 3.14:
"The import time for several standard library modules has been improved, including annotationlib, ast, asyncio, base64, cmd, csv, gettext, importlib.util, locale, mimetypes, optparse, pickle, pprint, pstats, shlex, socket, string, subprocess, threading, tomllib, types, and zipfile."
https://docs.python.org/3.14/whatsnew/3.14.html#optimizations
#Python #Python314 #WhatsNew
Python Tip #278 (of 365):
Always include a __init__.py file in your Python packages. Even an empty one.
food_utils
├── fruits.py
├── __init__.py
└── non_fruits.py
A package is a directory that Python treats like a module.
When you import the package, the module you get back IS the __init__.py file:
>>> import food_utils
>>> food_utils
<module 'food_utils' from '/home/trey/food_utils/__init__.py'>
🧵 (1/3)
“The break statement in that inner loop will only break out of the inner loop.”
Read more 👉 https://pym.dev/breaking-out-of-a-loop/
Linux, Hardware & Programmieren – selbst ausprobieren!
Im Rahmen der Code Week Bayern lädt TUXEDO Schülerinnen und Schüler zu zwei Workshops ein:
29.10.2026: Hardware zum Anfassen – Laptop öffnen, Komponenten kennenlernen und selbst arbeiten.
05.11.2026: Erste Schritte mit Python – programmieren lernen ohne Vorkenntnisse.
📅 Jeweils 16:30–18:30 Uhr
📍 TUXEDO Headquarter, Alter Postweg 101, Augsburg
Bitte vorher anmelden.
https://bayern.codeweek.de/programm/event/03273781-aee2-4a91-8d76-f9db9384769b_398/computer-und-programmierung-mal-anders-mit-linux
🚀 rst2gemtext v0.7.1 released
rst2gemtext converts reStructuredText to Gemtext (Gemini markup format).
This version adds support for csv-table with irregular column counts across rows.
Python Tip #277 (of 365):
For substring checks, use the "in" operator.
Python has a special operator that's meant JUST for checking whether one thing is contained inside another:
>>> part = "Python"
>>> whole = "I enjoy writing Python code."
>>> part in whole
True
More on this:
https://pym.dev/substring-check/
🧵 (1/3)
“I almost always need a temporary file with an actual name, so I pretty much always use NamedTemporaryFile instead of TemporaryFile.”
Read more 👉 https://pym.dev/temporary-files/
Python Tip #276 (of 365):
Make self positional-only when accepting "**kwargs".
This class accepts arbitrary keyword arguments... except for self:
>>> class Namespace:
... def __init__(self, **kwargs):
... for name, value in kwargs.items():
... setattr(self, name, value)
...
>>> space = Namespace(other=2, self=1)
Traceback (most recent call last):
...
TypeError: Namespace.__init__() got multiple values for argument 'self'
🧵 (1/3)
“Sophisticated isn't bad, but don't use a more complex option when a simpler one might be easier to read and easier to maintain.”
Read more 👉 https://pym.dev/default-dictionary-values/
Fun test improvement by @akx for @pillow recently:
Use an id in pytest.param to prevent 30,000 Xs showing in the test logs!
Python Tip #275 (of 365):
Pre-fill arguments with functools.partial.
>>> from functools import partial
>>> hex_to_int = partial(int, base=16)
>>> hex_to_int("CAFE")
51966
This is sometimes called "partially evaluating" a function.
I prefer this:
hex_to_int = partial(int, base=16)
Instead of this:
hex_to_int = lambda s: int(s, base=16)
partial is more specialized than "lambda": its only purpose is to call a callable with certain arguments preset.
🧵 (1/3)
Get yer rc3 here!
https://discuss.python.org/t/python-3-15-0-candidate-3-is-here/109327
You know the drill: please test and report bugs!
Library maintainers, join the Cool Testers' Club 😎 and add 3.15 to your test matrix:
https://hugovk.dev/blog/2026/help-test-python-315/
Python 3.15.0 final planned for 2026-10-09.
The three lazy blockers are finally merged into `main`, two have been backported to `3.15`, but wait, the third failed, because it depends on some tests not yet backported.
https://github.com/python/cpython/pull/158613
Okay, backport created, merge conflict fixed, CI is now spinning, and automerge enabled. That'll merge in about 15 mins, then we can update it into the last blocker PR, that should merge about 30 mins later, and rc3 can begin!
“Interestingly, negative numbers do work for self-concatenation, they'll just always give an empty string.”
Read more 👉 https://pym.dev/self-concatenation/
Now there's an official #Python time complexities page in the docs: https://docs.python.org/3/builtins/time-complexity.html
You don't have to point to the old wiki page (https://wiki.python.org/moin/TimeComplexity) any more!
Python Tip #274 (of 365):
Prefer to name your functions.
Instead of this:
>>> sorted(items, key=lambda item: int(item.split()[0]))
['1 avocado', '2 tomatoes', '4 clementines', '6 bananas']
I'd usually write this:
>>> def by_quantity(item):
... quantity, name = item.split()
... return int(quantity)
...
>>> sorted(items, key=by_quantity)
['1 avocado', '2 tomatoes', '4 clementines', '6 bananas']
🧵 (1/3)
Following recent tradition, I’m going to add a surprise third release candidate!
It makes sense to include the last-minute lazy-import fixes in 3.15.0 final.
It also makes sense to give time to test them properly, so today’s planned 3.15.0 final is postponed, and I’m going to release a 3.15.0rc3 tomorrow, assuming everything is in place.
And then 3.15.0 final will follow about week later. Exact date to be announced.
We’re nearly there! 🤞
https://discuss.python.org/t/python-3-15-following-tradition-lets-have-a-surprise-rc3/109313
“This makes our code a little bit shorter as we're debugging, and also makes the output a little bit more helpful.”
Read more 👉 https://pym.dev/debugging-with-f-strings/
new post: QR codes that can be read multiple different ways!
Including a \\ world first // (?) four different payloads in a single QR code!
https://halcy.de/blog/2026/10/01/qr-codes-that-can-be-read-multiple-different-ways/
django-letter 0.5 gets a new `attached_static` template tag, a "tracking blocker" mode and a face lift.
django-modern-rest@0.16.0 release https://lobste.rs/s/fujfew #python #release #web
It's been 25 years I program in #python and while I understand the name mangling behind the double underscore variables and everything, I still can't find why I would want to use it.
From my point of view this is one historical quirk that will stay forever but shouldn't be used.
In July 2026 Python core developers and special guests sat down at the #Python Language Summit at #EuroPython 2026, to discuss the future of the Python programming language including free-threading, #Rust, garbage collection, and namespaces. Find a summary on the PSF blog ⬇️
https://pyfound.blogspot.com/2026/09/python-language-summit-2026.html
That passed, the buildbots are back to green ✅
https://buildbot.python.org/release-status
Next, issues/PRs with release-blocker label:
https://github.com/python/cpython/labels/release-blocker
One is a straightforward docs update, I marked as blocker so I don't forget, to change future tense to present.
Then three last-minute lazy import blockers that need a closer look.
RuntimeError: join took too long: <Process name='Process-2107' pid=2290504 parent=2276730 started daemon>
https://buildbot.python.org/#/builders/2047/builds/358
Looks like a flaky test, and https://github.com/python/cpython/issues/157184 has a fix to increase a timeout. Will try restarting for now.
The US woke up and they're both back up!
https://github.com/python/psf-salt/pull/657
Now, there's one tier 1 failure to check.
Python 3.15.0 release day!
First blocker, we're getting 503s on https://docs.python.org and https://buildbot.python.org, the latter of which is needed to check the tier 1 and 2 buildbots are passing, needed for a release.
It's a certificate issue from an incompatible pyOpenSSL upgrade. We're waiting for the US to wake up and poke it with a stick.
"One namespace to namespace them all" by @ThePSF - summary of presentation by Pablo Galindo Salgado from Python Language Summit 2026 in July. #Python🐍 is considering a standard library reserved namespace "std" to prevent files in a user's package search path from accidentally overriding them. Pros & cons discussed: can't break previous packages but could allow future standard packages to require it. Possible to unbundle std packages to PyPI. https://blog.python.org/2026/09/language-summit-2026-namespaces/ #software #engineering #tech
Python 3.15 ships a sampling profiler, Tachyon, as profiling.sampling. I wrote a set of hands-on JupyterLab workshops to learn it myself, mostly to find out whether wrapture could make use of it. Short answer, no, but they turned out to be a good way into the profiler and are now ready for others. 21 workshops over two collections, launchable on Binder with nothing to install.
https://grahamdumpleton.me/posts/2026/10/getting-to-know-tachyon/
Changement de saison, c'est l'heure du bilan. Sous ces chaleurs estivales caniculaires, à quoi a contribué l'équipe de Yaal Coop ?
On ne vous fait pas languir, à plein de choses comme d'habitude, mais principalement sur les outils #python #scim dans le cadre de @nlnet @NGIZero avec @IndieHosters en préparation de contributions futures à @lasuite pour une utilisation dans @LaSuiteCoop 🤯
New season, time to look back. What did the Yaal Coop team work on during this scorching summer heatwave?
We won't keep you waiting: lots of things as usual, but mostly #python #scim tools, funded by @nlnet @NGIZero, together with @IndieHosters. This work prepares future contributions to @lasuite, to be used in @LaSuiteCoop 🤯
https://yaal.coop/en/blog/dernieres-contributions-logiciels-libres-ete-2026
“Fortunately, as of Python 3.12, instead of specifying delete=False, we can just specify delete_on_close=False:”
Read more 👉 https://pym.dev/temporary-files/
What's New in Python 3.15:
⚙️ sys ⚙️
* Add sys.abi_info namespace to improve access to ABI information. (Contributed by Klaus Zimmermann.)
We're still #hiring at PowerDash! Are you a full stack engineer with a strong #Python / #Django bent who is into #RenewableEnergy? (Or do you know one?)
It's a great little company in an important sector.
The office is in Cambridge MA (Harvard Square), with full use of the adjoining Workbar co-working space. Role is on-site or hybrid.
Senior Full Stack Software Engineer: https://apply.workable.com/powerdash/j/7BE934710D/
Bon c’est bien beau mais on fait quoi de https://python.fr ?
https://discuss.afpy.org/t/que-faire-de-python-fr/3247
(partage si t’as pas d’idées, les autres en ont :D)
Who's still using black? If you don't know what I'm talking about, black is a #Python code formatter
1. When styling a particular UI element in generic fashion in the main application, that will impact the same UI element in, for instance, a temporary modal/popup.
2. Apparently the Select and SelectionList UI elements use OptionList under the hood? Styling it caused the first 2 to be confusingly impacted.
Lessons for me:
- Avoid styling generic UI elements, unlike most https://textual.textualize.io/ examples; target the specific ids instead.
- Revisit https://textual.textualize.io/guide/CSS/