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.
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/
Django London is back for October! 🐍
📅 Wed 14 Oct, 6:15pm (a Wednesday this time!)
📍 Kraken, 182 Oxford Street
🎤 Who lost our customers? Investigating a human error, by Sofia Fischer
Why "human error" should never be the root cause of an incident.
🍕 Thanks to Kraken for sponsoring!
Stars in my galactic star map application, generated randomly with real science and math backing them up. Still working on it.
I need to switch over to a 3D rendering library to minimize data transfer to the client to render the map. Lots, lots, lots, and lots of bugs to fix (I'm up to 120 that I've noticed myself). However, it's coming along nicely.
Yes, I used and will continue to use AI. Please don't comment about how evil it is or how I'm not really doing anything and yada yada yada. I don't care what you think. For those that want to know, I did code this, for the first 5 versions I used no AI, all the math was by hand, but as much as I studied I could not continue. I am a math teacher, not a coder, so I turned to AI to make my vision come true after going as far as I could without. As an amateur developer, I am using my math skills to research and design the algorithms before I hand off to AI for implementation and I review code by hand as well.
This is all open sourced under creative commons with attribution.
https://github.com/dwhagar/planetGen
#programming #scifi #claude #ai #galaxy #rolePlayingGames #ttrpg #rpg #ffrp #python
Neue VHS-Kurse im 4. Quartal 2026!
Von Oktober bis Dezember geht es in meinen Kursen u. a. um 🐧 Linux & Open Source, 🤖 KI mit ChatGPT und Mistral Le Chat, 🐍 Python, Netzwerke, VirtualBox und macOS.
Online und in Präsenz – praxisnah und auch für Einsteiger.
Alle Termine und Infos:
https://www.eisenmenger.training/meine-kurse/
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
Fun read, and definitely touches on many of the reasons I prefer #plaintext
With the
> I do not want a financial workbook turned into a pile of numbers that requires me to reconstruct all the formulas manually
I actually *want* much of my data in plain-text (usually CSV or TSV, but sometimes recutils¹ format or remind² format for my calendar or plain-text accounting format ³for my finances) separate from the formulae/processes that operate on it. Sometimes that's an #awk or #python script, for the calendar, remind(1) processes those, and for my finances, ledger(1) or hledger(1) processes those). It brings all those benefits of plain-text to each of those domains, too.
Similarly
> A word processor can handle page layout that would be tedious to reproduce manually.
I've lost countless hours fixing things in Word/LibreOffice/Abiword after moving an image a smidge to the left caused reflow of the entire document, or placing the cursor ended up in bold/italic when I don't expect it to, or modifying "this is what a section-header looks like" got inconsistently applied throughout, or lists got mangled, or some other tweak messed up the entire document.
So I greatly prefer explicit markup that semantically specifies my intent, then lets some other process mung it for output. I've hand-written HTML for decades (it felt like the Reveal Codes functionality in WordPerfect where I started) so it's my go-to, but I'm also cool with Markdown, LaTeX, or DocBook for the same plain-text reasons. And pandoc makes quick work of converting between formats.
One additional benefit of plain-text I didn't see in the article is that it compresses ridiculously well, so whether I manually gzip up files, or my OS uses ZFS giving me transparent compression at the file-system layer, it saves me a great deal of disk-space.
But my conclusion is similar—use plain-text for everything I can where it makes sense gives me longevity of my data (and open formats for the exceptions)
⸻
¹ https://www.gnu.org/software/recutils/
² https://dianne.skoll.ca/projects/remind/
³ https://plaintextaccounting.org/
🚀 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.
Another little bit of Django on the Med 2026 from Pescara 🏖️
This time Juliana Nicacio tells us who she is, how she discovered @django and what brought her to Pescara.
Juliana is a Django developer, a @djangonaut participant and a familiar face at Django community events, including @djangoconeurope .
More voices and moments from our three days together are coming soon 😊
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!
Hi, I'm looking for paid gigs.
I have experience in #Rust, #C, #Python, #Golang, JS/TS and #Zig. I'm also familiar with #C++ and #PHP.
My rate is 20 USD/hr.
My timezone is GMT+5.30, but I can be available online for syncing for an 8 hour block of your choosing from GMT 4AM to GMT 3PM.
I can do the first 16 hours for free, so that you can test the quality of my services before you commit.
Here's my resume: https://picoshare.nptr.xyz/-zXhjBYQipy/Resume%20-%20September%202026.pdf
Aircall is hiring Software Engineering Manager
🔧 #javascript #python #ruby #typescript #api #aws #azure #cicd #gcp #engineeringmanager
🌎 Madrid, Spain
⏰ Full-time
🏢 Aircall
Job details https://jobsfordevelopers.com/jobs/software-engineering-manager-at-aircall-io-jun-3-2026-da99c9?utm_source=mastodon.world&utm_medium=social&utm_campaign=posting
#jobalert #jobsearch #hiring
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.
Getting ready for my next phase of development for my galaxy generator. I'm going to next develop an algorithm to generate the tech level (TL) of a technological civilization and also calculate a habitability index for worlds. Now this is of course mostly for game mechanics reasons but I want it based as much in science with a nod to established SciFi as possible. Here's the research docs.
https://github.com/dwhagar/planetGen/commit/8ff36596d87fc1fa75c3eea20cd00052391c6b2a
#programming #scifi #science #sciencefiction #python #rp #rolePlayingGames #ffrp #ttrpg #math #physics #astrophysics
Hello ! I'm developing a new image file format, it's originally a joke project but I want to push it as far as possible.
However, I currently need 4 palettes of 31 colors and I know nothing about color theory, can someone provide me some advice about palette creation ?
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/
🚀 #Capytale, plateforme incontournable des #STIM de la 6e au post-bac ! 🔢🤖💻
✅ Accessible via l’ENT, sans compte ni gestion de fichiers
Des milliers de ressources créées par des enseignants
#Maths, #Technologie , #Python, #Robotique...
Bonjour,
Si jamais vous ou si vous avez dans votre réseau un·e personne maitrisant le #python qui serait intéréséée pour une mission de presta courte (de 3j environs) sur un projet déjà avancé de données environnementales liées à l'énergie et dispo rapidement faites signe !
(j'ai pas plus de détails mais je fais la mise en relation)
🔄 appréciés
#jerecrute (enfin pas moi) #job #data
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!
A week ago today, the third and final day of Django on the Med 2026 was just beginning in Pescara 🏖️
Here are a few glimpses from those three days together: Django, Abruzzo, conversations, food and plenty of good moments 😊
We still have lots more to share from Pescara!
Time to upgrade your #Python versions! 🐍🛡️
3.14.8, 3.13.16, 3.12.15, 3.11.17, and 3.10.22 were just published and contain significant security fixes (8 CVEs) including 1 critical and 2 high severity fixes. Thanks to the PSRT and RMs for coordinating.
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
Here's a new sphinxcontrib directive for documenting your #python enums as tables. dataclass enums and enum-properties tuples are expanded into columns. Has additional goodies like an optional docstring-driven legend and download buttons.
deux articles-tutoriels de Bob Belderbos pour expliquer comment développer et intégrer un binaire rust dans un paquet Python et s'en servir :
- https://rsbit.es/rust-in-python-pyo3-maturin/ : configuration technique
- https://belderbos.dev/blog/how-libraries-run-rust-inside-python/ : encapsulation de rust dans Python
🐴📬 django-pony-express v3.2.1 is out!
This release welcomes a new contributor: thanks to @VerboseFerret for his first PRs! 🎉
• Email subjects are always translated into the project language
• Language variant normalisation removed
https://github.com/ambient-innovation/django-pony-express/releases/tag/v3.2.1
RE: https://mas.to/@davidism/117292399049862157
The beginning of the month, when every junk producer's token limit resets, and we get a whole new wave of junk. Turning off PRs helped a lot, but they just started opening "test issue, checking if my API access is broken", or commenting or emailing their patches instead. I really wish I knew how to escape this without turning off community interaction entirely. #python #flask #opensource
Dr. Sobek boostedI've turned off pull requests from non-members for Flask, Werkzeug, Jinja, and Click this week, and have enjoyed not waking up to a fresh wave of AI junk every morning. I think I'm going to update our contributing guide to say "introduce yourself and how you use the library in chat first if you want to contribute pull requests". Sad that we had to go here, but aside from conference sprints we weren't really getting outside contribution anyway (which is also sad, but that's been the case a lot longer than AI has been around). #python #flask #opensource
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
deux articles-tutoriels de Bob Belderbos pour expliquer comment développer et intégrer un binaire rust dans un paquet Python et s'en servir :
- https://rsbit.es/rust-in-python-pyo3-maturin/ : configuration technique
- https://belderbos.dev/blog/how-libraries-run-rust-inside-python/ : encapsulation de rust dans Python
📣 la prochaine session de #PythonRennes aura lieu chez #Zenika #Rennes (🙏 pour l'accueil et le sponsoring) le lundi 12 octobre à 18h45. Inscription gratuite mais nécessaire sur https://www.meetup.com/python-rennes/events/316707644/
- @pascal_le_merrer nous parlera de VCRpy pour accélérer et fiabiliser les tests d'intégration
- @nledez nous parlera du hack de bugs avec et sans #Claude.
Vous utilisez Redis (https://redis.io/), et avez besoin d'écrire un script, mais coder en Lua (https://www.lua.org/) vous freine dans votre élan ?
Alors regardez du côté de redis-lua-py (https://github.com/IgnaceMaes/redis-lua-py), qui vous permet d'écrire votre script en Python (en utilisant les commandes du client Redis), et de le convertir en Lua.
Pratique, sinon pour de la production, au moins pour de l'apprentissage. 🤓
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/
my @djangomed 2026 experience 🏖️ was a real confidence boost. you can read more about it in my blog post:
https://dev.to/annalauraw/my-django-on-the-med-2026-experience-4elb
#python #django #DjangoOnTheMed #developmentsprint #OpenSource #opensourcesprint #OpenSourceCommunity
Version 1.5.2 of your favorite Python package for reading and writing classic GIS raster data is on PyPI now. It has significant bug fixes, 36 flavors of wheels, and remains 100% slop-free. See https://github.com/rasterio/rasterio/releases/tag/1.5.2 for details. #python #gis
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/
A few moments from day one of Django on the Med 2026 in Pescara 🏖️
We spent the morning working together on Django, then left the laptops behind for a train ride along the Adriatic coast and a bike ride on the Costa dei Trabocchi 🚲🌊
Then back to Pescara to finish the day around a table together 😊
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)
We’ve just listened to the new @djangochat episode about Django on the Med 🏖️🎙️
It’s a lovely recap of the Pescara edition that has just wrapped up, plus plenty of Django chat around it.
Thanks @wsvincent and @carlton for sharing the experience with everyone listening 💚
🎧 Django Chat: https://www.djangochat.com/episodes/django-on-the-med-0UhNCdHr/
▶️ YouTube: https://www.youtube.com/watch?v=_qbeCG-gkzU
Give it a listen, and subscribe to the podcast if you haven’t already!
I've just published 10+ blog posts detailing the #Python Language Summit 2026. The Language Summit was held this year in Kraków, Poland at #EuroPython 2026, with discussions about the future of the Python programming language, including free-threading, #Rust, garbage collectors, type annotations, and namespacing.
Please enjoy and thank you for your patience:
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/
Our next meetup is Thursday, Nov 12th at Konttori and it's sponsored by ICEYE.
https://www.meetabit.com/events/archipylago-17-september-2026-at-konttori-with-iceye
Nu är det
Vill du lära dig Python?
Vill du se vad andra gör med det?
Vill du visa dina Pythonprojekt?
Välkommen till Pythonkväll hos hacKRNspace!
Location: kulturskolan Kiruna, Midnattssolsvägen 23
Time: 2026-10-15 17:00:00+02:00 / 19:15:00+02:00
Python, c'est la vie.
C'est aussi un langage simple à apprendre.
Même sans lire la documentation : https://nondocumentation.garambrogne.net/
Pour les gens qui font du mauvais esprit, non, #python n'est pas (que) le servile assistant de l'intelligence artificielle.
Python Tip #272 (of 365):
Do something or return something, but not both.
The list sort method returns None:
>>> numbers = [4, 2, 7, 1, 5]
>>> x = numbers.sort()
>>> print(x)
None
>>> numbers
[1, 2, 4, 5, 7]
The sort method modifies the list IN PLACE: mutating the list is its purpose.
Returning nothing indicates that an action happened.
append, extend, update, and most other mutating methods/functions follow this convention.
🧵 (1/3)
Python Tip #273 (of 365):
Avoid needless wrapper functions.
This lambda does nothing but call len:
sorted(words, key=lambda s: len(s))
So pass len itself:
sorted(words, key=len)
🧵 (1/4)
I've been working on this for a long while now. It started as a simple script to generate a believable planet for my role playing game. I'm a science and math nerd though, so I wanted to build it with science. I then realized to do that I needed a star, so I built that. Now I've written it to basically generate a segment of a galaxy with sectors, each sector has a density of stars (calculated based on what we observe in our own galaxy) and each star is generated as a system.
https://github.com/dwhagar/planetGen
DISCLOSURE: While versions 1-4 did not use AI and I coded it entirely by hand, I have been using #AI in version 5. I know this is controversial, but please if you have something negative to say just keep it to yourself. I would never have paid anyone to do this and I am never going to sell this at all.
So langsam fange ich an in #Python reinzukommen. Ich schreibe bestehendes um und muss immer seltener googeln.
Allerdings, dass Blöcke nur durch Einrückung definiert werden finde ich gelinde gesagt bescheiden. Wer sich das ausgedacht hat war kein Freund von Programmierern. Da ist doch totale Grütze.
Naja, mal schauen, wie es weitergeht. Mein aktuelles Script läuft, muss aber gerade eine 30 minütige Zwangspause einlegen. Um 22:04 wird es diese beenden und weiter laufen. Mal sehen.
GeoPandas 1.2 is out! This release comes with a new implementation of static plotting, support of GeoParquet 2.0 and the ability to read Parquet files directly via HTTPS, functionality to create planar grids, a way to expose information about file layers and several bug fixes. See the full set of changes at https://geopandas.org/en/stable/docs/changelog.html#version-1-2-0-september-28-2026
🐍🚀 Out now!
pepotron:
Open multiple PEPs like `pep 745 790`
Replace ghapi with urllib3
https://github.com/hugovk/pepotron/releases/tag/1.8.0
linkotron:
If no input given on CLI, read from clipboard
https://github.com/hugovk/linkotron/releases/tag/0.8.0
norwegianblue:
Show cycle name in EOL colour
https://github.com/hugovk/norwegianblue/releases/tag/0.26.0
pylast:
Only retry transient network failures
https://github.com/pylast/pylast/releases/tag/7.2.0
all of them:
Drop support for almost-EOL Python 3.10
https://devguide.python.org/versions/
#Python #release #norwegianblue #linkotron #pepotron #pylast #python310
Just released: humanize 4.13.0! 🚀
🤖 Optimise `naturalsize` algorithm by using `math.log`
🤖 Fix `precisedelta` rounding
https://github.com/python-humanize/humanize/releases/tag/4.13.0
#Python #humanize #release
Just released! 🚀
After one sequential-only CI failure, two artifacts builds, one GitHub outage, two fixes for the Windows installer build, four Windows builds, and a NuGet outage:
🐍 Python 3.15 alpha 2!
🔬 PEP 799: A new high-frequency statistical sampling profiler
💬 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-0a2/104948?u=hugovk
Just released! 🚀
🎶 pylast 7.0.0
🎤 A #Python interface to @lastfm and Libre.fm
🗑️ Remove `SCROBBLE_SOURCE_*` and `SCROBBLE_MODE_*` constants. Last used in 2017, you probably weren't using them
📻 Add `chosen_by_user` parameter to `scrobble`. Set to false if you don't have "direct" control over the source, like radio or a stream.
🐍 Add support for Python 3.15
📼 Test against recorded API instead of live
🦀 Replace pre-commit with prek
Thanks to @scy!
https://github.com/pylast/pylast/releases/tag/7.0.0
#release #LastFM
Just released! 🚀🐍
Python 3.14.1
Waiting for the .1 to upgrade? This one's especially for you!
🥧 Deferred type annotation evaluation!
🥧 T-strings!
🥧 Zstandard!
🥧 Syntax highlighting in the REPL!
🥧 Colour in unittest, argparse, json and calendar CLIs!
🥧 UUID v6-8!
🥧 And much more!
https://discuss.python.org/t/python-3-14-1-is-now-available/105163
Just released! 🚀🐍
Python 3.14.2 (and 3.13.11)
Waiting for the .2 to upgrade? This one's especially for you!
So soon? We found some regressions, so here’s an expedited pair of releases. They also come with bonus security fixes.
https://discuss.python.org/t/python-3-14-2-and-3-13-11-are-now-available/105214?u=hugovk
Just released! 🚀
Python Docs Sphinx Theme
This is the theme for the Python documentation (and others)
* Add support for green, red and yellow side borders for code examples
* Add Portuguese translation
* Add support for Python 3.15
https://github.com/python/python-docs-theme/releases/tag/2025.12
Just released! 🚀
🐍 Python 3.15 alpha 3!
https://discuss.python.org/t/python-3-15-0-alpha-3/105325?u=hugovk
🔬 PEP 799: A new high-frequency statistical sampling profiler and dedicated profiling package
💬 PEP 686: Python now uses UTF-8 as the default encoding
🌊 PEP 782: A new PyBytesWriter C API to create a Python bytes object
🎨 Colour code snippets in argparse help: https://bsky.app/profile/savannah.dev/post/3m7svdqdeqs2x
⚠️ Better error messages
#Python #Python315 #CPython #release #PEP799 #PEP686 #PEP782 #argparse
Just released! 🚀
🤖 Humanize 4.15.0
This does stuff like turning a number into a fuzzy human-readable duration ("3 minutes ago")
https://github.com/python-humanize/humanize/releases/tag/4.15.0
* Add locale support for decimal separator in `intword`
* Add support for Python 3.15
* `naturaldelta`: round the value to nearest unit that makes sense
* Fix plural form for `intword` and improve performance
* Replace `Exception` with more specific `FileNotFoundError`
* Replace pre-commit with prek
Just released! 🚀
stravavis 0.6.0: create visualisations of Strava activities
* add option to select visualisations/allow --bbox as file/support 3.13-3.14/drop 3.9
https://github.com/marcusvolz/strava_py/releases/tag/v0.6.0
termcolor 3.3.0: ANSI formatting for the terminal
* add italic/fix error handling
https://github.com/termcolor/termcolor/releases/tag/3.3.0
pylast 7.0.1: A Python interface to Last.fm
* fix type hints
Just released! 🚀
pypistats 1.12.0
CLI for PyPI download stats
support 3.15
drop 3.9
improve verbose output
declare type hints
replace dateutil+six dependencies with stdlib
replace httpx with urllib
replace pre-commit with prek
Just released! 🚀
norwegianblue 0.24.0
CLI to show end-of-life dates
show spinner when querying
support 3.15
replace dateutil+six dependencies with stdlib
replace httpx with urllib3
replace pre-commit with prek
🐍🚀 Out now: Python 3.15 beta 1!
🧊 This is the feature freeze, and now it's *your* turn to test out all the amazing things we've been baking for the past 12 months!
💤 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!
https://discuss.python.org/t/python-3-15-0-beta-1-is-here/107231
Please report bugs, we'll fix for the big October release.
🐍🚀 Out now: Python 3.14.5 final!
♻️ This now has the new (old) garbage collector, and the official macOS installer has been updated to use Tcl/Tk 9.0.3 instead of 8.6.17.
https://discuss.python.org/t/python-3-14-5-is-here-with-a-new-old-garbage-collector/107304
Today I (Re-)Learned about the `sep` and `end` parameters to Python’s `print`.
`end=‘’` is useful to allow `print`statements not to add a newline. But you can also use it to add something else instead. That makes more sense if you also consider that…
`sep=` allows you to have a separator. For instance, you can print a list vertically with `sep=‘\n’`:
`print(*range(1,10), sep=‘\n’, end=‘’)`
The `*` before `range` expands the content of `range` into multiple arguments to `print`.
And a couple more parameters whose defaults are often OK, but also is good to know about:
`flush` défaults to `False`, but using `print(flush=True)` can help get quicker output from a Python script before waiting for automatic flushing of standard out.
And `file` defaults to `sys.stdout`, but you might want to use something like `print(“Error or debug info”,file=sys.stderr)` to print to the standard error stream, so that if you pipe stdout somewhere else, you still get the stderr messages (or redirect them separately). Of course, you can also have that file-like object passed from elsewhere.
#TIL #TIRL #TodayILearned #TodayIRelearned #Python #PythonPrint
Python Tip #271 (of 365):
Return, don't print.
If your function only seems to "work" in the REPL, it may be printing when it should be RETURNING.
The print function "outputs" to the TERMINAL.
The return statement "outputs" to the code that called your function.
The Python REPL blurs this distinction by printing every non-None return value:
>>> nth_fibonacci(20)
6765
Was that printed, or returned? It's unclear.
🧵 (1/3)
📣 Join me on Thursday, 8th October, in Lisbon for a small software engineering meetup!
Looking forward to meeting more folks out there.
https://adamj.eu/tech/2026/09/28/python-mini-meetup-lisbon/
#SoftwareEngineering #Python #Django #Lisbon #Lisboa #Portugal
“It has nothing to do with binary numbers or ones and zeroes.”
Read more 👉 https://pym.dev/binary-search/
Our first keynote speaker 🎉
Georgi Ker, Director of the Python Software Foundation, Chair of the PSF Diversity & Inclusion Workgroup, and a builder of PyLadies, PyLadiesCon, Python Asia and PyCon Thailand, on "Sustaining Open Source for the Future".
Through a true story: how communities, companies, foundations and governments can share the responsibility, support contributors, and help new leaders grow 💚
15 October, Jaarbeurs Utrecht 🐍
After all, a recent version of Ruff (fast Python linter written in Rust) imported in Debian unstable repository #Debian #Python https://tracker.debian.org/pkg/ruff
What's New in Python 3.15:
🌊 wave 🌊
* Added support for IEEE floating-point WAVE audio (WAVE_FORMAT_IEEE_FLOAT) in wave.
* Added Wave_read.getformat(), Wave_write.getformat(), and Wave_write.setformat() for explicit frame format handling.
* Wave_write.setparams() accepts both 7-item tuples including format and 6-item tuples for backwards compatibility (defaulting to WAVE_FORMAT_PCM).
A little bit of Django on the Med 2026 from Pescara 🏖️
25 people came from around the world to spend three days working on Django, talking, sharing ideas and enjoying some time together.
In this first video @paulox explain why we brought the event to Pescara, then Simon Charette talks about how useful it is to work together in person.
More people and moments coming soon 😊
Hach, wie schön. Langsam zahlt sich die ganze Vorarbeit aus und ich kann jetzt vergleichsweise schnell (für mich), neue Funktionalität in mein Dashboard einhängen.
Jetzt kann ich Mastodon-Posts planen und mir auch anzeigen lassen, wann welcher Post geplant ist.
Wie bei den großen.
Nur in gut. :D
Why Innsbruck? 🏔️
Because a DjangoCon should come with a pretty great backdrop.
✨ A beautiful historic city
🏔️ The Alps right outside your door
🚋 Easy to get around
☕ Plenty of places to meet, chat and recharge
💻 And, of course, a whole community of Django people coming together
Ready to discover Innsbruck with us?
Python Tip #270 (of 365):
Move and copy files with pathlib.
In Python 3.14, Path objects gained move and copy methods, and copy works on whole directories:
>>> from pathlib import Path
>>> taxes = Path("taxes")
>>> taxes.copy("taxes-backup")
PosixPath('taxes-backup')
🧵 (1/3)
“The reproducibility of pseudorandom numbers is useful for automated tests and for debugging.”
Read more 👉 https://pym.dev/random-numbers/
Make sure to compile your wheel dependencies with -O2 to get 2-3x speedup for free! 🚀
multibuild's defaults now also include -O2, so if you use that, update.
https://github.com/python-pillow/Pillow/pull/10060
#Python #PythonPillow #Pillow
@carlton @djangomed @judy2k I’m glad a) there are still people caring about new #Python packages and b) see the to-me obvious value in this. Lots of empty stares. 😅
What's New in Python 3.15:
unicodedata
* Unicode database updated to v17
* New iter_graphemes() iterates over grapheme clusters (UAX #29); grapheme_cluster_break(), indic_conjunct_break() & extended_pictographic() give character properties
* New isxidstart()/isxidcontinue() check UAX #31 identifier characters
* New block() returns a character's Unicode block
(Contributed by @stanfromireland, Serhiy Storchaka & Guillaume Sanchez)
Python Tip #269 (of 365):
Walk directory trees with Path.walk.
The walk method (Python 3.12+) is the pathlib version of os.walk:
>>> taxes = Path("taxes")
>>> for directory, sub_directories, files in taxes.walk():
... print(directory, sub_directories, files)
...
taxes ['archived', '2026'] []
taxes/archived ['2017'] []
taxes/archived/2017 ['invoices'] []
taxes/archived/2017/invoices [] ['soylent.pdf']
taxes/2026 [] ['expenses.csv', 'dividends.csv']
🧵 (1/3)
What's New in Python 3.15:
collections
* Added collections.Counter.__xor__() and collections.Counter.__ixor__() to compute the symmetric difference between Counter objects. (Contributed by Raymond Hettinger.)
“When exactly parentheses improve readability is a bit fuzzy and it's definitely subjective.”
Read more 👉 https://pym.dev/unnecessary-parentheses/
Python Tip #268 (of 365):
Show relative paths with relative_to.
Absolute paths are noisy:
>>> print(path)
/home/trey/taxes/archived/2017/invoices
>>> taxes
PosixPath('/home/trey/taxes')
>>> print(path.relative_to(taxes))
archived/2017/invoices
🧵 (1/3)
📰 Issue 356: New technical governance approved for Django
https://django-news.com/archive/issue-356-new-technical-governance-approved/
“A queue is often called a FIFO data structure: first in, first out.”
Read more 👉 https://pym.dev/stacks-and-queues/
New post: A master class in decorators, patching and tracing.
Seventy free, hands-on workshops. Start with decorators using only the Python standard library, move on to decorators, monkey patching and object proxies with wrapt, then finish with patching, testing and tracing using wrapture.
Run them on Binder, in Codespaces, or in your browser. Nothing to install.
https://grahamdumpleton.me/posts/2026/09/a-master-class-in-decorators-patching-and-tracing/
“If an object quacks like a duck, it may be used as if it's a duck.”
Read more 👉 https://pym.dev/all-iteration-is-the-same/
Python Tip #267 (of 365):
Change file extensions with with_suffix.
A ".rst" file path that needs to turn into a ".md" file path:
>>> from pathlib import Path
>>> old_path = Path("/home/trey/projects/uvrs/readme.rst")
>>> old_path.with_suffix(".md")
PosixPath('/home/trey/projects/uvrs/readme.md')
🧵 (1/4)
I'm looking for work, please boost!
I'm a software engineer with 35 years of experience. I've worked across an unusually wide range of domains: mobile game backends, privacy-preserving data platforms, high-throughput COVID testing infrastructure, email and account systems, e-payment processing, job marketplace systems, and bioinformatics. I pick up new domains quickly and have a history of doing it repeatedly. I understand how to turn business needs into engineering requirements.
I prefer to work remotely but I am open to an in-office job in the Philadelphia area or especially in Philadelphia itself. I've often worked remotely since the 1990s and can operate with minimal supervision. Several of my favorite projects were self-directed: I identified the need, built the thing, and shipped it. My preferred time zone is America/New_York, but I'm flexible.
Some of the many, many technologies I've used are: Python, Perl, TypeScript/JavaScript, Haskell, Go, C, Java. Postgres, MySQL, SQLite. Flask, SQLAlchemy. AWS (Lambda, S3, RDS, SQS, EC2). Docker, Git. Github and Gitlab.
I've also repeatedly picked up new languages and stacks as needed: Haskell for differential privacy research, TypeScript for a 24/7 AWS Lambda system, Flask for my most recent employer. I've become productive with new systems over and over, and I can do it quickly.
I'm a published author (Higher-Order Perl, Morgan Kaufmann), longtime blogger, and conference speaker with a reputation for making complex ideas clear.
I am a U.S. citizen.
My résumé is at https://
plover.com/~mjd/cv/Mark%20Jason%20Dominus.pdf
mjd@pobox.com
Thanks!
#OpenToWork #remoteWork #softwareEngineering #Python #backend #hiring
#fediHire
#getFediHired
Thanks to all the busy bees at #DjangoonTheMed DEP0021 is coming to secure your Django supply chain: https://github.com/codingjoe/deps/blob/sri/draft/0021-subresource-integrity.md
Special thanks to @mdn for working providing excellent community documentation on SRI.
What's New in Python 3.15:
unittest
* unittest.TestCase.assertLogs() will now accept a formatter to control how messages are formatted. (Contributed by Garry Cairns.)
* unittest.TestCase.assertWarns() and unittest.TestCase.assertWarnsRegex() no longer swallow warnings that do not match the specified category or regex. Nested context managers are now supported. (Contributed by Serhiy Storchaka.)
Keep in mind that because the loops in a comprehension must be in the same order as equivalent for loops, it does read a little funny.
Read more 👉 https://trey.io/aeo9fg
Python Tip #266 (of 365):
Reread a file with seek(0).
Try to .read() a file twice, and you'll get nothing the second time:
>>> f = open("my_file.txt")
>>> f.read()
'This is my file 👋\nThis is line 2\n'
>>> f.read()
''
Python keeps track of your position within a file as you read.
When you're at the end, another read returns an empty string.
The seek method changes that position.
🧵 (1/2)
What's New in Python 3.15:
pdb
* Use the new interactive shell as the default input shell for pdb. (Contributed by Tian Gao.)
@dolanor No, it's still pip if you want to use pip. Or conda if you want to use conda. But there are other options for people who have a reason to use them or just prefer something different.
If anyone is telling you that you shouldn't be using pip (or, I imagine, conda) anymore, that it's deprecated or disfavored or obsolete or "on its way out" or anything of that nature, they don't know what they're talking about and you shouldn't listen.
“For true randomness, you can use the secrets module, which generates cryptographically secure random numbers.”
Read more 👉 https://pym.dev/random-numbers/
Tonight we had dinner together with members of @pescara and @djangomed participants who just arrived in Pescara 🍕
A nice way to meet up over dinner by the beach, catching up with old friends and meeting new ones. 🍻
And now we’re ready: Django on the Med 2026 starts tomorrow morning! 🏖️
📅 Applications close at the end of Tuesday (**today**), September 22, 2026, anywhere on Earth (AoE).
Want to be our first Django Software Foundation Executive Director and lead our foundation? It's your last call to apply!
https://www.djangoproject.com/weblog/2026/sep/16/executive-director-search-extended/
One week until Python 3.15.0 final!!
https://hugovk.dev/next-release/
What are you most looking forward to?
https://docs.python.org/3.15/whatsnew/3.15.html
Python Tip #265 (of 365):
Use next() to get the first line in a file.
Reading a CSV file and need to skip the first row of headers?
Pass your file object (or csv.reader object) to the built-in next function:
headers = next(reader)
File objects keep track of your position within an open file, so the next time you read (or loop) you'll start up where you left off.
🧵 (1/3)
📢 New Blog Post: "Keynote Announcement"
https://seagl.org/news/2026/09/22/keynote-announcements
#Seagl2026 #linux #opensource #FLOSS #FOSS #policy #hackerspace #python #TempleOS #keynote #cfp #seattle #conference
PSF Diversity & Inclusion Workgroup के Monthly Office Hours अगले हफ्ते PSF Discord पर! September 29th 1PM UTC को #psf-diversity में जुड़ें। बातचीत करें, सवाल पूछें और Python में अपने projects, open source contributions या learning journey शेयर करें! 🐍🌍 #Python
https://pyfound.blogspot.com/2026/07/the-psf-d-workgroup-are-starting-office.html
The PSF Diversity & Inclusion Workgroup monthly office hours are next week on the PSF Discord! Join us on September 29th 1PM 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
boostedWho tested that #nicegui ?
To code #python web app w/o html CSS...
https://nicegui.io/documentation/html
Someone around me migrated an app made with PyQt with that....
And @akx has updated the Babel project's security policy in a similar way:
I had my little agent friend whip up a trust-me-bro #benchmark for Django task frameworks.
Happy to see my human coding skills are still worth something.
“To navigate block-by-block, you can use Ctrl+P to go to the previous block and Ctrl+N to go to the next block.”
Read more 👉 https://pym.dev/repl-features/
The last mile of a long road: faster NumPy in the browser https://lobste.rs/s/zakub6 #python
https://notebook.link/blog/the-last-mile-faster-numpy
Prochain meetup #python à #lyon : mercredi 30 septembre à 19h, dans les locaux de Genymobile 🐍
Vous avez envie de vous lancer dans l’auto-hébergement, mais vous ne savez pas par où commencer ? Cette présentation de @matthieusb est faite pour vous !
➡️ https://www.meetup.com/fr-fr/python-afpy-lyon/events/316400929/
Python Tip #264 (of 365):
Don't use the file readlines method.
Do this:
lines = list(file)
Not this:
lines = file.readlines()
Both give the same list of lines. So why prefer list?
Files are iterables of lines, and list(...) is THE way to say "loop over this iterable and store the results in a new list".
With file.readlines(), it's not as obvious that we're making a list.
🧵 (1/2)
RE: https://fosstodon.org/@mattip/117302818665471015
Oh, welcome back PyPy 👋
PyPy 8.0.0 is out with Python 3.12 support, so it looks like Django can finally start testing against PyPy again.
Python Tip #260 (of 365):
Bookmark a date format cheat sheet.
Is "%M" month or minute? Is "%H" 12 or 24 hour time? Which one shows a long month name? And a short one?
You COULD memorize all of Python's many date/time format codes, but is that worth it?
It might be worth memorizing the formats you use all the time ("%Y-%m-%d" and "%H:%M:%S" maybe).
But for MOST formats, you can look them up when you need them.
🧵 (1/3)
What do you call __these__ in #Python?
| magic methods: | 6 |
| special methods: | 0 |
| dunder methods: | 61 |
| show results: | 1 |
Closed
Python Tip #263 (of 365):
Parse messy dates with the third-party dateutil library.
Its parse function guesses the format from the string itself:
>>> from dateutil.parser import parse
>>> parse("September 20, 2026")
datetime.datetime(2026, 9, 20, 0, 0)
>>> parse("20 Sep 2026 14:30")
datetime.datetime(2026, 9, 20, 14, 30)
>>> parse("9/20/26")
datetime.datetime(2026, 9, 20, 0, 0)
https://dateutil.readthedocs.io
🧵 (1/4)
I woke up to find my PR merged and deployed, giving https://www.python.org/blogs/ a fresh take and fixing the "Latest News" section on the homepage.
It was confusingly linking to Python Insider's homepage, even though it was only one of several data sources.
We were also only showing the latest five posts. Six if we include the top header, and I'd like to fix the spacing.
https://github.com/python/pythondotorg/pull/3092
Thank you to everyone involved.
🔧 I’m excited to host this optimization workshop in Lisbon next month.
Come join me to learn about profiling and optimizing Python code, and maybe even contribute to Django itself.
https://adamj.eu/tech/2026/09/19/python-optimization-workshop-lisbon/
“Pretty much every time I make a temporary file, I need to close the file without actually deleting it so that I can then pass the filename off to other code that actually uses the file.”
Read more 👉 https://pym.dev/temporary-files/
Python Tip #262 (of 365):
Parse dates with date.strptime.
In Python 3.14+, the date class got its own strptime class method:
>>> import datetime as dt
>>> dt.date.strptime("2026-08-19", "%Y-%m-%d")
datetime.date(2026, 8, 19)
🧵 (1/2)
Wow Python 3.7 qui tombe sous les 2 % d’utilisateurs :
https://git.afpy.org/mdk/python-versions
Oui oui c’est pas une faute de frappe, je parle bien de 3.7, pas 2.7.
(3.12 a ~34% des utilisateurs)
“Of course, at some point in your Python coding journey, you will probably find some opportunities to make classes.”
Read more 👉 https://pym.dev/friendly-classes/
📰 Issue 355: DjangoCon Europe 2027 in Innsbruck and Django Probe
https://django-news.com/archive/issue-355-djangocon-europe-2027-in-innsbruck/
Python Tip #261 (of 365):
Use Python's zoneinfo module when working with time zones.
>>> from zoneinfo import ZoneInfo
>>> pacific = ZoneInfo("America/Los_Angeles")
>>> meeting = datetime(2027, 3, 13, 9, 0, tzinfo=pacific)
>>> print(meeting)
2027-03-13 09:00:00-08:00
🧵 (1/5)
I've turned off pull requests from non-members for Flask, Werkzeug, Jinja, and Click this week, and have enjoyed not waking up to a fresh wave of AI junk every morning. I think I'm going to update our contributing guide to say "introduce yourself and how you use the library in chat first if you want to contribute pull requests". Sad that we had to go here, but aside from conference sprints we weren't really getting outside contribution anyway (which is also sad, but that's been the case a lot longer than AI has been around). #python #flask #opensource
We've updated our security policy on how to report vulnerabilities:
https://github.com/python-pillow/Pillow/pull/10018
Much of this based on the good stuff in the CPython security policy:
https://devguide.python.org/security/policy/
Yesterday's 82 reports totalled 226,620 words (144,437 without code), an average of 2,764 each (1,761 without code).
Moby Dick is 212,796 words (A Tale of Two Cities is 135,886 words).
I've asked the reporter to re-run their tools and update/close as necessary.
What's New in Python 3.15:
os
* Add os.statx() on Linux kernel versions 4.11 and later with glibc versions 2.28 and later. (Contributed by Jeffrey Bosboom and @vstinner)
* os.makedirs() function now has a parent_mode parameter that allows specifying the mode for intermediate directories. This can be used to match the behavior from Python 3.6 and earlier by passing parent_mode=mode. (Contributed by Zackery Spytz and @gpshead)
New post: Writing a workshop for JupyterLab.
The second post on jupyterlab-workshop builds a small pytest workshop from nothing, covering the manifest, pages, actions that run commands and write files for the learner, checks that gate progress until the work is done, giving the workshop a Python environment of its own, and the lint and self-test that catch problems before a learner does.
https://grahamdumpleton.me/posts/2026/09/writing-a-workshop-for-jupyterlab/
“Note that the utilities in Python's random module generate pseudorandom numbers, not true random numbers.”
Read more 👉 https://pym.dev/random-numbers/
@webology @JessicaTegner when I read grok I think about this old but active Python project I heard about for the first time long time ago from @faassen 🧌
https://pypi.org/project/grok/
✨ I plan to do a proper write-up, but @django new sponsor pages are up and highlight plans in a much easier-to-grok format. https://www.djangoproject.com/sponsor/
Shout-out to @ericholscher for driving this and pulling it all together.
@nessita for helping to prioritize it and the last mile.
Also, to our Fundraising WG (present and past) members for working on the prospectus for over a year to give us data and features to work with.
RE: https://social.rust-lang.org/@rust/117288095334006877
The lovely folks from @rust gave me a shoulder-tap in one of our mutual security discussion channels about these ongoing attacks:
https://blog.rust-lang.org/2026/09/17/targeted-attacks/
There's no particular reason the attackers wouldn't do the same to maintainers of Python projects. Please remain vigilant and send anything strange to security@python.org so we can alert others if needed.
#python #security #supplychain #pypi
⚠️ We believe that there is an ongoing campaign targeting owners of popular crates and rust-lang team members that is attempting to compromise devices and accounts in order to use them to publish malware.
See our blog post for details: https://blog.rust-lang.org/2026/09/17/targeted-attacks/
Want to test your knowledge of datetime formatting, parsing, and arithmetic in #Python?
I just made a 17-question quiz for you: https://pym.dev/quiz/datetime
A warning: it's a bit tricky, even for an experienced Python developer... partly because it DOES test your knowledge of various format codes that I wouldn't usually memorize.
If you want to get practice with the questions you get wrong afterward, you can find 3 free datetime Daily Recall packs linked at the end of the quiz.
🧵 (3/3)
Python Tip #260 (of 365):
Bookmark a date format cheat sheet.
Is "%M" month or minute? Is "%H" 12 or 24 hour time? Which one shows a long month name? And a short one?
You COULD memorize all of Python's many date/time format codes, but is that worth it?
It might be worth memorizing the formats you use all the time ("%Y-%m-%d" and "%H:%M:%S" maybe).
But for MOST formats, you can look them up when you need them.
🧵 (1/3)
@treyhunner What do you think of this idea from @bswck?
When you paste code into the REPL, it'll strip any `>>>` / `...`/ output you'd inadvertently copied.
Could be useful for learners?
https://github.com/python/cpython/issues/157612
#Python #REPL
The PSF is excited to announce the results of the 2026 election for the PSF Board! Sending a big thank you to the candidates, our outgoing Board members, and our community for participating this year- we are so grateful to be in community with all of you 💙💛 #Python
https://pyfound.blogspot.com/2026/09/announcing-2026-psf-board-election.html
The PSF is pleased to announce the results of the inaugural election for the Python Packaging Council! Sending a big thank you to the candidates and our community for participating in this long awaited election. We're excited to see the council start its work! #Python
https://pyfound.blogspot.com/2026/09/announcing-2026-python-packaging.html
I'm a software developer and sysadmin who could really use being #fedihired.
What I'd really like to do is Rust, but once you ignore the dubious scammy stuff, there seems to be nothing out there. Prove me wrong with a counterexample!
I've spent decades fixing Enterprise mudballs mostly written in #Perl. If you've got a crufty legacy system that everybody else is too scared to touch, I'm your man. I love fixing stuff like that.
I've also done commercial #Scala, #Python, #C/#C++, and although I don't usually admit it on my CV but these are now Trying Times when everything is on the table, even #PHP (the longest six months of my life).
Perl naturally leads into Unix system administration and infrastructure. I've built and maintained mail clusters, VoIP systems, network monitoring, DNS management platforms, that sort of thing. If it's non-sexy but something which needs to be done, I'm there.
Available immediately, for contract or permie, onsite in Amsterdam/Randstad or remote to anywhere.
Drop me a private mention or mail peter@mooli.net if you have or know of something.
Python Tip #259 (of 365):
Use datetime arithmetic and comparisons to check whether a date is within a range.
Sputnik launched before the moon landing:
>>> sputnik_launch = datetime(1957, 10, 4)
>>> moon_landing = datetime(1969, 7, 20)
>>> sputnik_launch < moon_landing
True
One datetime is "less than" another when it represents an earlier moment in time.
🧵 (1/3)
New blog post introducing jupyterlab-workshop, a JupyterLab extension I wrote for guided interactive workshops.
Instructions sit in a side panel. Each step is a clickable action that does something real in the JupyterLab session beside it, and the workshop checks what you did before you move on. A workshop is a directory of Markdown files and runs wherever JupyterLab does: mybinder, Codespaces, and even JupyterLite in the browser.
https://grahamdumpleton.me/posts/2026/09/introducing-jupyterlab-workshop/
Vous loggez énormément dans vos applications, à un point que cela devient un goulet d'étranglement ?
Alors jetez un œil sur fastlogging-rs, qui promet des gains de performance conséquents.
🧪 I just released unittest-parametrize 1.9.0.
This package helps you make parametrized tests that work with the grain of unittest, but can still be run with pytest.
This release adds new skip/expected_failure features, fixes a bug when using Coverage.py's dynamic contexts, and tidies up error messages and usage docs.
https://github.com/adamchainz/unittest-parametrize/blob/main/CHANGELOG.rst
“The syntax for adding a new key-value pair to a dictionary is actually the same as the syntax for updating the value for an existing key.”
Read more 👉 https://pym.dev/using-dictionaries-in-python/
“The last plate that's added to the top of the stack will be the first plate removed from the top of the stack.”
Read more 👉 https://pym.dev/stacks-and-queues/
Python Tip #258 (of 365):
Format dates with f-strings.
datetime objects support the same format codes in f-string format specifiers that the strftime method uses:
>>> deadline = datetime(2046, 10, 31, 15, 46)
>>> f"{deadline:%m/%d/%Y %I:%M %p}"
'10/31/2046 03:46 PM'
🧵 (1/3)
Strings in Python have a startswith method that will check whether a given string is a prefix of our string
Read more 👉 https://trey.io/dley4p
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)
Hey #Python devs,
Remember when Pillow took over PIL's space?
Do we have that for the requests + httpx + httpx2 space yet?
I have hit my point where having all three installed spark no joy for me.
I don't even care who wins or loses this package off, but I do not need all three installed, and I'll keep my personal preference to myself.
Thid party packages are very opinioned which is why I have all three. I do not want or need all three.
What's the solution?
Another week another #Django package 🎉
I switched from Python to Guile as my go-to scripting language a few months ago and I've been enjoying it.
Pros:
- Guile is a Scheme
- Guile is slop-free
- Guile is faster than Python
- Guile can easily be embedded in other programs
- Guile easily compiles to WASM with Hoot
Cons:
- Guile's syntax can be less readable
- Guile's ecosystem is smaller
- Guile is less documented
📣📣 ATTN PSF Voting Members: The 2026 PSF Board election vote closes tomorrow, September 15th- but don't wait, go vote today! If you affirmed your intention to vote in this year's election or voted last year, check your email for voting instructions 🗳️ #Python https://pyfound.blogspot.com/2026/09/the-2026-psf-board-election-is-open.html
We're deprecating and removing the IM ("IFUNC Image Memory") image format from @pillow. We're doing this with a two-year deprecation rather than the usual one-year.
https://pillow.readthedocs.io/en/latest/deprecations.html#im-image-format
If you need it, please let us know! But unless you're calculating molecular sizes of DNA restriction fragments in Linköping, Sweden in the 1990s, probably not. 🐍🧬
https://github.com/python-pillow/Pillow/pull/9849#pullrequestreview-5167307282
We may deprecate some of the other obscure plugins.
https://github.com/python-pillow/Pillow/issues/9101#issuecomment-4134756068
Python Tip #256 (of 365):
Avoid circular imports by decoupling your modules.
Two modules that import each other will break.
In users.models:
from .tasks import send_welcome_email
And in users.tasks:
from .models import User
ImportError: cannot import name 'User' from partially initialized module 'users.models' (most likely due to a circular import)
🧵 (1/3)
Are developer workshops still relevant when anyone can ask an AI? A write-up of my PyCon AU 2026 talk.
Reading and doing are different things, and AI hasn't touched the doing. AI makes workshop content correct, but not teachable. And the self-serve end is the part under pressure, which raises the question of why I released 24 free wrapture workshops anyway.
https://grahamdumpleton.me/posts/2026/09/hands-on-learning-in-the-age-of-ai/
“That allows for the practice of goose typing, meaning practicing duck typing with the built-in isinstance function.”
Read more 👉 https://pym.dev/goose-typing/
What's New in Python 3.15:
shelve
* Added new reorganize() method to shelve used to recover unused free space previously occupied by deleted entries. (Contributed by Andrea Oliveri.)
* Add support for custom serialization and deserialization functions in the shelve module. (Contributed by @furkanonder.bsky.social.)
I added `picows` support to the UNICORN Binance WebSocket API.
The benchmark started as a simple library comparison and ended up improving UBWA itself too.
Results:
⚡ up to **2× throughput** on small Binance messages
🧠 about **26% lower average CPU usage**
📨 **138M+ live messages** per implementation
✅ no picows-specific stalls or unrecoverable streams in the 24h soak
`websockets` still remains the default for now.
Why?
Because 24 hours and 138 million messages are strong evidence, but they are not the same as months of production use across many different systems.
So picows is opt-in until broader real-world usage proves it further.
Full benchmark, bugs found, proxy changes and reasoning:
#Python #PythonDev #WebSockets #WebSocket #Asyncio #Performance #Benchmark #Optimization #OpenSource #FOSS #Linux #Backend #BackendDevelopment #Networking #Trading #AlgoTrading #CryptoTrading #Binance #FinTech #DevOps #Programming #Cython #HighPerformance #LowLatency
Python Tip #255 (of 365):
Declare your public API with __all__.
from math import sqrt
__all__ = ["nth_lucas", "sum_of_squares"]
phi = (1+sqrt(5))/2
def nth_lucas(n):
return round(phi**n + (-1/phi)**n)
def sum_of_squares(*nums):
return sum(n**2 for n in nums)
🧵 (1/6)
Research engineer position in #neuroscience opening at Université #Grenoble Alpes in France!
PhD not necessary, but good skills in #python needed.
More info
⬇️
"We are recruiting a Research Engineer in Cognitive Neuroscience and Human Neurophysiology to join our team at the Grenoble Institute of Neurosciences. Our #Brain, Behavior and Neuromodulation team investigates the neural mechanisms of decision-making and motivation using human intracranial electrophysiology, brain stimulation and computational approaches.
The position is strongly focused on Python scientific software development, signal processing and reproducible analysis pipelines for human intracranial electrophysiology, including intracranial EEG, basal-ganglia LFP and single-unit recordings.
We are looking primarily for a strong programmer, not necessarily a PhD holder. Experience with electrophysiology, signal processing or neuroscience data analysis would be highly appreciated.
Main activities will include:
- development and maintenance of iEEG analysis pipelines
- BIDS standardisation and data harmonisation
- development of tools linking macro- and micro-electrophysiology
- integration with open-source neuroscience software
- close interaction with a dynamic team of PhD students, postdoctoral researchers, engineers and clinicians working on human intracranial electrophysiology, decision-making and neuromodulation
- supporting ongoing scientific projects by translating experimental and analytical needs into robust, reusable software solutions.
Preferred starting date: November 2026.
Initial contract: 1 year, renewable up to 3 years.
More information and the full job description are available here:
https://euraxess.ec.europa.eu/jobs/464714
Candidates can contact me directly for more information and should send a CV and motivation letter to:
julien.bastin @ univ-grenoble-alpes.fr
To get a sense of the type of human intracranial research the engineer will contribute to, recent work from the team includes iEEG studies of value-based decision-making (Baratin et al., 2026), closed-loop intracranial BCI (Baratin et al., 2026), and direct electrical stimulation during decision-making (Cecchi et al., 2024).
Baratin et al., Complementary and opponent value signals in the human brain support choosing the best and avoiding the worst, Nature Communications 2026a.
Baratin et al., Closed-loop readout of anterior insula high-gamma activity steers value-based decisions, Nature Communications 2026b.
Cecchi et al., Direct stimulation of anterior insula and ventromedial prefrontal cortex disrupts economic choices, Nature Communications 2024"
“If you find subprocess.run to be a little too verbose, you might consider writing a custom wrapper function or two for your own use cases.”
Read more 👉 https://pym.dev/running-subprocesses-in-python/
I really enjoyed this talk by Arshia Sharma at @pyconau on dictionaries and data validation/parsing.
I'm seeing more and more Oepn Source project migrating to Codeberg.
I missed the Python library gallery-dl migrated a few months ago https://github.com/mikf/gallery-dl/issues/9374
I used it to download my pictures from conference repository (e.g. flickr) and it worked very well.
wrapture is now at 1.0.0b1, along with the wrapture-instrumentation, aws, postgresql and mysql packages. I am happy with the APIs, so what it needs now is people trying it on real code and reporting what works and what doesn't.
New post rounds up the ten blog posts so far, the packages and docs, plus 24 hands-on workshops you can run in your browser on mybinder with nothing to install.
https://grahamdumpleton.me/posts/2026/09/trying-out-wrapture/
Python Tip #254 (of 365):
Use a module instead of a singleton class.
When you import a module, Python creates a module object. Import it again (even under a different name) and you get THE EXACT SAME OBJECT:
>>> import events
>>> import events as again
>>> again is events
True
So instead of a class that's only ever meant to have one instance:
class EventTracker:
...
tracker = EventTracker()
More: https://pym.dev/making-singletons/
🧵 (1/2)
You mostly don't need to think about a function's enclosing scope or the think about the closure that it makes.
Read more 👉 https://trey.io/4u4pj0
The Python Steering Council election is on!
https://hugovk.dev/blog/2025/steering-council-election/
This year we have six candidates for five seats.
This chart shows when the nominations arrived: six is fewer than previous years but they didn't all wait until the last three days.
This year we're also using a new "Multi-winner Bloc STAR" voting system: you give between 0-5 stars per candidate.
If you're in the core team, remember to vote by Friday!
🗳️ I've voted in @ThePSF board election!
🗳️ And in the inaugural Packaging Council election!
🗳️ Remember to vote!
#Python #PSF #election #packaging #PackagingCouncil #vote
🗳️ I've voted!
The Python Steering Council elections are underway, and there are eight excellent candidates. We'll be in safe hands whichever five are elected.
This year we have 87 eligible core dev voters, compared to 85 last year.
https://peps.python.org/pep-8105/#candidates
https://hugovk.github.io/python-steering-council/
Edit: 🧵 Thread continued from: https://mastodon.social/@hugovk/111415531562893054
Voted in the Python Steering Council election! 🐍🗳✅
https://mastodon.social/@hugovk/115688213247426019
#PythonSteeringCouncil #Python #SteeringCouncil #vote #election
📣📣 ATTN PSF Voting Members: The inaugural Python Packaging Council election vote closes next Tuesday, September 15th- but don't wait, go vote today! If you affirmed your intention to vote, check your email for voting instructions 🗳️ #Python
https://pyfound.blogspot.com/2026/09/inaugural-python-packaging-council.html
Voting is open for the PSF Board of Directors Election until Tuesday, September 15th, 2:00PM UTC! To all our affirmed and pre-affirmed voters, make sure you check out the candidates and make some time to vote before then 🗳️ #Python https://pyfound.blogspot.com/2026/09/the-2026-psf-board-election-is-open.html
Last post in the wrapture tracing series: OpenTelemetry export.
One table in the config and the same events that printed a tree feed a backend while the application runs. Requests become SERVER spans named by route, a failing request carries the 500 and the exception the framework swallowed, and one trace id is shared by the files, the outbound headers and the exported spans, so two services join as one trace.
https://grahamdumpleton.me/posts/2026/09/opentelemetry-export-in-wrapture/
“You can store the data as attributes on each instance of your class, and you can store the functionality as methods on the class itself.”
Read more 👉 https://pym.dev/when-are-classes-used/
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)
Do you know your regular expressions in Python? Do you know the unusual thing re.match() does? Or what soft deprecation is? I've written about the changes coming up in Python 3.15 to help clear things up a bit.
🐍 Check out @sethmlarson's talk at @europython 2026: "Learning from the not-so-secret Python security 'cabal'". This talk is a deep dive into how CPython handles coordinated vulnerability disclosure, how the #Python security team is organized, and what it takes to run a sustainable disclosure program. https://www.youtube.com/watch?v=Xmr89QEr720
📣🐍 prochain #PythonRennes le lundi 21 septembre à 18h45 chez #Oxxeo (🙏 pour l'accueil). Sergiu Mocanu interviendra sur 2 sujets :
- l'évaluation de code généré (par des LLM)
- la valorisation de l'énorme patrimoine logiciel #SoftwareHeritage
Python Tip #252 (of 365):
Use ALL_CAPS names for module-level constants.
MAX_RETRIES = 5
DEFAULT_TIMEOUT = 30
https://pym.dev/python-doesnt-have-constants/
Python doesn't have constants. There's no keyword that stops a variable from being reassigned:
>>> MAX_RETRIES = 5
>>> MAX_RETRIES = 10
The all-caps name is purely a convention. It's a signal to readers of our code meaning "this value isn't meant to change".
🧵 (1/2)
Fourth post in the wrapture tracing series: finding slow code.
One endpoint is slow and there are three layers it could be. A stopwatch in each is a code change in a layer that should not know it is being measured; a profiler sees every frame and cannot tell one request from the next. Self time for the handful of methods you chose says which one is slow in its own right, rather than slow because of what it calls.
https://grahamdumpleton.me/posts/2026/09/finding-slow-code-with-wrapture/
“The continue statement doesn't break out of its loop; it just skips to the next iteration of the loop.”
Read more 👉 https://pym.dev/breaking-out-of-a-loop/
Voting is open for the PSF Board of Directors Election until Tuesday, September 15th, 2:00PM UTC! To all our affirmed and pre-affirmed voters, make sure you check out the candidates and make some time to vote before then 🗳️ #Python https://pyfound.blogspot.com/2026/09/the-2026-psf-board-election-is-open.html
RE: https://social.breizhcamp.org/@breizhcamp/117237574946315707
Python Rennes existe grâce au soutien de l'association du @breizhcamp 🙏
Nous relayons donc cette lettre ouverte qui alerte les entreprises de la tech sur la baisse généralisée de leur sponsoring des évènements techniques (au sens large, l'agilité est aussi concernée), dont beaucoup sont sur le point de disparaître.
⏳ I just released time-machine 3.5.1 with 13 bug fixes.
Two were reported by humans. The rest came from prompting Claude Fable with just "Find and fix bugs".
None of them had a huge impact (this is a test library, after all), but they were all mistakes. The worst would leave time mocked after a test tearDownClass() failure, which would be pretty hard to debug.
Crazy times. These machines can help us build the highest-quality software, if we want.
https://time-machine.readthedocs.io/en/latest/changelog.html
“Let's say we have some text that was retrieved from a database, and the original text came from a form submission in a web browser. Web browsers often represent line breaks as a carriage return character, followed by a line feed character.”
Read more 👉 https://pym.dev/splitlines/
Third post in the wrapture tracing series: tracing Flask.
A WSGI app routes the interesting facts around the return value, so a plain wrapper on it records nothing useful. One config entry naming the Flask instrumentation gives one tree per HTTP request instead, with the view, the template render and the shop's own calls beneath it, and the failing request saying both that it answered 500 and that a KeyError was why.
https://grahamdumpleton.me/posts/2026/09/tracing-flask-with-wrapture/
The next @pillow release will use lazy imports on Python 3.15, meaning `from PIL import Image` with no further use takes only 10 ms instead of 25 ms! ⚡️🦥⚡️
Python Tip #251 (of 365):
Avoid wildcard imports.
Using star imports, like "from something import *", makes for fragile code.
The Zen of Python ends with "Namespaces are one honking great idea -- let's do more of those!"
Each module automatically makes a namespace, which is great: same-named variables in different modules never accidentally collide.
A wildcard import BREAKS that namespacing: "import *" dumps every name from one module into another.
🧵 (1/3)
🎙️ Check out the "Security and Ethics in the Age of Generative AI" panel from @europython 2026! The PSF's @miketheman and @sethmlarson join other awesome folks from the #Python community to dig into how generative AI is reshaping cybersecurity, from ecosystem-level risks to practical lessons to the ethics of AI. https://www.youtube.com/watch?v=4cfgbo912rg
Python Tip #250 (of 365):
Sort your import statements in a meaningful way.
The usual convention (from PEP 8): standard library first, then third-party packages, then your own code, with a blank line between each group.
import json
import secrets
from django.http import Http404, HttpResponse
from django.shortcuts import redirect
from exercises.models import Exercise
🧵 (1/3)
Second post in the wrapture tracing series: zero-code tracing.
The application you need to see inside is often one you cannot, or should not, edit. The bindings and sink move into a wrapture.toml next to the project, and the program runs untouched under python -m wrapture, or with no launcher at all through autowrapt. Also: streaming the trace to JSON Lines and asking it questions with jq.
https://grahamdumpleton.me/posts/2026/09/zero-code-tracing-with-wrapture/
“Note that passing generator expressions into iterable-accepting functions and classes makes something that looks a bit like a custom comprehension.”
Read more 👉 https://pym.dev/custom-comprehensions/
Ah une bonne nouvelle sur le front de l'anti-slop: #Flask, mon framework préféré en #Python rejette toute IA (https://palletsprojects.com/contributing/llm-ai) non seulement pour des soumissions de code, mais pour toute interaction !
[$] CERN's migration path from CentOS Linux to Debian
The European Laboratory for Particle Physics, usually just called CERN, is not only the birthplace of the World Wide Web, it is home to the Large Hadron Collider (LHC), the world's [...]
Voting is open for the Python Packaging Council until Tuesday, September 15th, 2:00PM UTC! To all affirmed voters, make sure you check out the candidates and make some time to vote before then 🗳️ #Python https://www.python.org/nominations/elections/2026-python-packaging-council/nominees/
Python Tip #249 (of 365):
Monkey patch cautiously... and only in your automated tests.
Monkey patching means fundamentally changing how a module or class works WITHOUT editing its code, by reassigning one of its attributes at runtime.
In automated tests, monkey patching can simplify things.
🧵 (1/4)
New series on the tracing side of wrapture, starting with live tracing.
Nothing about a binding is specific to testing: it observes a call site and emits events, and what happens to them is decided by whoever is listening. Take away the timeline, register a sink, and the same three bindings from the testing series narrate the shop as it runs, declined card and all.
https://grahamdumpleton.me/posts/2026/09/live-tracing-with-wrapture/
“When looking for an element within a sorted list, binary search can be much faster than regular iteration.”
Read more 👉 https://pym.dev/binary-search/
Out of curiosity, I have asked Claude to rewrite a tiny little SSH wrapper from Python to Go and Rust to check performance.
Results:
* Python = 20ms
* Go = 3ms
* Rust = 1.5ms
It's totally useless if you have Mitogen because it opens the SSH connection once but if you don't, every single ms counts.
Credera is hiring Architect, Software Engineering
🔧 #java #javascript #python #ruby #rust #scala #dotnet #angular #react #springboot #cypress #aws #azure #cicd #docker #gcp #kubernetes #terraform #solutionsarchitect
🌎 Chicago, Illinois
⏰ Full-time
🏢 Credera
Job details https://jobsfordevelopers.com/jobs/architect-software-engineering-at-credera-com-jan-25-2026-0d443f?utm_source=mastodon.world&utm_medium=social&utm_campaign=posting
#jobalert #jobsearch #hiring
Python Tip #248 (of 365):
Run "pytest --pdb" to drop into PDB when a test fails.
With "--pdb", pytest starts PDB in post-mortem mode (see tip #169) as soon as a test fails or raises an exception.
I find this much nicer than sprinkling print calls through a test and re-running it.
You can inspect objects, call functions, walk up the stack, and poke at things in real time instead of re-running repeatedly.
https://mastodon.social/@treyhunner/116772494442077774
🧵 (1/3)
“The print function will automatically convert whatever object you give it to a string because it needs to be a string in order to be printed.”
Read more 👉 https://pym.dev/print-features/
I've been looking for a #WiFi networks channels analyzer app for the #Linux desktop, like those found on F-Droid (such as WiFiAnalyzer), and couldn't find one on Flathub.
Then, searching more broadly, I discovered that Daniel Nylander, oldtime Swedish translator in #GNOME, has built exactly such an app in recent months, in #Python + GTK4 + libadwaita!
I tried it out (just do "cd src/ && python app.py"), it works well.
Flatpak enthusiasts, see https://github.com/yeager/wifi-analyzer/issues/2
Peut-on utiliser l'intelligence artificielle sans vendre son âme aux GAFAM et sans livrer les données de ses auditeurs à la Silicon Valley ?
Dans son rapport d'activité 2025-2026, Radio Cause Commune détaille sa stack technique 100% libre et auto-hébergée dans le 18ᵉ arrondissement de Paris. 1/x
#OpenSource #LogicielLibre #SouverainetéNumérique #Python #SelfHosted #RadioTech #NextJS #CauseCommune
I like what Astral is doing from a tech perspective, but I'm not sure this sits right with me.
When Astral was a small company, it was one thing, but now that Astral is OpenAI, it kind of rubs me the wrong way.
Is this just me?
I'm glad they endorsed their own employee, though.
That would have been awkward AF if they didn't. 🍿
(Btw, I throw no shade on anyone from the list or who is running. I just find this to be incredibly cringe to do without reading the #Python room.)
Python Tip #247 (of 365):
Test file processing code with tempfile.
from pathlib import Path
from tempfile import TemporaryDirectory
def test_make_rst_from_md_file():
with TemporaryDirectory() as directory:
md_path = Path(directory, "example.md")
md_path.write_text("# Example markdown file")
make_rst_from_md_file(md_path)
assert md_path.with_suffix(".rst").is_file()
🧵 (1/4)
“If you need to distinguish between Linux and Mac, you need either the sys.platform string or the platform.system() function.”
Read more 👉 https://pym.dev/operating-system-checks/
Great article by @ehmatthes !
I like temporary variables too. I share the reasons he does but I'd also like to add that they add documentation for what that data means in the context, making the code easier to read and understand.
https://www.mostlypython.com/in-defense-of-temporary-variables/
New screencast on creating temporary files & directories in Python:
https://youtu.be/dVGNVcy5NqY
If you'd rather read than watch, there's also an article version:
https://pym.dev/temporary-files
It can be time to update the "Python wrapper around the libmemcached interface" in Django
https://pypi.org/project/pylibmc2/
The weekend is great time to get to know the candidates who are running for the PSF Board of Directors this year! Find their statements on the 2026 nominees page 🤩 If you affirmed your intention to vote in this year's election or voted last year, make sure to check your email 📩 #Python
https://www.python.org/nominations/elections/2026-python-software-foundation-board/nominees/
Most #Django projects have too many apps.
An app is not a unit of code organisation – it's a namespace in your database. Every label lands in migrations, content types, FK strings. Expensive to move. Python packages are free.
So: start with one app. Split by domain, never per model. A few satellites that never import a domain (import-linter in CI). One `common`, not `common` and `utils`.
Wrote up what we've learned, counterexamples welcome:
Python Tip #246 (of 365):
Measure your test coverage, including BRANCH coverage.
$ coverage run --branch -m pytest
$ coverage report
Or with the pytest-cov plugin:
$ pytest --cov --cov-branch
Code coverage lets you know WHICH lines of code were run by your automated tests.
For Python, coverage.py is great for measuring this.
Lines that are missing coverage are NEVER EVEN RUN by your tests. Code that isn't run is code that isn't tested.
🧵 (1/4)
Python Morsels now includes Daily Recall: a spaced repetition system for Python & Python-adjacent learning.
It's basically Whereabouts.Earth but for Python.
I've been talking about this idea for YEARS, dogfooding it for months, and now it's finally live.
If you'd like to improve your uv, pytest, Python, etc. skills, I'd love you to try it & leave feedback!
https://treyhunner.com/2026/09/python-morsels-now-has-spaced-repetition/
“Note that while auto-formatters will affect blank lines between classes and functions, most blank lines are under your control.”
Read more 👉 https://pym.dev/embrace-whitespace/
Fourth post in the wrapture unit testing series: beyond callables.
Not everything a test controls is a call: attributes, environment variables, settings dicts imported by reference, registry entries, generators. wrapture spells each as a binding with one lifecycle, and a binding can observe as well as hold: it can even tell you a loop stopped early and left its generator half-consumed.
https://grahamdumpleton.me/posts/2026/09/beyond-callables-in-wrapture/
Default values are great, but they have one gotcha that Python developers sometimes overlook.
Read more 👉 https://trey.io/rbi1o4
Python Tip #245 (of 365):
Use approximate comparisons for floating point numbers in your tests.
As noted back in tip #203, floating point numbers have precision gotchas:
>>> one_two = 0.1 + 0.02
>>> one_two == 0.12
False
>>> one_two
0.12000000000000001
🧵 (1/3)
Third post in the wrapture unit testing series: phased behaviour.
Testing retry logic, circuit breakers and polling loops means a collaborator that behaves differently as the test progresses: fail twice then succeed, open after the third error, report pending until told otherwise. wrapture spells that as phases on a binding, changing on a count, a condition, an exhausted sequence, or a signal from elsewhere in the test.
https://grahamdumpleton.me/posts/2026/09/phased-behaviour-in-wrapture/
🎲 Just released pytest-randomly 5.0.0
The headline breaking change fixes combination with other test reordering plugins, including pytest-django. Previously, the same seed could produce different test orders between nearly-identical environments. Oops!
Software is never finished: even this 11 year old well-scoped plugin needs the occasional big fix!
“It's often more readable to give a name to an object instead of just a number.”
Read more 👉 https://pym.dev/avoid-indexes-in-python/
Second post in the wrapture unit testing series: recording calls.
What wrapture's timeline and tape actually record, what one event holds, and the whole-tape views that answer questions about the flow between calls rather than any one of them. Worked through on a resource leak, the kind of bug where the failure is an absence and asserting on an absence needs a record of what really happened.
https://grahamdumpleton.me/posts/2026/09/recording-calls-with-wrapture/
RE: https://mastodon.social/@hugovk/117196019583423218
Here's how to join the cool testers' club! 😎
https://hugovk.dev/blog/2026/help-test-python-315/
#Python #Python315 #GitHub #GitHubActions
🐍🚀 Out now: final Python 3.15 release candidate!
It's your last chance to say that YOU helped test 3.15 before the big day on 1st October!
How?
💡 Try out the new features
💡 Try your project with it
💡 Add 3.15 to your CI
💡 Library maintainer? An extra task for you: upload wheels to PyPI, especially binary wheels
🐞 Report bugs!https://discuss.python.org/t/python-3-15-0-candidate-2-is-here/108841?u=hugovk
In return?
😎 Join the cool testers' club!
🦥 Lazy imports
🧊 frozendict
💂 sentinel
🏎️ Tachyon
🫶 and much, much more!
Four years ago I published a post on how to manage #Python dependencies in as “boring” a manner as I could manage.
Today I’ve published a revised version catching up on developments in the ecosystem since then:
https://www.b-list.org/weblog/2022/may/13/boring-python-dependencies/
Python Tip #151 (of 365):
For truly unpredictable randomness, use the secrets module
Python's random module relies on pseudo-randomness, meaning it generates numbers in a predictable order. If someone can guess the random "seed" (it's based on the current time) they can predict the numbers produced.
For true randomness, use Python's secrets module instead.
🧵 (1/3)
Python Tip #244 (of 365):
Use a seed to test code that relies on randomness.
import random
def generate_code():
characters = "ABCDEFGHJKLPQRTUVWXY234679"
return "".join([random.choice(characters) for _ in range(16)])
def test_generate_code():
random.seed(5)
assert generate_code() == "YJ6P9462VAT7H2BF"
The utilities in Python's random module generate PSEUDORANDOM numbers using a deterministic algorithm.
🧵 (1/3)
I was trying to explain why I don't really use Python's match statements much and by explaining my take on them came around from a very mild dislike to an equally mild like
very mildly confusing
(this was after running https://github.com/15r10nk/matchify on my main code base to see what strong use of match statements looks like – obviously not all of the changed statements were good or sensible, but I'm coming around to liking some of them)
ATTN PSF Voting Members: The inaugural Python Packaging Council election vote is open now until September 15th! If you affirmed your intention to vote in the election, you should have an email with voting instructions 🗳️ Learn more on the PSF blog. #Python https://pyfound.blogspot.com/2026/09/inaugural-python-packaging-council.html
ATTN PSF Voting Members: The 2026 PSF Board election vote is open now until September 15th! If you affirmed your intention to vote in this year's election, or voted last year, you should have an email with voting instructions 🗳️ Learn more on the PSF blog. #Python
https://pyfound.blogspot.com/2026/09/the-2026-psf-board-election-is-open.html
🐍🚀 Out now: final Python 3.15 release candidate!
It's your last chance to say that YOU helped test 3.15 before the big day on 1st October!
How?
💡 Try out the new features
💡 Try your project with it
💡 Add 3.15 to your CI
💡 Library maintainer? An extra task for you: upload wheels to PyPI, especially binary wheels
🐞 Report bugs!
https://discuss.python.org/t/python-3-15-0-candidate-2-is-here/108841?u=hugovk
In return?
😎 Join the cool testers' club!
🦥 Lazy imports
🧊 frozendict
💂 sentinel
🏎️ Tachyon
🫶 and much, much more!
Python Tip #243 (of 365):
Write automated tests.
You can test manually (run your code to make sure it works), or write automated tests: code that tests your code, like this:
def test_no_tax():
assert calculate_total([3.50, 13.75], apply_tax=False) == 17.25
Every time you change your code, your automated tests can tell you whether you broke something... without you needing to manually check every possible scenario.
🧵 (1/3)
First follow-up to the wrapture announcement: unit testing with wrapture.
I take one small piece of code and write its tests twice, once with unittest.mock and once with wrapture, focusing on the cases where the difference is structural: where wrapping the real code rather than replacing it lets a test say something substitution cannot.
More posts on the testing side coming over the next few days.
https://grahamdumpleton.me/posts/2026/09/unit-testing-with-wrapture/
“The sorted function accepts an optional reverse argument.”
Read more 👉 https://pym.dev/sorting-in-python/
I finally got around to working on my bike mapping project enough to publish the results...
I take the GPX files from my bike rides, run some Python scripts, and get these maps.
It's still not done, but I've procrastinated enough and wanted to get something out there since I've been working on it since last fall.
It’s 2026, and there are still projects out there running on #Python 2.
https://www.eveonline.com/news/view/the-move-to-python-3-begins
“The name deque stands for "double-ended queue", meaning deque objects are actually a sort of hybrid structure: they can be used as a stack, used as a queue, or used as both:”
Read more 👉 https://pym.dev/stacks-and-queues/
Python Tip #242 (of 365):
Prefer isinstance over type for type checking.
Do this:
isinstance(value, int)
Not this:
type(value) == int
Unlike comparing with type(...), using isinstance respects inheritance.
A "type(...) == ..." check fails for subclasses:
>>> counts = Counter("hello")
>>> isinstance(counts, dict)
True
>>> type(counts) == dict
False
Checking with type means nobody can inherit from your class without breaking your type check.
🧵 (1/2)
What's New in Python 3.15:
locale
* setlocale() now supports language codes with @-modifiers. @-modifiers are no longer silently removed in getlocale(), but included in the language code. (Contributed by Serhiy Storchaka.)
* Undeprecate the locale.getdefaultlocale() function. (Contributed by @vstinner.)
RE: https://fosstodon.org/@europython/117155327428004010
les rediffusions des conférences de @europython 2026 sont en ligne : https://www.youtube.com/playlist?list=PLd3Y9yzyC5Uo
Une belle diversité de sujets avec 117 vidéos embrassant une multitude de thèmes : JIT, free-threading, async, MicroPython, le craft et l'architecture, les tests, la manipulation de données et la dataviz, rust, Django, l'observabilité, l'opensource, l'utilisation du GPU, l'IAg, le vibecoding, les keynotes et les présentations éclair, etc.
“When you need to look up one value based on another in Python, you can use a dictionary as a mapping of key-value pairs.”
Read more 👉 https://pym.dev/using-dictionaries-in-python/
Python Tip #241 (of 365):
Let dataclasses write your dunder methods.
The dataclass decorator writes __init__, __repr__, and __eq__ for you:
from dataclasses import dataclass
@dataclass
class Comment:
text: str
line: int
Back in tips 63, 64, and 66 I recommended giving every class an initializer, a friendly string representation, and (sometimes) a custom sense of equality.
That's three methods of boilerplate for even a simple class:
🧵 (1/3)
Python Tip #240 (of 365):
Dunder methods are meant to be defined, but not called.
Do this:
str(today)
Not this:
today.__str__()
Why avoid calling dunder methods?
Mostly because you're not supposed to.
Dunder methods are a contract between Python and whoever wrote the class: Python calls them, we use the operations they power.
🧵 (1/3)
“So if you need a stack-like structure in Python, use a list.”
Read more 👉 https://pym.dev/stacks-and-queues/
Dires les pythoneux, y'a un moyen de savoir de quel fichier (d'un répertoire donné) on doit importer les modules qu'on veut utiliser ?
J'avais du code qui fonctionnait avec une version précédente de FreeOrion mais depuis ils ont complètement réorganisé les modules donc y'a plus rien qui marche...
#DjangoConEurope 2027 is coming to Innsbruck – my birthplace! ❤️
Really looking forward to it, and I'm sure a bunch of our Beyonder devs will join me from February 17–21, 2027.
Finally, the DjangoCon map covers Austria, too 🎉
Python Tip #239 (of 365):
When implementing __eq__, return NotImplemented for objects you don't know how to work with.
Filling in __eq__ on yesterday's Version class (__lt__ would need the same check):
class Version:
... # self.parts is (major, minor, patch)
def __eq__(self, other):
if not isinstance(other, Version):
return NotImplemented
return self.parts == other.parts
🧵 (1/3)
“But duck typing and the isinstance function are not mutually exclusive.”
Read more 👉 https://pym.dev/goose-typing/
My screencast on Python's special NotImplemented value is now public.
Screencast: https://youtu.be/wI4K7faxZ_Q
Article: https://pym.dev/when-to-use-notimplemented/
NotImplemented is something you'll want to know if you ever implement __eq__ or various other "operate on another object"-style dunder methods.
This:
>>> 2 == 2.0
True
Isn't the same as:
>>> (2).__eq__(2.0)
NotImplemented
🔤🦥 isort 9.0 0 now supports Python 3.15 and sorting lazy imports 🎉
https://github.com/PyCQA/isort/releases/tag/9.0.0
#Python #Python315 #isort
🇪🇺🐍📽️ The EuroPython videos are all out!
https://www.youtube.com/playlist?list=PLd3Y9yzyC5Uo
Reply with your picks and let's build a thread of recommendations!
Python Tip #238 (of 365):
Don't write ordering methods by hand.
Want your objects to support <, >, <=, and >=?
You don't need to write them all!
Implement __eq__ and ONE ordering method (like __lt__), then decorate with functools.total_ordering:
@total_ordering
class Version:
...
def __eq__(self, other): ...
def __lt__(self, other): ...
🧵 (1/3)
Hit by the Patroni HTTP API stuck issue, again.
I have upgraded dozens of servers from Patroni 4.1.0 to 4.1.5 without issue last week. This morning, I continued to upgrade a couple more clusters. Today, we had two different freshly upgraded clusters down because the Patroni HTTP API is unresponsive. HAproxy stopped to send traffic because it thinks nodes are down, but Patroni and PostgreSQL looks healthy.
This issue has been on and off for the last 10 years I've been using Patroni. Apparently, it's caused by a recent change in Python that brings back the issue.
https://github.com/python/cpython/issues/140746
https://patroni.readthedocs.io/en/latest/
I'm on call tonight. I've been paged twice already. I have set up the MALLOC_ARENA_MAX=1 and PG_MALLOC_ARENA_MAX environment variables on the last failing cluster and hope I'll have a good night sleep before pushing them everywhere tomorrow 🤞🏻
“What if we only want to continue onward if the subprocess exited successfully?”
Read more 👉 https://pym.dev/running-subprocesses-in-python/
A more nuanced view of LLMs https://anarc.at/blog/2026-08-25-llm-nuance #llm #analysis #debian-planet #python-planet #free-software #debian #copyleft #copyright #linux
Python Tip #237 (of 365):
Need a read-only attribute? Use a property.
Properties are read-only by default:
>>> s = Square(4)
>>> s.length
4
>>> s.length = 10
Traceback (most recent call last):
...
AttributeError: property 'length' of 'Square' object has no setter
🧵 (1/3)
Any #Debian users also using the #Python bindings for #mapnik? If you didn't know, `python3-mapnik` has been removed from the unstable and testing releases; it still works in stable.
I have spent a few days building new packages based on the 4.3.0 release. I'm looking for potential testers; it WorksForMe™, but I want to make sure it doesn't break other setups. Have in account that this release has made some changes to the bindings, so your code might not work as is (mine didn't).
The PSF Board election vote kicks off in a week 🗳️🐍 In an effort to promote informed voting, the PSF Board Election Team has invited this year’s candidates to participate in a written interview. Check out the interviews on the PSF blog ⬇️
https://pyfound.blogspot.com/search/label/2026-psf-board-election-candidate-interview
Wednesday night I'll be speaking at the NYC Open Source Security User Group meetup.
If your release pipeline still has stored API tokens in it, come find out how to delete them for good.
Wed Aug 26, 6-8 PM, pizza at 6, talk at 6:30
Amazon office, 12 W 39th St, NYC
Free, but you must register for building access - last chance: https://luma.com/5mwalp6p?tk=JivtHQ
Already registered? See you soon! Bring a colleague, have them sign up first - building access requires photo ID.
#Python #OpenSourceSecurity #SupplyChainSecurity #NYCTech #PyPI
“In Computer Science, stacks and queues are data structures that are optimized to make it inexpensive to remove either the most recently added item or the least recently added item.”
Read more 👉 https://pym.dev/stacks-and-queues/
Python Tip #236 (of 365):
Don't write getter and setter methods in Python.
If you need to customize what happens when an attribute is accessed or assigned, use a property.
In Java, it's best practice to use getters and setters instead of direct attribute access, in case you ever need to customize them.
In Python, we just use attributes.
When we DO need to customize attribute access, we make a property. Here's one that rejects negative stock values:
🧵 (1/4)
Three days left until the first #CodeIsArt no-gen-AI meetup in #Lyon! We meet in Le Taille Crayon on Monday at 19:00.
We will have a third presentation: using #Python to write macros for #LibreOffice. That is in addition to the previous two: a comparison of #Python and #Go, and building a community around the #F3D open source app.
If you are interested: please register, see https://stolat.town/@marcink/117079431946180511
If you know someone who might be: please help us by boosting or forwarding the link!
In the #Python Discord, someone was trying to understand how Python code is executed without ever being turned into native CPU instructions. So I wrote a tiny programming language compiling to bytecodes. 300 lines of Python.
https://nedbatchelder.com/blog/202608/micro_language_implementation_calcium
“Even if our code was inside a function, it is sometimes useful to break out of a loop without also returning from our function.”
Read more 👉 https://pym.dev/breaking-out-of-a-loop/
Python Tip #235 (of 365):
Don't use super() when "self" would work instead
super() has one primary job: calling the parent class's version of a method you're overriding.
A super() call that isn't doing that job probably shouldn't be there.
Here's a subclass of a tree-like Node class:
class DoublyLinkedNode(Node):
...
def parents(self):
return super().parents()
That parents method shouldn't exist. Each parent method is inherited by default.
🧵 (1/3)
Python Tip #234 (of 365):
Don't inherit from list or dict. You could end up with some weird bugs.
Say we make a bi-directional dictionary by customizing __setitem__:
class TwoWayDict(dict):
def __setitem__(self, key, value):
super().__setitem__(key, value)
super().__setitem__(value, key)
>>> d = TwoWayDict()
>>> d[3] = 8
>>> d
{3: 8, 8: 3}
And it seems to work... except when it doesn't:
>>> d.update({9: 7})
>>> d
{3: 8, 8: 3, 9: 7}
🧵 (1/3)
“And if you find yourself wanting to ask about the common or unique values between two collections, you can use set arithmetic.”
Read more 👉 https://pym.dev/practical-uses-of-sets/
Django 6.1 was released this month 🎉 with exciting features such as database-level delete options, fetch modes, or UUID7() database function 🤩 Big thanks to all 210 contributors who pushed 907 commits and to the other anonymous heroes who made it possible 👏 👏 💚 #django #python
https://gist.github.com/felixxm/8f6689ee2a62f1742923462fe600e9b4
t is for time-machine
A lot of our software deals with the current time which means that to write good tests for it, we need a mechanism to control the time.
time-machine is a great library for that in Python.
Hey @freakboy3742 it can be interesting collecting all mobile apps written in Python like this attempt done for gtk4 based android application
https://gtk4android.geopjr.dev/
#Python #Android #Mobile #Gtk4
Python Tip #233 (of 365):
Don't return self from a method just to allow method chaining.
In Python, methods that mutate an object usually return None.
Functions and methods either RETURN a thing or DO a thing, but usually not both.
You may be tempted to make a mutating method return self so that calls can be chained:
tasks = (
TodoList()
.add_task("Publish weekly email")
.add_task("Record screencast")
)
This works, but it's VERY unconvntional!
🧵 (1/4)
Added docs/comments near places that are magnets for invalid (AI generated) security reports in Werkzeug. Maybe those tools will read these docs when scanning the code and will produce output that says it's not a security issue? Maybe? At least we can point to it next time if not.
https://github.com/pallets/werkzeug/pull/3252
#Python #Flask
Je vous raconte, c'est tordu.
J'exécute subprocess.Popen(["ipython", "kernel", f"-f={cfg}"]) pour lancer un kernel #Python et m'y connecter plus tard.
Si cfg est un chemin relatif (genre "./toto"), rien à signaler. Mais si cfg est un chemin absolu (genre "/home/azerty/foo/toto"), alors mon son parent ("foo") reçoit le bit t. C'est n'importe quoi...
Pour arranger les choses, les dev de #ipython ont limité la soumission de bugs aux devs du projet. Bah on va vivre avec ça du coup...
¡Para la próxima semana el grupo de trabajo de Diversidad e Inclusión de PSF tendrá un espacio en el Discord de la PSF!
Únete el August 25 9 PM UTC en el canal #psf-diversity para charlar, hacer preguntas y compartir en qué estás trabajando 🐍🗺️
https://pyfound.blogspot.com/2026/07/the-psf-d-workgroup-are-starting-office.html
The PSF Diversity & Inclusion Workgroup monthly office hours are next week on the PSF Discord!
Join us August 25 9 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
#fedihire #hiring #python #django #aws
UK based only - Senior Developer for The Electoral Commission // £70,000 // fully remote possible, hybrid at UK hubs also fine if your preference.
Fancy working with interesting data problems, and services that need to scale to millions of voters? You'll help bring a major voter-information service in-house and shape what comes next.
YOUR COUNTRY NEEDS YOU! We all need you. Plz.
Interested? I'm sole recruiter for this > thayer@team-prime.com CVs pls!
I built a new thing, an idea I have wanted to try for a long time.
Since writing wrapt, the idea was to build on it for two jobs I saw as one: unit testing in the spirit of mock, and tracing execution across real code. Same bindings for both, no changes to the code being observed. wrapture is the answer I ended up with.
First alpha on PyPI. Curious what people make of it.
[$] Representing Python paths using pathlib
At the outset of his PyCon US 2026 talk, Trey Hunner said that his goal was for attendees to stop representing filesystem paths as strings and to use pathlib instead. That's kind [...]
Python Tip #232 (of 365):
Try to avoid static methods in Python.
A static method is a function that HAPPENS to live on a class. It doesn't know the instance (or class) it's called on.
They're usually helper functions that live on a class for organizational reasons:
class Hasher:
...
@staticmethod
def _checksum_matches(hash_object, checksum):
checksum_bytes = bytes.fromhex(checksum)
return checksum_bytes == hash_object.digest()
🧵 (1/3)
Should we remove Flask's interactive debugger? (Being able to execute code at any frame in a traceback.) It's a huge amount of complexity and source of constant invalid security reports. I'm not sure it's been needed for a long time. https://github.com/pallets/werkzeug/issues/3244 #python #flask
Nouvelle instance (comment ça 10 jours ?), nouvelle intro !
Admin sys Linux/BSD et adepte du logiciel libre.
Je bricole et, code en Python
je parle parfois de science.
Je préfère l’intelligence artisanale à l’intelligence artificielle.
Héberger ses données plutôt que de les offrir aux GAFAM.
Team #ergol et je m'interresse aux #poticlavier
#Linux #BSD #FOSS #SelfHosting #Python #Homelab #introduction
r is for REPL
Python's REPL (read-eval-print loop) is an interactive playground for writing and executing Python code and one of the big reasons why I likely ended up enjoying Python more than other languages when I was learning programming.
It has so many uses: buidling your code step by step, running interactive shell script style operations, exploring Django's models and debugging.
RE: https://mastodon.world/@hamatti/117127427365915452
Some neat startup script tips in here, and for Python 3.15 you could do this for nicer pprint output:
pp = Printer(expand=True, indent=4)
Python Tip #231 (of 365):
Use class methods as alternate constructors.
>>> s = Square.from_area(100)
>>> s.length
10.0
The classmethod decorator makes a method that's meant to be called on the class itself (not on an instance):
import math
class Square:
def __init__(self, length, color=None):
self.length = length
self.color = color
@classmethod
def from_area(cls, area, color=None):
return cls(math.sqrt(area), color)
🧵 (1/4)
“You can think of abstract base classes that rely on registering as similar to an opt-in duck.”
Read more 👉 https://pym.dev/goose-typing/
The Python Morsels REPL now runs on the new pyrepl! In browsers that don't support JSPI.
As of very recently, both Chrome and Firefox support the JavaScript Promise Interface, which is what's needed to get pyrepl (the new REPL in Python 3.13+) to work in WebAssembly.
it falls back to the old REPL.
Thanks to @ambv & whoever else helped (can't seem to find the PR) with getting pyrepl working in the browser!
@fitheach Try list-table or csv-table instead:
https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#tables
#markup #Python
In general, I prefer reStructuredText to other markups, because I find it more capable, for my needs.
The one exception to this is Tables. Whoever designed the rst syntax for tables should be taken around the back of the building, and shot.
I've just spent over an hour fiddling with -, =, and + to get my tables to work in 3 documents.
#PyPI runs on ~zero AWS cost thanks to @fastlydevs caching 99% of traffic + AWS credits covering the rest. Huge thanks to both! But 2026 broke an 8-year streak: AWS spend is up 69% YoY as agents & CI runs surge.
@Monorepo, PSF Director of Engineering, on what's changing: https://pyfound.blogspot.com/2026/08/how-aws-powers-pypi-and-psf.html
Gunicorn now categorises "Framework returns content on HEAD requests" as a bug, and warns about it for every request.
Django's position is "Web servers should automatically strip the content of responses to HEAD requests while leaving the headers unchanged".
So, that's fun! 🫠
(Screenshot shows ASGI commit, but it was added to WSGI too.)
q is for Q
Django's Q objects make more complex queries easier to read and they can improve reusability and documentation of your code by giving individual queries and query parts names.
Python Tip #230 (of 365):
Use a single underscore prefix for internal attributes.
This _digits attribute is private... but only by convention:
import re
class PhoneNumber:
def __init__(self, number):
self._digits = re.sub(r"\D", "", number)
...
This (not fully implemented) class includes str() and an area_code attribute as its public interface:
>>> wh = PhoneNumber("(202) 456-1414")
>>> print(wh)
202-456-1414
>>> wh.area_code
'202'
🧵 (1/3)
A neat security vulnerability in Python caused by str.lower(). Also includes lots of RFCs so I’m having a good time :)
https://sethmlarson.dev/when-str-lower-is-a-security-vulnerability
✍️ I used my leet prompt engineering skillz to fix a bunch of bugs in django-upgrade
https://adamj.eu/tech/2026/08/18/django-upgrade-1.32.0-44-bug-fixes/
Alright Fedi, I'm looking for a job out of AI hell. I know chances aren't great for anyone right now, but I'm taking mine anyway.
I'm a (senior?) #Python developer with 10 years of experience in both #DataScience and #SoftwareEngineering (with a preference for the latter). I can find my way around #Rust and don't shy away from #JavaScript. I've done a bit of #React lately and haven't found it terrible.
I thrive in team environments where I have time both to work on my own and in pairs or mobs ( https://mob.sh is a great tool I'd use again, but IntelliJ's Code With Me works too).
My greatest passion is automating the tasks around coding away - testing, building, deploying code with either the shortest set of commands or just fully automated from a pipeline on pull/merge requests.
I won't say no to places that require me to use AI, but I have a strong preference to be able to write my code myself.
Would love boosts for reach! Also thanks for reading 💖
“We can automatically decode the output of this process using the default character encoding, by specifying text=True when we call subprocess.run:”
Read more 👉 https://pym.dev/running-subprocesses-in-python/
[$] Bootstrappable builds: how and why
This year's edition of the Free and Open Source Software Yearly conference, better known as "FOSSY", moved north to the beautiful (and enormous) campus of the University of British [...]
Python Tip #229 (of 365):
Don't overuse classes.
Writing Python code does NOT require writing classes.
Unlike many programming languages, you can accomplish quite a bit in Python without ever making a class.
The most common reason to write a class is that a framework REQUIRES one (like Django's Model classes).
The best reason to write your OWN class: you have data and functionality that clearly belong together.
🧵 (1/3)
RE: https://fosstodon.org/@dongheena/117110919917203349
🐍🇰🇷🏃♂️ Thanks to all the sprinters for contributing to #CPython, and to @dongheena for running this with me!
#PyConKorea #PyConKorea2026 #PyConKR #PyConKR2026 #MakeItHappy #PyCon #Python
o is for orm
What a way to start a new week: talking about Django's ORM. Whether to like ORMs or not seems to be a divisive topic among developer. I love them and Django's one is my favourite flavour.
Maintenant que les démarches administratives sont faites, je peux enfin l'annoncer : je suis maintenant en freelance !
Développeur spécialisé dans le Web avec PHP (vanilla & Symfony) et Python (surtout avec Flask), avec de solides connaissances en JS (vanilla & Vue.js), je réalise tous les développements en tenant compte des besoins en accessibilité, en écoconception et du RGPD dès la conception.
Réalisations entièrement faites par un cerveau biologique.
Hudson River Trading is hiring Site Reliability Engineer - Enterprise Technology
🔧 #python #ansible #aws #azure #cicd #gcp #kubernetes #terraform
🌎 New York, New York
⏰ Full-time
🏢 Hudson River Trading
Job details https://jobsfordevelopers.com/jobs/site-reliability-engineer-enterprise-technology-at-hudsonrivertrading-com-may-18-2026-09cdd8?utm_source=mastodon.world&utm_medium=social&utm_campaign=posting
#jobalert #jobsearch #hiring
Not going to make it to Chicago for DjangoCon US 2026? That's ok, I mean I'll miss you, but did you know you can watch all of the talk lives for cheap? Grab a ticket and help support the conference and community! https://ti.to/defna/djangocon-us-2026 #django #python
Python Tip #228 (of 365):
Don't catch NameError exceptions. 🧵
This is an issue:
try:
start, end = parse_date(row["start"]), parse_date(row["end"])
except (ValueError, TypeError, KeyError, NameError):
print(f"Invalid date on line {n}", file=sys.stderr)
continue
A NameError is raised when a variable isn't defined... which usually means a variable name was MISSPELLED.
🧵 (1/3)
You've all started testing the #Python 3.15 release candidate, right?
Oh, you can't because it's not on AWS Lambda? Good news, it's now available along with Node.js 26 as a preview:
https://aws-news.com/article/2026-08-15-introducing-public-preview-runtimes-on-aws-lambda-starting-with-nodejs-26-and-python-315
Python Tip #227 (of 365):
Don't rely on clever implementation details. 🧵
In CPython, two 3's are identical:
>>> x = 3
>>> y = 3
>>> x is y
True
But two 300's are not always identical:
>>> x = 300
>>> y = 300
>>> x is y
False
Don't rely on this. Compare numbers with ==.
In CPython, integers from -5 to 256 are created on launch, so every 200 is identical to every other 200.
Bigger numbers are only identical sometimes:
>>> x, y = 300, 300
>>> x is y
True
🧵 (1/2)
Alex Martelli coined the term "goose typing" to describe this ability in Python to practice duck typing while also using isinstance and issubclass.
Read more 👉 https://pym.dev/goose-typing/
Fun first day at #PyConKorea, meeting the local community and especially hearing how they're not only building but sustaining communities:
🐍 @dongheena building a #Python language support team, starting informally to encourage participation
🐍Luna building PyLadies Seoul through asking for help and learning to teach
🐍 Jiwoo Oh, Jiyoung Hwang & Juyeong Lee jumped right into a big open-source project and learned early the importance of collaboration
Python Tip #226 (of 365):
Don't assign to global variables from within a function.
You CAN do this in Python. But you really shouldn't.
Yesterday's tip noted that assignments within a function NORMALLY make local variables.
But they don't always...
Python's "global" statement is the exception:
>>> phrase = "Hi world"
>>> def set_phrase(name):
... global phrase
... phrase = f"Hello {name}"
...
>>> set_phrase("Trey")
>>> phrase
'Hello Trey'
🧵 (1/2)
📰 Issue 350: Django moves to an annual release cycle
https://django-news.com/archive/issue-350-django-moves-to-an-annual-release-cycle/
“When I need to run multiple subprocesses within the same Python script, I often find myself passing the same keyword arguments over and over to the run function.”
Read more 👉 https://pym.dev/running-subprocesses-in-python/
And here are my bike riding numbers from 2025. I started having back/leg/nerve pain at the end of November. It will always bother me that I didn't get 2,000 miles in 2025.
(August is when I started riding an ebike and commuting to work and riding a lot, lot, lot more!)
My bike riding has been poor this year, due to spinal stenosis and then spinal surgery in June... but hopefully the numbers will go up for the rest of the year.
(And who knows? Maybe I'll update some of the Python code that generates these.)
sincewhen now includes features that are removed from Python and their removal version.
https://pym.dev/since or "uvx sincewhen"
If you catch features it doesn't handle that you think it should, let me know.
⚠️ si vous utilisez une str #Enum et que vous migrez de #Python 3.10 à 3.11+ attention à ce changement de comportement :
from enum import Enum
class Meetup(str, Enum):
PYTHON = 'python'
JS = 'js'
print(f'{Meetup.PYTHON}')
# 'python' pour 3.10
# 'Meetup.PYTHON' pour 3.11+
Une conséquence de https://peps.python.org/pep-0663/.
Pour revenir au comportement d'avant :
- utiliser Meetup.PYTHON.value
- implémenter la méthode __str__ :
class Meetup(str, Enum):
def __str__(self):
return self.value
⬆️ I updated django-cli-no-admin last night to support Django 6.1, Python 3.15, and Python's free-threaded versions.
Given the nature of the project, that means pyproject.toml updates 😬
I also tried out the trusting publisher thing, and it worked too. 🎉
À #Lyon le centre Léon Bérard a un poste de data engineer
https://www.centreleonberard.fr/travailler-au-centre-leon-berard/data-engineer-python-fh
#python #job
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)
l is for learning.
Life of a software developer is one of continuous learning. There's always something new to learn and so many resources to learn from.
Today I shared a couple of book and podcasts recommendations and a long list of amazing people who write about Python on their websites.
I need to think about how I'm voting the Packaging Council election. So many great nominees, but a lot that I don't recognize because they're dealing with a different part of the ecosystem and not the core where I know the most people. I feel like I want the inaugural council to be core people who were already setting a good direction, but "who I know" also feels like the wrong way to vote. And there's still too many people who I know! 😅 https://www.python.org/nominations/elections/2026-python-packaging-council/nominees/ #Python #PyPI
We're also excited to announce the nominees for the inaugural Python Packaging Council 🤩 make sure to check out everyone's nomination statements to learn more about this years candidates! (And make sure to affirm your intention to vote by August 25th, 2 PM UTC!) #python https://pyfound.blogspot.com/2026/08/announcing-packaging-council-election.html
“It's actually possible to use isinstance and practice duck typing at the same time!”
Read more 👉 https://pym.dev/goose-typing/
Wow, @pypi crossed 2 EXABYTES bandwidth served in 2026.
For comparison, **all traffic** served in 2025 was only 1.95 Exabytes.
Thanks to @fastlydevs over 99.999% of that is absorbed by their powerful global caching layer, chugging along to serve #OpenSource #Python users worldwide
We're also excited to announce the nominees for the inaugural Python Packaging Council 🤩 make sure to check out everyone's nomination statements to learn more about this years candidates! (And make sure to affirm your intention to vote by August 25th, 2 PM UTC!) #python https://pyfound.blogspot.com/2026/08/announcing-packaging-council-election.html
We're excited to announce the nominees for the 2026 PSF Board Election 🤩 make sure to check out everyone's nomination statements to learn more about this years candidates! (And make sure to affirm your intention to vote by August 25th, 2 PM UTC!) #python
https://pyfound.blogspot.com/2026/08/announcing-psf-board-candidates-for-2026.html
Python Tip #224 (of 365):
Constants that are specific to a class often belong ON that class.
class Circle:
max_radius = 100
def __init__(self, radius):
if radius > self.max_radius:
raise ValueError(f"Radius can't exceed {self.max_radius}")
self.radius = radius
But, why make max_radius a class attribute instead of a module-level MAX_RADIUS constant...?
🧵 (1/3)
I decided to play with a silly idea: reorganizing #Python's junk drawer module (I say "junk drawer" affectionately here).
https://treyhunner.com/2026/08/reorganizing-pythons-sys-module/
📦 New package day! This time a Rusty rewrite of the emoji package: 3.5x faster for conversion, 70 times faster for deconversion, and using about 40% less memory.
@diazona @stylus Here's the recent big one https://blog.pypi.org/posts/2026-07-22-ui-updates/
#Python #PyPI
“But self-concatenation doesn't copy anything, so don't try to use it to make lists of mutable values like lists-of-lists.”
Read more 👉 https://pym.dev/self-concatenation/
Wow, @pypi crossed 2 EXABYTES bandwidth served in 2026.
For comparison, **all traffic** served in 2025 was only 1.95 Exabytes.
Thanks to @fastlydevs over 99.999% of that is absorbed by their powerful global caching layer, chugging along to serve #OpenSource #Python users worldwide
#CodeIsArt no-gen-AI meetups: it is now possible to sign up for the first event!
On keskonfai: https://keskonfai.fr/events/6e9b14ad-9803-4100-988b-59dfe69e2e5d
On meetup.com: https://www.meetup.com/code-is-art/events/316076339/
Use either to sign up (preferably in advance so that we know how many people to expect), boost if you know anyone who might also be interested, maybe suggest a talk if you would like to share something interesting? And show up at Taille Crayon on the 24th, 19:00, see you there!
RE: https://fosstodon.org/@ThePSF/117044410884871074
la communauté Python lance un sondage sur les pratiques d'utilisation et l'outillage autour du typage des valeurs : https://www.surveymonkey.com/r/python_typing
#Python #écosystème #typing #survey
The 2026 Python Type System & Tooling Survey is live 🐍📝❓ No typing experience needed—your perspective as a #Python dev matters most. Take a couple minutes to help improve Python typing for all!
https://www.surveymonkey.com/r/python_typing
This survey was developed with support from the Pyrefly team at Meta, the PyCharm team at JetBrains, the Python team at Microsoft, and the typing community on discourse.python.org.
xy est une bibliothèque permettant de simplement réaliser des graphiques interactifs 2D pour le web ou les notebooks. Elles supporte l'affichage de nombreux points grace à son cœur écrit en rust qui détermine ce qui a besoin d'etre affiché : https://github.com/reflex-dev/xy
🟣 Nouveau journal de bord sur le blog !
Aujourd'hui je vais vous parler un peu d'une amélioration que j'ai développé pour ma lib rst2gemtext suite à un besoin de @Dryusdan, d'un petit changement que j'ai apporté au blog, et d'une réflexion que j'ai eu sur la langue dans laquelle je publie suite à la lecture d'un article de @Edent
Bonne lecture ! 😁
Python Tip #223 (of 365):
Consider copying mutable arguments in your class initializers.
What happens if two objects are given the SAME list?
>>> initial_tasks = ['Watch screencast', 'Brush teeth']
>>> mon = TodoList(initial_tasks)
>>> tue = TodoList(initial_tasks)
It depends...
🧵 (1/4)
“When you need to launch a subprocess from within Python, I recommend using the run function from Python's subprocess module.”
Read more 👉 https://pym.dev/running-subprocesses-in-python/
Want to know how many cores on your CPU with #Python? You can use the multiprocessing module for that 🐍🔥
Python Tip #222 (of 365):
Be careful with mutable default values in function definitions.
This class has a bug:
class TodoList:
def __init__(self, tasks=[]):
self.tasks = tasks
def add_task(self, task):
self.tasks.append(task)
Every TodoList object made without arguments shares the SAME list:
>>> mon = TodoList()
>>> tue = TodoList()
>>> mon.add_task("Work on Python exercise")
>>> tue.tasks
['Work on Python exercise']
🧵 (1/3)
“Python's f-strings are great, but if you just need to smoosh a few values together with spaces between them, consider passing separate arguments to print.”
Read more 👉 https://pym.dev/print-features/