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.
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...
Join the Djangonaut Space Session7 to grow as a contributor in the #django and #python ecosystem with the support of community and mentors.
Applications are open until September 6th AoE.
Read our blog post to find out how the program works:
https://djangonaut.space/comms/2026/08/14/2026-opening-session-7/
Projects involved in Session 7:
🐝 @beeware docs
🟢 @django & accessibility
💚 @djangocms
🐛 django-debug-toolbar
🧡 @djangogirls
⚙️ Render Engine
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...
My latest blog post: Extending CircuitPython with Native Modules - Part 3
https://mikecoats.com/extending-circuitpython-native-module-3/
For CircuitPython Day 2026, I wanted to get close to the metal and write a module in C that I could call from CircuitPython. Finally, we bundle everything inside a class.
#circuitPython #circuitPythonDay #circuitPythonDay2026 #code #embedded #electronics #esp32 #espressif #python
¡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 #Python315 #REPL #pprint
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.
My latest blog post: Extending CircuitPython with Native Modules - Part 2
https://mikecoats.com/extending-circuitpython-native-module-2/
For CircuitPython Day 2026, I wanted to get close to the metal and write a module in C that I could call from CircuitPython. This time, we're looking at adding a module-level method.
#adafruit #circuitPython #circuitPythonDay #circuitPythonDay2026 #code #embedded #electronics #esp32 #espressif #python
Looking to get active during DjangoCon US?
We've put together a guide with ideas for walking, running, biking, swimming, and exploring Chicago during the conference.
Does your local meetup community need a website? Because I have just the theme for you.
Every community I've helped run has needed a website, and every time, we'd spent time hours browsing for themes and ended up rebuilding it from scratch, because none of the themes are meant for communities. Until now.
Introducing "Popular", a static site theme built especially for community & meetup groups, works in Hugo & Astro.
Blog: https://mariatta.ca/posts/no-more-rebuilding-the-community-website/
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/
«Finger: the 1971 social network that never died»
It will surprise more than a few of you to hear that the first social network dates back to 1971; no accounts, no algorithm, no central server, just a plain text file you control.
https://en.andros.dev/blog/54572bc7/finger-the-1971-social-network-that-never-died/
[$] 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 [...]
If anyone cares about #NetBSD and #Python :
https://github.com/borgbackup/borg/issues/5922
There is also an issue about that on the NetBSD issue tracker since quite a while, but guess it was overlooked.
Ich habe mir letzte Woche von einem LLM ein kleines Pythonscript erstellen lassen. Es sollte meine .ssh/config auslesen, dort jeden eingetragenen Host finden, und dann für jeden Host einen übergebenen Befehl ausführen. Also ich rufe "./remote.py apt update" auf, und dadurch soll für jeden Host "ssh hostname apt update" aufgerufen werden. Bis alles funktioniert hat, dauerte es ca. 20min. Leider waren da recht komplexe Regular Expressions drinnen (ein Kenntnis die ich immer noch nicht erlangt habe) und ich habe nicht wirklich jede Zeile verstanden was dort vor sich ging. Wenn ich mich selbst hinsetze und das schreibe, was ich gerade versucht habe, brauche ich auch 20min. Habe dabei aber wieder etwas mehr Python gelernt anstatt prompts so zu formulieren, dass auch das dabei herauskommt was ich möchte. Ein weiterer Vorteil: ich verstehe jede Zeile meines Scripts.
Mein Script ist übrigens eine Zeile kürzer wie das generierte, auch wenn das nur das "import re" ist, welches wegfällt. Ich programmiere ja viel Automatisierungen in der Industrie. Da sind wir es gewohnt lieber eine Zeile mehr zu programmieren, dafür ist es lesbarer für die Person, die das nach uns maintainen muss.
Um fair zu sein sollte ich sagen, dass ich einige Fehler schon umgehen konnte, weil das LLM die schong emacht hatte, ich also eventuell selbst 5 - 10min länger gebraucht hätte.
#linux #homeserver #python #scripting
Bei uns steht eine #Langzeit #Messung an - die ist weit weg - läuft n Jahr 24/7
Mein Ich von 201x würd hier #LabVIEW Programm schreiben und ne #Windows Kiste verwenden mit ner remote Desktop Lösungen aka anydesk
Mein 2025 Ich hat schon dazu gelernt und ich hab n schickes #Python Programm entwickelt... Auf dem #Mac - aber das ist lief auch schon testweise aufm #raspi
Da wir das irgendwo Vorort Aufbau wollen wäre Laptop die beste Lösung - also mal im Schrank geschaut was da noch so ist: hp probook 650 g1 - i5 4gen 8gb RAM SSD drin - #hardwarereuse
Debian mit KDE Plasma darauf - #hermes_agent installiert - und dann wurde mir erst klar wie genial das wieder mal ist... #debian13 #linux
Hermes mit #glm52 hat Programm gecloned und automatisch in Betrieb genommen - hätte ich auch noch hinbekommen - Zeit gespart
Mit Hermes und der Kommunikation über Matrix brauchen wir uns keine Gedanken über Netzwerk-Ports machen im Ziel Gebäude - alternativ können wir tailscale nach Installatieren #easydeployment
Mit Hermes hab ich ein System das die Messung überwachen kann - läuft noch alles? Und dann direkt Bescheid sagt #watchdog
Noch verrückter - er kann mir dort Vorort auch debuggen und ggf fehler beheben obwohl das Gerät schon 400km weg von mir ist - wie wenn ich davor sitze #softwareengineering
Ich mach das mit den VServer Tag täglich - aber das mein Messtechnik Job so viel einfacher wird - das wird mir jetzt erst klar
Könnte theoretisch 100 solche Messungen betreuen 🤯
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)
A welcoming community starts with all of us. 💚
As you prepare for DjangoCon US 2026, we encourage everyone to take a few minutes to read our Code of Conduct. It helps ensure our conference remains a safe, respectful, and inclusive space for all attendees.
🔗 Read it here: https://2026.djangocon.us/conduct/
🎉 We’re excited to welcome Dawn Wages as a keynote speaker at DjangoCon US!
Drawing on Star Trek, Octavia Butler, and Afrofuturism, Dawn will explore leadership, belonging, community, and building better futures through open source.
📅 Aug 24–28 | Chicago
https://2026.djangocon.us/news/keynote-dawn-wages/
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
Lily boostedToday, we held a CPython sprint in Seoul as part of PyCon Korea!
In just one day, participants created 19+ PRs, including devguide contributions and backport patches. It was great to see so many people contributing to CPython, especially first-time contributors.
Huge thanks to everyone who created the @europython sprint materials, which helped us a lot today, and to @hugovk for actively supporting and mentoring our participants throughout the sprint!
I've become interested in learning Python after doing a bit of scripting in Ruby... I wonder what is the best way of getting into programming with it? I suspect a good start would be to get Jupyter Lab installed, but is there a good book or website that people recommend for learning the language specifically? So far I've found Python's own website to be a great resource!
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.
🐍 Python Kurs #01 – Visual Studio Code installieren
Du möchtest Python lernen? Dann starten wir mit der richtigen Entwicklungsumgebung! 🚀
In Teil 1 der modernisierten Python-Serie installieren wir Visual Studio Code und bereiten alles für die ersten eigenen Python-Programme vor.
👉 Ideal für Python-Anfänger
👉 Schritt für Schritt erklärt
👉 Grundlage für die kommenden Folgen
📺 Die Python-Serie:
https://www.youtube.com/playlist?list=PLq7y778vthUCwD7ChirG9VilGM6o4KKk8
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)
Just 8 days left until DjangoCon US! 🎉
Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.
Ihr erinnert mich an mein CachyOS Couch Gaming Experiment?
Ich bin endlich mal dazu gekommen, den Frickelcode meines Gamepad-Login-Screens ein wenig aufzuräumen und auf GitHub hochzuladen.
Ich bin nicht ganz sicher, ob die Anleitung vollständig und verständlich ist. Es könnte sein, dass ich noch ein paar Rechteeinstellungen vergessen habe. Also schaut gerne rein und testet es aus
https://github.com/Nephirelle/gamepad_greeter
#CachyOS #Greetd #Pygame #Python #CouchGaming #LinuxGaming #Games #Gaming #Linux #GitHub
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/
Just 9 days left until DjangoCon US! 🎉
Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.
The best recruiters are where the developers are.
@foxleytalent is the go-to recruiter for the Django community in the US, and Jon Gould will be back in Chicago for his fourth DjangoCon US!
We’re looking forward to having Foxley Talent and Jon with us in Chicago! 🐍
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
Want to get more involved at DjangoCon US? 🙋
Volunteering is a great way to meet people, give back to the community, and help make the conference possible.
📖 Learn more: https://2026.djangocon.us/news/why-you-should-volunteer/
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)
I have an open source project: https://codeberg.org/thesupertechie/pncli
For now it's very barebones. Anyone know where to get suggestions for improving it further?
Le mec se dit "Bon bah maintenant que #Python a embrassé le #AIslop , il serait peut être temps de jeter un coup d'oeil a #Julia."
Un coup d'oeil au commit sur le depo de la lib standard, des commits de #Claude dans tous les sens.
Bon bah il est peut être temps de quitter le calcul scientifique finalement.
📰 Issue 350: Django moves to an annual release cycle
https://django-news.com/archive/issue-350-django-moves-to-an-annual-release-cycle/
Just 10 days left until DjangoCon US! 🎉
Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.
Have something you'd love to discuss at DjangoCon US? 📌
We're introducing Open Spaces, participant-driven sessions where you choose the topic and start the conversation.
No talk or presentation required. Bring an idea and see who joins!
📖 Learn more: https://2026.djangocon.us/news/open-spaces/
“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
Just 11 days left until DjangoCon US! 🎉
Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.
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/
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/
Just 12 days left until DjangoCon US! 🎉
Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.
📦 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/
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/
«HTML over WebSockets: real-time SPAs with barely any JavaScript»
Building a SPA usually means a JS framework, a JSON API, and two codebases forced to agree on a contract; there is another way that skips all three, and it is not new.
https://en.andros.dev/blog/ef4968f5/html-over-websockets-real-time-spas-with-barely-any-javascript/
#Web #JavaScript #Python #Django #WebSockets #DjangoLiveView
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/
Who would expect that my tiny contribution would be merged into Python 🐍 🎉 Be patient folks, there is no rush 🧘 #Python
Last year @yossarian wrote a brief post on the surprising complexity of the #Python "splitlines()" method. As a busy Unicode pedant, it took me a while to write up something explaining *why* it's complex, but here it finally is:
Just 2 weeks left until DjangoCon US! 🎉
Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.
Need more information on running for the inaugural Python Packaging Council? Check out our blog post: https://pyfound.blogspot.com/2026/07/get-ready-python-packaging-council.html
Need more information on running for the PSF Board? Check out our blog post: https://pyfound.blogspot.com/2026/07/get-ready-psf-board-nominations-opening.html
You have a little more than 24 hours left to submit a PSF Board or Python Packaging Council nomination for yourself or someone else 🩵🐍💛 Submit your nominations by tomorrow, Tuesday, August 11th, 2:00 pm UTC! #Python
https://www.python.org/nominations/elections/
Python Tip #221 (of 365):
Implement appropriate dunder methods.
Dunder methods are a contract between your class and the Python interpreter.
• __add__ & __radd__ power +
• __eq__ powers ==
• __len__ powers len()
Dunder methods are what third-party library authors use to make their objects feel like NATIVE Python objects.
Django QuerySet objects support indexing, iteration, len(...), and truthiness.
And Pandas DataFrames support a whole BUNCH of syntax.
🧵 (1/2)
“In addition to os.name and sys.platform, there's an even higher level approach to find the platform that your code is running on, with the platform module.”
Read more 👉 https://pym.dev/operating-system-checks/
h is for htmx
A short teaser for htmx for those who don't yet know it exists. I plan to write more in-depth posts about it when I'm not in a daily post grind like with Blaugust but wanted to give a shoutout to it anyway.
For the past couple of years, all my new Django projects are built with htmx and it's one of my favourite tools in my toolbox these days.
Python Tip #220 (of 365):
Trying quack like a duck? Seek help.
When implementing a common Python protocol (a sequence, a mapping, etc.), inherit from the matching abstract base class (ABC):
from collections.abc import MutableSequence
class MyCustomList(MutableSequence):
...
Benefits:
1. isinstance & issubclass checks work well (i.e. isinstance(x, Sequence))
2. Python will complain LOUDLY if you forget to implement a required method for the protocol
🧵 (1/3)
✍️ I just released a new version of my little Python profiler, tprof, with less overhead for more accurate results.
“As you write your code, pause and ask: “what should stand out here at a glance?””
Read more 👉 https://pym.dev/embrace-whitespace/
We’re thrilled to welcome pganalyze as a sponsor of Django Girls Chicago 2026! 🎉
Thank you, pganalyze, for supporting our mission to make tech more accessible and helping fund this free, hands-on Django workshop for women in Chicago.
19 days until DjangoCon US! 🎉
Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.
RE: https://mastodon.social/@djangonews/117044723592407007
New Django just dropped! 🙌🏻 🚀
I’m happy to see an implementation of one of my accessibility feature requests in there as well: `django.db.models.fields.BLANK_CHOICE_LABEL`.
I don’t have the spoons to explain it right now, but the backstory is in the ticket.
Paolo Melchiorre boostedDjango 6.1 released https://www.djangoproject.com/weblog/2026/aug/05/django-61-released/
We're grateful to Six Feet Up for supporting DjangoCon US 2026! 🎉
Their commitment to the Python and Django ecosystem helps make this conference possible and supports a welcoming space for learning, collaboration, and open source.
🇸🇪 boosted17 days until DjangoCon US! 🎉
Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.
New article on goose typing in Python (yes, that's actually a thing).
You can duck typing WHILE type checking.
Python Tip #219 (of 365):
Validate your ducks with goose typing.
You can use isinstance() WHILE duck typing. This is called goose typing (coined by Alex Martelli).
>>> from collections.abc import Iterable
>>> isinstance([1, 2, 3], Iterable)
True
Point doesn't inherit from Iterable:
class Point:
def __init__(self, x, y): self.x, self.y = x, y
def __iter__(self): yield from (self.x, self.y)
And yet...
>>> isinstance(Point(1, 2), Iterable)
True
🧵 (1/3)
🎨 I’m really enjoying the redesigned PyPI project pages. Thanks to Nicole Harris and team for making these improvements!
Blog post:
We’re thrilled to welcome REVSYS as a sponsor of Django Girls Chicago 2026! 🎉
Thank you, REVSYS, for supporting our mission to make tech more accessible and helping fund this free, hands-on Django workshop for women in Chicago.
Today in things that couldn't have aged well:
"Unpin flit-core dependency" 2 years ago without actually updating the metadata to use the newer pyproject.toml format.
https://github.com/sethmlarson/socksio/commit/b326406915fd98a8185c1c160165c5b8963b30c1
Python Tip #218 (of 365):
Don't needlessly convert between data types.
Looping over a file once? There's no reason to convert it to a list first:
for line in my_file:
print(line, end="")
Another example: if you're looping over a set, there's no reason to convert it to a list either:
>>> colors = {'red', 'blue', 'yellow'}
>>> for color in colors:
... print(color)
...
red
yellow
blue
"for" loops don't need a list. They accept ANY iterable.
🧵 (1/2)
🆙 Updated my post on unittest base test cases with a new preferred technique: using a plain class as a container.
https://adamj.eu/tech/2025/05/30/python-unittest-common-tests/
Python 3.15.0 release candidate 1 is out!
https://www.python.org/downloads/release/python-3150rc1/
Test your code against it and let the core devs know if you find bugs!
If you have uv, getting it is easy:
uv self update
uv python install
That even works if you already have an alpha or beta version installed (it'll upgrade it for you).
RE: https://fosstodon.org/@ThePSF/117044410884871074
For #Python devs who like to fill out surveys... ✅
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.
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.
Python Tip #217 (of 365):
Think in terms of the minimum viable duck.
In other words: "what's the least this object needs to do to work in this context?"
For example, csv.reader is usually given a file object... but it accepts ANY iterable of delimited lines:
>>> import csv
>>> rows = ['a,b,c', '1,2,3']
>>> list(csv.reader(rows))
[['a', 'b', 'c'], ['1', '2', '3']]
🧵 (1/4)
🐍🐍🚀🚀 Out now: Python 3.14.7 and 3.13.15!
https://discuss.python.org/t/python-3-14-7-and-3-13-15-are-now-available/108420
Peter's PEP 797 – Shared Object Proxies was also the first PEP rejected for 3.16 as well! ✌️
https://peps.python.org/pep-0797/
#Python #Python316 #PEP797
Forget Python 3.15 (don't forget it, please test!), the first PEP for Python 3.16 has been accepted:
PEP 828 – Supporting ‘yield from’ in asynchronous generators, by Peter Bierma
🎉 Karen Tracey is a DjangoCon US 2026 keynote speaker!
A longtime Django core developer, Karen will present "Django 6: The Most Exciting Release Ever?" and explore the exciting new features coming in Django 6.
Read more: https://2026.djangocon.us/news/keynote-karen-tracey/
Me after laboriously backporting #Python 3.15 fixes to #Django 6.0.x in #Gentoo: "oh, nice, the patchset applies cleanly to 5.2.x as well."
And today, I have to laboriously backport another patch to 6.0.x, and it turns out the backport doesn't apply cleanly to 5.2.x, so I have to laboriously backport it there as well.
I honestly *hate* Django Python version support policy. Shifting all the burden downstream.
TIL that #Python's `pathlib.Path` is expensive compared to plain `str`ings. I tested by `.walk()`ing a 2 level directory structure with 40M files and it took 9m. When I tried with `os.walk()`, it only took 1m. Of course, I tested this several times to avoid cold vs hot cache.
Tritium#python@libera.chat tracked it down to the constructor to `pathlib.Path`, which does a lot of things than being just a `str`:
What's the weirdest or nerdiest or most niche thing you use #python for? I love hearing people's stories and I love sharing how wide the set of use cases is.
Python Tip #216 (of 365):
In Python, we often care more about the behavior of an object than its type.
We say "if it looks like a duck and quacks like a duck, it's a duck".
When we check for duckness, we don't test DNA, we observe behavior.
Instead of asking "what TYPE can I use here?", ask "does my object have the BEHAVIOR that's expected here?"
🧵 (1/3)
Some things sooner than others:
3.15 RC 1 is out, but we'll wait until tomorrow to do 3.13 and 3.14 so we can include this fix for macOS that will become a problem in mid-September:
https://github.com/python/cpython/issues/153711
3.15 will have another release (1st Sept) before then, but 3.13 and 3.14's next one is in October, so better wait for the fix.
🐍🚀 Out now: Python 3.15 release candidate 1!
Please test and report bugs!
We strongly encourage maintainers of to prepare their projects for 3.15 during this phase, and publish Python 3.15 wheels on PyPI to be ready for the final release of 3.15.0, and to help other projects do their own testing.
Any binary wheels built against Python 3.15.0 release candidates will work with future versions of Python 3.15.
https://discuss.python.org/t/python-3-15-0-release-candidate-1-is-here/108395?u=hugovk
The nomination period for the PSF Board and Python Packaging Council elections is open now, closing next Tuesday, August 11th, 2:00 pm UTC 📝🐍 Don't wait until the last minute, though! Nominate yourself or someone else today: https://www.python.org/nominations/elections/ #Python
🔒🐍 Coming soon, Python 3.15 release candidate 1! The 3.15 branch is now locked until 3.15.0 final in October.
https://discuss.python.org/t/the-3-15-branch-is-locked-for-rc1/108389
Also coming soon: Python 3.13.15 and 3.14.7.
https://hugovk.dev/next-release/
#Python #Python315 #Python314 #Python314 #release
Jag har också en kurs som hjälper Scratch-generationen att ta steget över till #Python genom den välbekanta miljön. Kursen innehåller även grundläggande hårdvaruprogrammering för att göra inlärningen rolig. Kurserna startar i slutet av augusti. Dela gärna så att fler föräldrar får se detta. #Stockholm #Solna #Sverige
Python Tip #215 (of 365):
Know what it means to be a "sequence" in Python.
Lists, strings, and tuples are all sequences:
>>> fruits = ["apple", "lemon", "pear"]
>>> coordinates = (1, 8, 2)
>>> greeting = "Hi y'all!"
A sequence is an ordered collection that:
1. Has a length
2. Can be indexed from "0" up to one less than its length
3. Can be looped over
>>> len(fruits)
3
>>> fruits[0]
'apple'
>>> for c in coordinates: print(c)
1
8
2
🧵 (1/3)
“The defaultdict is very handy, but I find that it's rarely useful enough that I feel the need to use it.”
Read more 👉 https://pym.dev/default-dictionary-values/
✍️ New post demonstrating the runtime advantage of my package time-machine over its inspiration, freezegun.
https://adamj.eu/tech/2026/08/03/python-time-machine-o1-freezegun-on/
B is for batteries included
Python comes with batteries included — meaning it has a fantastic, powerful standard library. Two years ago, I spent an entire August writing about my favourite parts of it.
https://hamatti.org/posts/b-is-for-batteries-included-python-a-to-z/
📣 New to DjangoCon US Contribution Sprints?
Our latest blog covers everything you need to get started from understanding sprints to setting up your development environment before you arrive.
21 days until DjangoCon US! 🎉
Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.
A is for assert
assert is handy built-in in Python that can be used as a failsafe for scripts and for writing tests with pytest.
✍️ time-machine 3.3.0 is out, with Python 3.15 support, performance improvements, subinterpreter support, and various bug fixes.
Check it out, and if you’re using freezegun, try the updated Migration CLI to convert and speed up your tests.
RE: https://fosstodon.org/@adamchainz/117017044548701755
"Wheels are also now built with frame pointers enabled, per the PEP 831 change in Python 3.15. Frame pointers are a debugging feature for low-level languages like C, which allow debuggers to reconstruct the call stack of a program. Python has decided to enable frame pointers by default and encourage the ecosystem to do so as well, to make debugging easier for us all, so time-machine is joining the party."
Enabled by default for 3.15, do this for older versions:
https://github.com/adamchainz/time-machine/pull/627
✍️ time-machine 3.3.0 is out, with Python 3.15 support, performance improvements, subinterpreter support, and various bug fixes.
Check it out, and if you’re using freezegun, try the updated Migration CLI to convert and speed up your tests.
Python Tip #214 (of 365):
Use truthiness for integers with caution.
I DO rely on truthiness checks for integers, but not always. I would recommend only using them when they seem to improve readability.
I find this:
if hours: ...
More readable than this:
if hours > 0: ...
But I find this:
if number % 2 != 0: ...
More readable than this:
if number % 2: ...
🧵 (1/2)
The German translation of the Python docs is being restarted. Want to help out? Get in touch with Swen!
What does it take to help lead Django?
DSF President Thibaud Colas shares insights on open-source leadership, community, sustainability, and contributing to Django in this DjangoCon US Insights & Perspectives interview.
We're excited to welcome Caktus Group as a sponsor of Django Girls Chicago 2026! 🎉
Their support helps make this free Django workshop possible and empowers more women in tech. Thank you! 💚
#DjangoGirls #Django #Python #OpenSource #WomenInTech #DjangoCon
🚀 I just released rst2gemtext v0.7.0!
It is a #Python library and a CLI tool to convert reStructuredText to Gemtext (Gemini markup format).
➡️ https://github.com/flozz/rst2gemtext/releases/tag/v0.7.0
This version adds support for the Docutils' csv-table and list-table directives. Thank you @Dryusdan to make me know about them! 😁
📰 New GitHub, PyPI Policies Hope to Boost Supply Chain Security
"GitHub and the Python Package Index (PyPI) have introduced new policies meant to boost supply chain security," reports SecurityWeek, "by preventing the fast propagation of poisoned package version...
📰 Source: Slashdot
🔗 Link: https://developers.slashdot.org/story/26/08/01/0511237/new-github-pypi-policies-hope-to-boost-supply-chain-security?utm_source=rss1.0mainlinkanon&utm_medium=feed
Oh look, a new version of Delorean, the datetime enhancement library, has been released after just eight years:
https://github.com/myusuf3/delorean/issues/104 🚀🕒
#Python
Python Tip #213 (of 365):
Replace "or"-chained equality comparisons with a containment check.
Instead of this:
is_vowel = c == "a" or c == "e" or c == "i" or c == "o" or c == "u"
You can write this:
is_vowel = c in ("a", "e", "i", "o", "u")
In fact, you could even give that tuple a name:
vowels = ("a", "e", "i", "o", "u")
is_vowel = c in vowels
🧵 (1/2)
PegaProx for #Proxmox VE and #XCPng clusters made a huge step and is finally out of beta!
The first stable release also comes around with companies providing enterprise support. If you need SLA-backed help running PegaProx in production (or training sessions) you can now find a support partner at:
Enterprise Support & Sponsors: https://pegaprox.com/sponsors.html
Release: https://github.com/PegaProx/project-pegaprox/releases/tag/v1.0
Website: https://pegaprox.com
#homelab #virtualization #opensource #community #python #virtualization #enterprise #business #support
We're excited to welcome Prairie Postgres as a sponsor of Django Girls Chicago 2026! 🎉
Their support helps make this free, hands-on Django workshop possible, empowering more women to learn web development in a welcoming community.
Thank you for investing in the next generation of Django developers! 💚
#DjangoGirls #Django #Python
“In order to use a for loop, you must have an iterable to loop over.”
Read more 👉 https://pym.dev/while-loops/
"Or we could use the zip function with the strict=True argument to compare line-by-line in a for loop"
Read more 👉 https://trey.io/0frqkp
✍️ time-machine 3.3.0 is out, with Python 3.15 support, performance improvements, subinterpreter support, and various bug fixes.
Check it out, and if you’re using freezegun, try the updated Migration CLI to convert and speed up your tests.
Python Tip #212 (of 365):
Use any() and all() to check a condition across every item in an iterable
This:
any_negative = False
for n in numbers:
if n < 0:
any_negative = True
break
Can be replaced with:
any_negative = any(n < 0 for n in numbers)
And this:
all_good = True
for item in iterable:
if not condition(item):
all_good = False
break
Can be replaced with:
all_good = all(condition(item) for item in iterable)
🧵 (1/2)
Did you know that map()/filter() were added to Python 6 years before comprehensions?
Also range() was added 9 years before zip() which was added 3 years before enumerate().
And strings methods weren't methods for the first 9 years... they lived in the string module!
For years I've wanted an easier way to look up facts like those.
Now I have a way! https://pym.dev/since
It's also available as a CLI tool via PyPI
uvx sincewhen 'sum()'
🐍🚀 Out now: Tablib 3.10.0
The format-agnostic tabular dataset library
🔒 Security fix to escape dataset title in HTML serialisation
🦥 Support for Python 3.15 with lazy imports
💧 Drop support for EOL Python 3.9
🩹 And a bunch of fixes
https://github.com/jazzband/tablib/releases/tag/v3.10.0
#Python #Tablib #release #security #Python315
Thinking about nominating yourself or someone else for the upcoming PSF Board or Python Packaging Council elections? Now's your chance: take a couple minutes this weekend to submit a nomination! #Python
https://www.python.org/nominations/elections/
📰 Issue 348: One month until DjangoCon US
https://django-news.com/archive/issue-348-one-month-until-djangocon-us/
Using super()[key] won't work because the super class doesn't implement a __getitem__ method, but looking up the __getitem__ attribute on a super() object does work (assuming a parent class implements that method).
Read more 👉 https://trey.io/p0h32w
Great, now the AI is throwing malware into python libraries, too.
Anthropic's Claude breached 3 orgs, uploaded PyPI malware during tests
Python Tip #211 (of 365):
Consider how your Boolean expressions read in English
For example, you could write "10 > x" or you could write "x < 10".
They check the same thing, but I find the latter one more readable.
Steve McConnell's Code Complete recommends writing numeric tests in "number-line order": order the values left to right, from smallest to largest.
Follow that rule and you'll always use < and <=, never > and >=.
I don't follow that advice...
🧵 (1/3)
What's New in Python 3.15:
csv
* csv.Sniffer.sniff() delimiter detection is now up to 1.6x faster. (Contributed by Maurycy Pawłowski-Wieroński.)
Zero days since #pip added a random new functionality that depends on pip being entirely standalone and breaks when you unbundle the dependencies. And I'm unable to figure out why a bunch of tests are still failing.
EDIT: I'd appreciate some help with that. My WIP is at https://codeberg.org/gentoo/gentoo/pulls/1578.
Finding an item in a sorted list of 10 million things:
✅ Binary search: 23 comparisons
❌ The `in` operator: 2+ million comparisons
Python's bisect module does binary search for you. New article, with recipes for closest-match and range lookups:
JOB : nous recrutons un développeur / une développeuse backend.
Découvrez le poste et les compétences requises, ainsi que les avantages à travailler chez Dalibo : télétravail, coopérative, grille salariale transparente… => https://blog.dalibo.com/2026/07/30/dev_backend.html
#emploi #jerecrute
#développeur #backend
#linux #python #golang #rust
#fullremote
#bienDansMaScop
The Python Software Foundation is hiring a Security Developer to join @miketheman and I on triaging vulnerability reports and mitigating malware published to PyPI.
If you've got experience with Python, security, and collaborating with open source projects then we'd love to hear from you:
https://jobs.pyfound.org/apply/ei03ut60y4/Security-Developer?referrer=20260730140256DSN5BCNCWZA5MXAO
Lots of new stuff in pip 26.2:
🍊 Support for Python 3.15
🍊 Selecting only dependencies
🍊 Experimental: venv based build isolation
🍊 Faster repeated resolves by caching index simple responses
🍊 No more progress bar spam in CI
🍊 Deprecation to remove the legacy dependency resolver (--use-deprecated=legacy-resolver)
See @ichard26's post for more!
https://sichard.ca/blog/2026/07/whats-new-in-pip-26.2/
#Python #pip
For checking whether any items match a more complex condition, we could use the built-in any() or all functions
Read more 👉 https://trey.io/xtql6h
Python Tip #210 (of 365):
Instead of an "if" under an "else", consider using "elif".
You likely know about Python's "elif" statement, but you might occasionally underuse it.
If you find yourself writing an "if" statement just under an "else", ask "should I use an "elif" here instead?"
🧵 (1/3)
Thinking about your first DjangoCon US?
Jake Atwell shares his experience as a first-time attendee, why the community stood out, and why volunteering is a great way to get involved.
🎥 https://www.youtube.com/watch?v=GgTVi0UsvUg
#Django #Python
xy is very fast and customizable charting library for Python https://lobste.rs/s/vnfk4x #python
https://github.com/reflex-dev/xy
New Python Morsels article: Binary search with the bisect module 🔍
You don't need to implement binary search yourself. Python's bisect module already did it for you.
In this article:
🎯 An interactive guessing game that demonstrates binary search
⚡ Why 10 million items take just 23 comparisons
🤔 Why a set or dict can't always replace binary search
🧰 Recipes: closest match, first/last match, all values in a range
What's New in Python 3.15:
contextlib
* Added support for arbitrary descriptors __enter__(), __exit__(), __aenter__(), and __aexit__() in ExitStack and contextlib.AsyncExitStack, for consistency with the `with` and `async with` statements.
* ContextDecorator and AsyncContextDecorator now detect generator functions, coroutine functions, and asynchronous generator functions and keep the context manager open across iteration or await.
26 days until DjangoCon US! 🎉
Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.
I've recently been updating many of my mini #Python helper apps and I made a page for them: https://www.pythonmorsels.com/tools/
Note that the strptime & format tools now link to CLI versions (strptime-cli & fguess) and the pastebin & REPL tool recently got a big rework.
Have thoughts on one of these tools? Or an idea for another one? I'd love to hear either!
Python Tip #209 (of 365):
Remember Python's "inline ifs"
Python doesn't have traditional ternary operators (cond ? one : two) but instead has an inline "if" expression (technically a "conditional expression") for the same purpose.
Instead of:
if amount == 1:
noun = "item"
else:
noun = "items"
We can write
noun = "item" if amount == 1 else "items"
The condition is in the MIDDLE. The first value is the "true" case and the last is the "false" case.
🧵 (1/2)
The conference hotel rate won't last forever!
Book your DjangoCon US hotel before August 3, 2026 to take advantage of the discounted conference rate.
🪟🦾🥈 Windows on Arm (aka aarch64-pc-windows-msvc) has now been promoted to tier 2 of CPython platform support.
Tier 3 has no response SLA to failures. Tier 2 requires breaking changes to be fixed or reverted within 24 hours, and failures block a release.
Tier 3 requires at least one core team member signed up to support the platform. Tier 2 requires at least two, and we have three here.
https://peps.python.org/pep-0011/
#Python #CPython #PEP11 #WindowsOnArm #Windows
🎉 We're excited to announce Sarah Boyce as a keynote speaker!
As a Django Fellow, Sarah helps maintain Django and support its global community. Her keynote will explore code review, feedback, and building stronger open source communities.
Python Tip #208 (of 365):
Break up long boolean expressions
Have a long condition in your "if" statement?
You could:
1. Wrap it in parentheses to break it up over multiple lines
2. Use variables to give names to each sub-expression
3. Use functions to name sub-expressions
🧵 (1/4)
What makes DjangoCon US special?
Yumiko Siewenie shares her first DjangoCon experience, why the community stood out, and how even puzzles became a way to meet new people.
✍️ New post on a Python testing technique: inspecting interleaved calls across multiple mocks with attached mocks.
“Sets are also great when you need fast containment checks.”
Read more 👉 https://pym.dev/practical-uses-of-sets/
Some #programminglanguages remain widely used for decades, while others fulfill an important role during their time before receding.
Our author Andrew Oram explores the stories of C, C++, C#, #Java, #JavaScript, #PHP, #Rust, #Perl, #COBOL, #FORTRAN, #BASIC and others. Dive into it 👇
https://lpi.org/xq3f
#LPI #programming #opensource #linux #unix #softwaredevelopment #coding #developers #sysadmins #python #softwareengineering
Please congratulate our newest PSF Fellow Members for Q2, 2026! Their continued contributions to the Python ecosystem are so very important to our community. #python
https://pyfound.blogspot.com/2026/07/announcing-python-software-foundation.html
https://wsvincent.com/deploying-web-apps-in-2026/ (Deploying Web Apps in 2026: My EuroPython 2026 Conference Talk by Will Vincent )
--<--
This is the text version of my EuroPython talk, Deploying Python Web Apps in 2026, which I recently presented in Krakow, Poland.
I will add the video version when it it is ready in a few weeks. The EuroPython team traditionally does an amazing job making the talks available shortly after the conference.
-->--
27 days until DjangoCon US! 🎉
Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.
The PSF is hiring a Security Developer! Help triage vulnerabilities in CPython, fight malware/supply-chain attacks on PyPI, and build tools to keep the #Python ecosystem safe for millions of users 🐍🔒 This is a global, remote, 1 year term role, with the possibility of renewal. #Security
Apply today:
https://pythonsoftwarefoundation.applytojob.com/apply/ei03ut60y4/Security-Developer
«Modern email can be built from borrowed parts»
What if we designed the successor to email on top of HTTP, fixing 40 years of SMTP design flaws using only technologies that already exist?
https://en.andros.dev/blog/d7ed8b07/modern-email-can-be-built-from-borrowed-parts/
I did not realise I had strong feelings on docstrings. I use them sparingly, and while they are a hack, at least they serve a good purpose.
I know people have opinions on the placement of line breaks and quotes, but I thought I was above these things. That this was Python programmers yearning for curly-brace level style wars.
I was mistaken.
I just encountered docstrings written in regular quotes rather than triple quotes and, no, apparently I DO have strong feelings on docstrings.
Python Tip #207 (of 365):
Get fancy with your subprocess.run calls.
When launching a subprocess, consider passing the keyword arguments capture_output, text, and check to subprocess.run.
Passing capture_output=True will capture both stdout & stderr from the subprocess.
Passing text=True will decode the captured output into strings (instead of providing raw bytes).
Passing check=True will raise an exception if the subprocess exited with an error code.
🧵 (1/2)
The new django-bolt==0.10.0a1 is the fastest python framework. I can confidently say it now because before it was near litestar level. 6x performance of FastAPI.
/db clearly wins. Pagination wins after `sync_to_thread`. So only db is close. Frameowrk level overhead bolt is way ahead.
#python #django #opensource
Code used https://github.com/huynguyengl99/python-api-frameworks-benchmark
On repo they still use 0.4.7 version.
28 days until DjangoCon US! 🎉
Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.
Now we have pymanager for Windows, Python 3.16 drops the old MSI-based installer.
Here's Steve Dower's +389 -17,781 PR! 🧹
https://github.com/python/cpython/pull/153512
https://peps.python.org/pep-0773/
#Python #Python316 #pymanager #PEP773
Because someone in the #Python Discord was asking about structuring tests alongside their project code, I added a bit of test structure to my pkgsample explainer: https://github.com/nedbat/pkgsample
The next PyPy will be 8.0.0 and should add support for Python 3.12 and be the last to support 3.11, and require glibc 2.28 (AlmaLinux8, Amazon Linux 2023, Debian 10, Ubuntu 20.04).
https://pypy.org/posts/2026/07/moving-linux-builds-to-glibc228.html
Python Tip #206 (of 365):
Know your combination and permutation tools in Python.
Python ships with tools for combinations, permutations, and random selections.
The itertools module includes various combinatorics-oriented utilities:
from itertools import combinations, combinations_with_replacement, permutations, product
This joins tuples of characters into a comma-separated string:
def join(groups):
return ", ".join("".join(g) for g in groups)
🧵 (1/5)
✍️ New post on using unittest.mock to spy on function calls. 🕵️♂️
I recently learned how to use the wraps argument to track all calls to a target function for later assertions. Very useful for testing things like “is caching working?” without having to mock the function completely.
https://adamj.eu/tech/2026/07/25/python-spy-unittest-mock-wraps/
“So if you find this feature jarring enough that you'd like to never use it in your code, you can probably configure your linter to disallow it entirely.”
Read more 👉 https://pym.dev/implicit-string-concatenation/
✍️ Django’s release code words, up to the pending Django 6.1 “mélange”.
https://adamj.eu/tech/2026/07/24/django-release-code-words-6.1/
📰 Issue 347: Django 6.1 release candidate 1 released
https://django-news.com/archive/issue-347-django-61-release-candidate-1-released/
🎤 Speaker Spotlight
Want to make your first open source contribution?
At DjangoCon US 2026, Andrew Selzer presents “Enter the Ecosystem: Contributing to Django Open Source Projects.”
Learn how to find projects, choose your first issue, and start contributing with confidence.
“Python's print function is usually one of the first built-in functions that new Pythonistas learn about, but many Python programmers don't realize how versatile the print function is.”
Read more 👉 https://pym.dev/print-features/
Python Tip #205 (of 365):
Use statistics.multimode to get the most common items.
To get the most common items in an iterable, you might be tempted to use collections.Counter. Consider using statistics.multimode instead.
Compare this:
counts = collections.Counter(items)
[(_, top_count)] = counts.most_common(1)
commonest = [
item
for item, count in counts.items()
if count == top_count
]
To this:
commonest = statistics.multimode(items)
Simpler, right?
🐍🚀 Out now: em-keyboard 5.4.0
An emoji search CLI.
Adds support for Python 3.15 and Unicode 17.0:
❯ em "distorted face" "fight cloud" "hairy creature" "ballet dancer" "orca" "landslide" "trombone" "treasure chest"
Copied! 🧑🩰
Your device might not support them yet 🫠
https://blog.emojipedia.org/whats-new-in-unicode-17-0/
#Python #release #em #emoji
🐍🚀 Out now: flake8-implicit-str-concat 0.7.0
A Flake8 plugin to encourage string literal concatenation. It can help tidy up after Black/Ruff.
This release adds a new ISC004 rule: "unparenthesized implicit string concatenation in collection". See examples in the README.
Also support Python 3.15 and use PEP 639 licence expression and remove deprecated Trove classifier.
https://github.com/flake8-implicit-str-concat/flake8-implicit-str-concat/releases
#Python #release
The Python Morsels pastebin & REPL pages recently got some BIG updates.
pastebin: https://pym.dev/paste
REPL: https://pym.dev/repl
Some of the many new things you can do with the pastebin and REPL that you couldn't before:
• Run a paste before even saving it
• Add additional files to a paste
• Pass command-line arguments
• Run pastes in interactive mode
• Edit a paste after you've created it
• Drop into PDB to debug tracebacks
• Open a paste within the Python REPL
“How can you check which operating system your Python code is running on?”
Read more 👉 https://pym.dev/operating-system-checks/
Python Tip #204 (of 365):
Generate unique identifiers with the uuid module
>>> import uuid
>>> uid = uuid.uuid4()
>>> uid
UUID('922a6cea-c3e9-473d-bf88-efb10793c931')
>>> str(uid)
'922a6cea-c3e9-473d-bf88-efb10793c931'
UUID stands for universally unique identifiers.
The uuid module has functions for UUID version 1, 3, 4, 5, 6, 7, and 8 from RFC 4122/9562.
Versions 7 and 8 were added in Python 3.14.
🧵 (1/2)
You can be a part of kickstarting the brand new Python Packaging Council ✨🐍📦 Nominate yourself or someone else for the council for the inaugural election! Nominations open Tuesday, July 28th, 2:00 pm UTC and close Tuesday, August 11th, 2:00 pm UTC. #python
https://pyfound.blogspot.com/2026/07/get-ready-python-packaging-council.html
Hmm, I got a question on #Python, specifically #mypy.
I just coded a very short module with dynamically generated functions that I export, and mypy complains when I use these functions, because they're not in the module?! What am I doing wrong?
code:
import sys
from functools import partial
__cur_mod = sys.modules[__name__]
_COLORS: dict[str, str] = {
"grey":'\x1b[38;21m',
[...]
}
for color in _COLORS:
setattr(__cur_mod, color, partial(color_generic, color))
__all__ = list(_COLORS)
You can be a part of guiding the future direction of the PSF 🩵🐍💛 Nominate yourself or someone else for the PSF Board for the 2026 election! Nominations open Tuesday, July 28th, 2:00 pm UTC and close Tuesday, August 11th, 2:00 pm UTC. #python
https://pyfound.blogspot.com/2026/07/get-ready-psf-board-nominations-opening.html
Visiting the U.S. for your first DjangoCon US?
Our new guide covers visas, payments, tipping, transportation from O'Hare, mobile data, and more to help you prepare for your trip.
📖 Read more: https://2026.djangocon.us/news/guide-to-america/
✍️ Introducing django-crawl, a tool for crawling your local Django site, useful for quickly finding what’s broken or performing site-wide checks.
Lyon: C’est l’été !, Le jeudi 30 juillet 2026 de 18h00 à 21h00. https://www.agendadulibre.org/events/35507 #lyon #python #rencontre #discussion
Bonjour,
Comment me présenter rapidement ?
un côté #geek : #logicielslibres #wikipedia #wikidata #python
j'ai exercé longtemps dans la #MédiationScientifique : #pédagogie #sciences
je suis en #IledeFrance, en #transportencommun
Politiquement à #Gauche, dans le milieu de défense des droits #LGBTQIA+, #ecolo
loisirs : #bd #MusiqueFrançaise
“Some blank lines improve readability, but not all blank lines do.”
Read more 👉 https://pym.dev/embrace-whitespace/
Python Tip #203 (of 365):
When you need precise decimal numbers, use decimal.Decimal
Floating point numbers have precision gotchas.
For example, 0.1 + 0.02 isn't 0.12:
>>> one_two = 0.1 + 0.02
>>> one_two == 0.12
False
>>> one_two
0.12000000000000001
Using Decimal fixes this:
>>> from decimal import Decimal
>>> one_two = Decimal("0.1") + Decimal("0.02")
>>> one_two == Decimal("0.12")
True
>>> one_two
Decimal('0.12')
Note that we pass strings to Decimal.
🧵 (1/4)
Welcome @kushal back to the Python Security Response Team!
https://devguide.python.org/security/psrt/
Following PEP 811, we have a much clearer process for PSRT membership.
https://peps.python.org/pep-0811/
Thanks to Kushal and the rest of the team for helping keep Python secure.
https://hugovk.dev/blog/2026/security-line-goes-up/
#Python #security #PSRT
Bonjour à toutes et tous,
La Scop Le Filament cherche une développeuse ou un développeur Open Source, principalement pour du Python sur des modules Odoo.
L'offre d'emploi est ici : https://le-filament.com/offres-emploi/2026-07_developpeuse-odoo/
CDI forfait 200 jours, basé à Toulouse (télétravail ponctuel possible).
boosted#offpunk 3.2 has been released.
The biggest news is that the network part is now handled by #curl (except for #geminiprotocol ). HTML tables are also supported !
My blog has no comment form. Any reader can comment, reply and get notified; the trick is using email as the user interface.
https://en.andros.dev/blog/ad250446/my-comment-box-is-your-email-client/
“So because we're using __slots__, we can't expand the number of attributes that are on each instance of this class.”
Read more 👉 https://pym.dev/__slots__/
🚨 The Django Con US 2026 schedule is now live!
Start planning your week in Chicago and explore everything we have in store—from talks and tutorials to keynotes and community events.
@gemlog @bstuf @northernlights @claudiom @darkstar @stug @jirka @RJF @pizzapal @pizza_pal @stebby @normandc @kelbot Last but not least, I wanted to share my revamped version of an existing #Python #script for syncing #XOSS #bike #GPS #computers with PCs over #Bluetooth #BLE. My version also offers the option to delete fit files from the device and timestamps for benchmarking, amongst other features. What a great learning experience! #biking #cycling #biketooter https://github.com/molleraj/enhanced_xoss_sync
Python Tip #202 (of 365):
When prompting the user to enter a password, use getpass
The getpass.getpass function prompts the user to enter a password and what the user types is completely hidden:
>>> from getpass import getpass
>>> password = getpass()
Password:
🧵 (1/2)
Want to support the PSF and stock up on #Python books at the same time? The 'Ultimate Python Development' Humble Bundle is available now 🐍 📚 You can customize your donation split: click "Adjust Donation" → "Custom Amount" to boost the % going to the PSF!
https://www.humblebundle.com/books/ultimate-python-development-bundle-packt-books
Candidature rejetée, après deux entretiens, parce que l'entreprise «s'oriente vers une adoption forte de l'IA dans ses pratiques de développement, une direction qui ne semble pas alignée avec vos attentes à ce stade».
Est-ce qu'il y a encore des éditeurs de logiciels en France qui sont prêts à embaucher un développeur qui préfère écrire lui-même son code ?
You probably won't use t-strings and Template objects in your own code, but you might pass them to code written by others.
Read more 👉 https://trey.io/n4mlgb
What does a Django Fellow do?
Natalia Bidart shares how Django Fellows help maintain the framework, support contributors, and keep the project moving forward.
RE: https://mastodon.social/@farhanaliraza/116943042263956483
If you missed it over the weekend, @farhanaliraza released Taipan, which bundles a Python app (file, project, files, etc) into a one-file binary that just works.
I bundled up a few PyGame projects to try it out, and to my amazement, it just worked!
Python Tip #201 (of 365):
Suggest typo fixes with difflib.get_close_matches
>>> import difflib
>>> options = ['quack', 'swim', 'walk']
>>> difflib.get_close_matches('swam', options)
['swim']
If you want to control how close the match must be to be suggested, you can change the cutoff argument from its default (0.6):
>>> difflib.get_close_matches('swam', options, cutoff=0.5)
['swim', 'walk']
argparse's new suggest_on_error relies on this: https://docs.python.org/3/library/argparse.html#suggest-on-error
💻 Akretion : Scop spécialisée dans l’intégration et le développement autour d’#Odoo, l’#ERP #opensource.
Créée en 2008, l'équipe de développeur·euses et consultant·es spécialisé·es accompagne les entreprises dans leurs projets de gestion : analyse des besoins, intégration, développement sur mesure, migration, hébergement, e-commerce, comptabilité, formation…
En tant que coopérative, le partage des connaissances et la gestion horizontale sont mots d'ordres.
I’ve published my @europython 2026 recap blog post 🇪🇺
It brings together the Mastodon posts and photos I shared live during the conference, creating a timeline of talks, community moments, people, ...👇
https://www.paulox.net/2026/07/20/my-europython-2026/
Credits 👥
@BajoranEngineer @Marlene @Yhg1s @ambv @anorthall @antocuni @baconandcoconut @bmispelon @dongheena @ester @gi0baro @hjwp @hugovk @hynek @kirschner @marco @miketheman @pauleveritt @sabderemane @saptaks @savannah @sethmlarson @vlad @wsvincent
“Any object that supports concatenation probably also supports self-concatenation.”
Read more 👉 https://pym.dev/self-concatenation/
Claude Opus 4.5 introduced me to `uvloop` few months ago faster sibling of default event loop of python. But Fable has introduced me to custom implmentation of eventloop myself ontop of tokio rust.
And performance gain is real. Next version of django bolt is FAST.
#opensource #python #django
Python Tip #200 (of 365):
Beta-test the latest Python version with uv
You can use uv to try out alpha, beta, and rc (release candidate) Python versions.
🧵 (1/4)
Python Tip #199 (of 365):
Use uvx to try out tools without installing them 🧵
For example, "uvx fguess" installs & runs my fguess package in an isolated temporary environment.
This also doesn't JUST work with scripts. You can use uvx to try out Python packages in a REPL!
You can also use "uvx --with better-dedent python" to launch a REPL with my "better-dedent" package installed.
It'll even install Python 3.14 if needed since "better-dedent" requires it!
🧵 (1/2)
“Standard error is often used for printing messages related to errors, but it's also used for diagnostic output or for pretty much any output that shouldn't be mixed together with the main program output.”
Read more 👉 https://pym.dev/standard-error/
How do new Django contributors get started?
Lilian Tran shares her journey through Djangonaut Space and explains how mentorship, code reviews, and community help new contributors build confidence in open source.
🐍🚀 Out now: the final 3.15 beta, live from the #EuroPython sprints!
All the same goodies as beta 3, plus the official macOS installer now also installs the free-threaded `python3.15t` binary.
And thanks to 3.16 RM @savannah for helping out!
https://discuss.python.org/t/python-3-15-0-beta-4-is-here/108208
Just released! 🚀
🪑 PrettyTable 3.17.0
https://github.com/prettytable/prettytable/releases/tag/3.17.0
Add support for Python 3.15, drop 3.9, test 3.13t-3.15t
Set dicts with column-specific config for all column-specific attrs
Update type hints
Replace pre-commit with prek
& more!
🐍🚀 Out now: Python 3.15 alpha 7!
This is the first one with lazy imports (PEP 810) and frozendict (PEP 814)! Try it out and give us feedback.
https://discuss.python.org/t/python-3-15-0-alpha-7/106475
☃️ Just one alpha left until the feature freeze! Core team: get your PEPs in!
#Python #Python315 #release PEP810 #LazyImports #PEP814 #frozendict
It's been a fun and packed #EuroPython week, but it's not over. My main task for today's sprint is to release the final 3.15 beta with @savannah!🚀
#Python #python315
Python Tip #198 (of 365):
Lock the dependencies for your Python scripts
After you start using inline script metadata to have uv automatically manage your script's dependencies (tip 197), how can you ensure the dependencies of your dependencies don't break your code?
You could pin your dependencies... but you'd also want to pin the dependencies of your dependencies and such.
🧵 (1/3)
“The fromkeys method doesn't attempt to copy the object you give it.”
Read more 👉 https://pym.dev/default-dictionary-values/
Big thank you to all the many people who were involved in organising #europython ! Amazing how many people volunteered to make this event happen and enable the sharing of knowledge around #python ❤️
Oh wow, that's a pretty bad #Python regression: https://bugs.debian.org/1141977
Fixed packages should end up in trixie-proposed-updates (for inclusion in the next point release) but should also be published via trixie-updates much earlier: https://bugs.debian.org/1142261
boostedPallets now documents our LLM and AI tool use policy, explaining why we value human contributions rather than trying to instruct the tools. I don't think this will make a difference to the amount of generated junk we get, but I hope people who care find value in it. https://palletsprojects.com/contributing/llm-ai #Python #Flask #OpenSource
Python Tip #197 (of 365):
Use uv for one-off Python scripts
Have a Python script that requires dependencies?
Use inline script metadata, change your file mode to executable, and put this shebang line at the top of the file:
#!/usr/bin/env -S uv run --script
To add a dependency to your script, you can either manually edit the "# /// script" block by hand or use "uv add":
$ uv add --script my_script.py requests
🧵 (1/3)
It's 2026 and
#Python's standard library *still* does not have a flatten function? 🤨
(Yes, more-itertools, that's not the point)
New blogpost!
https://xaselgio.net/posts/029.shazam_export/
I have used Shazam, the song identification app, for several years.
While it still serves its purpose marvelously, I do not feel okay with the idea of keeping the history of songs I found this way on this service, with no way to export it.
In this blogpost, I dig into how to export your Shazam library as a readable CSV.
I also describe my little scripting adventure to make a Python script which would use that CSV to download music from Youtube (using yt-dlp) and then make sure that it is the right song, matching what was inside the CSV export.
Sources are available on our Git forge as well.~
Hope you'll enjoy the read!~
“Once the condition becomes False (or a falsey value) the loop stops.”
Read more 👉 https://pym.dev/while-loops/
Python Tip #196 (of 365):
Manage your virtual environments with uv
You can get the speed of uv while still using venvs and pip the way you always have.
Instead of "python3.14 -m venv .venv", use "uv venv -p 3.14"
Instead of "pip install" use "uv pip install"
But... why?
Speed!
Using "uv pip install" is often MUCH faster than using "pip install".
🧵 (1/2)
I wrote this function to do some math, and I got it working, tested it, but now I have to explain it to someone and...
Well, that's the difficult part!
I knew the input and desired output and built up how to get what I needed but making it explainable is a bit of a challenge...
Which is good though, as it's forcing me to double-check my work.
(And I am *not* good at math!)
The state of #Python ecosystem right now: almost everything is slop. Some projects are complete vibe-coded slop (autobahn, chardet, cryptography). Some projects are disguised slop ("Coding agents shouldn't co-author themselves.")
There is only a handful of human projects left (Flask being one bright example). And they're being killed. They're being killed by the neverending slew of slop pull requests. They're being killed by all their dependencies becoming slop. They're being killed because this whole ecosystem has became such a complete cesspit that you have zero motivation to do anything.
EDIT: and honestly, this is only going to get worse. When you kill the incentive to work on projects, you only get more slop. Maintainers give in, and more projects become slop. Or they give up, and projects get forked unto slop.
We want your vote! Voting eligible PSF Members (Supporting, Contributing, and Fellow) need to affirm their membership to vote in this year’s PSF Board and/or Python Packaging Council elections to ensure that each election reaches quorum 🗳️ #python
https://pyfound.blogspot.com/2026/07/affirm-PSF-voting-status-2026.html
The state of #Python ecosystem right now: almost everything is slop. Some projects are complete vibe-coded slop (autobahn, chardet, cryptography). Some projects are disguised slop ("Coding agents shouldn't co-author themselves.")
There is only a handful of human projects left (Flask being one bright example). And they're being killed. They're being killed by the neverending slew of slop pull requests. They're being killed by all their dependencies becoming slop. They're being killed because this whole ecosystem has became such a complete cesspit that you have zero motivation to do anything.
EDIT: and honestly, this is only going to get worse. When you kill the incentive to work on projects, you only get more slop. Maintainers give in, and more projects become slop. Or they give up, and projects get forked unto slop.
Python sees a line feed (\n) as the canonical way to represent a newline.
Read more 👉 https://trey.io/ca0qyn
We're #hiring at PowerDash! I know there are a lot of people in my network with the perfect mix of skills for this role — full stack with a strong #Python / #Django bent. Throw your hat in, or pass the word. It's a great little company in an important space.
Office is in Cambridge (Harvard Square). Role is on-site or hybrid.
Senior Full Stack Software Engineer: https://apply.workable.com/powerdash/j/7BE934710D/
How is AI changing the way developers learn Django?
William Vincent shares his thoughts on AI, technical education, and making Django more accessible in this DjangoCon US Insights & Perspectives interview.
Watch now: https://youtu.be/zOsM49ojzdg
#Django #Python
✍️ New post covering a debugging hack using gc.get_objects() to find all instances of a class in Python.
https://adamj.eu/tech/2026/07/14/python-all-instances-class/
Python Tip #195 (of 365):
Globally install Python-powered command-line tools with "uv tool install"
To install my Python-powered countdown-cli globally, I can do this:
$ uv tool install countdown-cli
Resolved 2 packages in 169ms
Installed 2 packages in 5ms
+ click==8.3.2
+ countdown-cli==2.2.1
Installed 1 executable: countdown
Then I can run "countdown" ANYWHERE on my machine to start a countdown timer.
🧵 (1/3)
Finally!
⚡ Lightning talks! ⚡
Mark Shannon - One-time ABI breakage
Daniele Parmeggiani – Safer and Generic Interruptions
@kushal - EktuPy, Python for Scratch generation
@gpshead & @ambv - agents.md and skills for CPython repo
Ken Jin - pls read PEP 836
And we're done! That was fun! The next Language Summit will be at @pycon US next year at Long Beach, then back at @europython for 2028!
Last regular talk/discussion before lightning talks!
PEP 827 - Type manipulation and annotationlib — Michael J. Sullivan
I wrote about how, like many other open-source projects, CPython is experiencing a huge increase in security reports. Charts inside!
https://hugovk.dev/blog/2026/security-line-goes-up/
#Python #security #OpenSource
And now:
Thinking about the post era of free-threading Python — @dongheena, Tobias Wrigstad, Fridtjof
The July edition of the PSF Board Office Hour is about to begin 🐍 🗒️ 1 PM UTC. We welcome you to join us to share how we can help your community, express your perspectives, and we'd love to answer your questions about the upcoming PSF Board Election! #python
https://pyfound.blogspot.com/2025/10/a-new-psf-board-another-year-of-psf.html
Next up!
Developer in Residence update & future — @encukou
https://ep2026.europython.eu/language-summit/#developer-in-residence-update--future--petr-viktorin
Then:
Spicycrab, the Rust transpiler — @kushal
https://ep2026.europython.eu/language-summit/#spicycrab-the-rust-transpiler--kushal-das
Back from lunch!
A Roadmap for Rust for CPython — @davidhewitt
https://ep2026.europython.eu/language-summit/#a-roadmap-for-rust-for-cpython--david-hewitt
A packed morning concludes with:
Memory snapshots and the CPython runtime — Hood Chatham
https://ep2026.europython.eu/language-summit/#memory-snapshots-and-the-cpython-runtime--hood-chatham
And then:
Improving the Python buffer protocol — Nathan Goldbaum
https://ep2026.europython.eu/language-summit/#improving-the-python-buffer-protocol--nathan-goldbaum
And now:
GC: Generational? Incremental? Both. — Mark Shannon
https://ep2026.europython.eu/language-summit/#gc-generational-incremental-both--mark-shannon
Next up:
Python releases for macOS — Ned Deily
https://ep2026.europython.eu/language-summit/#python-releases-for-macos--ned-deily
#Python #LanguageSummit #EuroPython
Staying at the conference hotel?
Reserve your room by August 3 to secure the DjangoCon US conference rate.
Book now: https://2026.djangocon.us
Python Tip #194 (of 365):
Install Python with uv
I recommend using:
$ uv python install --default 3.14
Specifying "--default" will install symbolic links for python, python3, and python3.N (where N is the minor version number).
Using uv to install Python makes it easy to upgrade subminor versions.
Just run:
$ uv python upgrade
If you have Python 3.14.4 installed after 3.14.5 is out, that "python upgrade" command will install it.
🧵 (1/3)
Python Tip #193 (of 365):
To compare iterables while ignoring order and duplication, use a set equality check.
Like this:
>>> set(iterable1) == set(iterable2)
True
Like all things set-related, this requires hashable items.
🧵 (1/2)
“Unless you really need an index for your substring match, a containment check will do just fine.”
Read more 👉 https://pym.dev/avoid-indexes-in-python/
“Sorted will call that key function on each item in the given iterable, and it'll sort the items by the result of whatever that key function returns for each item.”
Read more 👉 https://pym.dev/sorting-in-python/
Python Tip #192 (of 365):
To compare iterables while counting duplicates but ignoring order, use Counter.
A Counter tallies how many times each item appears. Counters are equal when every item appears the same number of times, regardless of order:
>>> from collections import Counter
>>> Counter([1, 2, 2, 3]) == Counter([3, 2, 1, 2])
True
>>> Counter([1, 2, 3]) == Counter([1, 2, 2, 3])
False
The second check is False because one iterable has an extra 2.
🧵 (1/2)
Python Tip #191 (of 365):
Compare iterables item-by-item with all() & zip().
The == operator won't compare a list and a tuple by their contents:
>>> a = [1, 2, 3]
>>> b = (1, 2, 3)
>>> a == b
False
And two generators can't be compared by their contents at all.
You can compare any iterables item-by-item, regardless of their type like this:
>>> all(x == y for x, y in zip(a, b, strict=True))
True
🧵 (1/2)
📰 Issue 345: Django security releases issued: 6.0.7 and 5.2.16
https://django-news.com/archive/issue-345-django-security-releases-issued-607-and/
First time attending DjangoCon US?
We've put together a packing guide with everything you should bring from laptops and water bottles to comfortable clothes and a few Chicago-specific tips.
📖 Read more: https://2026.djangocon.us/news/first-time-things-to-bring/
“The simplest use of a set is probably also its most common use: checking for duplicates.”
Read more 👉 https://pym.dev/practical-uses-of-sets/
New update for my #python #multipart #parser #benchmark:
https://defnull.de/2026/python-multipart-benchmark/
The benchmark tests and compares the most commonly used Python parsers for multipart/form-data (HTML5 forms) in different scenarios, including a #rust parser and a #cython parser. The results may surprise you
Disclaimer: I'm the author of the 'multipart' library.
Runloom – Go-style coroutines for Python free-threaded
https://github.com/robertsdotpm/runloom
Comments: https://news.ycombinator.com/item?id=48859387
#HackerNews #Runloom #Go-style #coroutines #Python #free-threaded #GitHub #PythonProgramming #AsyncPython #Concurrency
Python Tip #190 (of 365):
To remove duplicates while maintaining the original iterable order, use dict.fromkeys.
Converting to a set removes duplicates, but it loses the original order:
>>> colors = ["red", "green", "blue", "green", "red"]
>>> set(colors)
{'blue', 'green', 'red'}
🧵 (1/2)
DjangoCon US Insights & Perspectives
In this episode, Kenya Phelps reflects on her journey into software development, the importance of mentorship, and how building an inclusive community strengthens the Django ecosystem.
Watch the conversation and hear her perspective on creating welcoming spaces in open source.
https://www.youtube.com/watch?v=Z-_8m7rt6Yk&list=PLGB4RJJ-OM1Q
#Django #Python
Dear #lazyweb,
I am looking for a way to generate a simple #parser in #Python without extra run-time dependencies.
I am happy to use whatever tooling is needed to generate the parser, but the generated Python code must be standalone (just like lex/yacc generate standalone C code).
I found a lot of parser generators for Python but they all introduce run-time dependencies that I would really like to avoid.
Do you know a tool that fits this use-case?
Retoots appreciated!
“It's easy to overdo it when defaulting dictionary values.”
Read more 👉 https://pym.dev/default-dictionary-values/
Happy to announce the release of slixmpp, the python XMPP library in its 1.17.0 version.
It has a few improvements alongside an important bugfix for components, as well as many other changes.
Read the full changelog at https://blog.mathieui.net/slixmpp-1-17.html
#python #xmpp
“But what if you need to perform an operation repeatedly and you don't have an iterable to loop over?”
Read more 👉 https://pym.dev/while-loops/
Python Tip #189 (of 365):
Check for duplicates by converting to a set.
To check whether your collection contains duplicate items, make a set out of it and compare the original length to the set length:
>>> len(set(colors)) == len(colors)
False
Sets can't hold duplicates, so if a set conversion shrinks the length, there were duplicates.
A caveat: this assumes all item are hashable (like strings, numbers, & tuples of hashable items).
What's New in Python 3.15:
Upgraded JIT compiler
Results from pyperformance suite: 8-9% geometric mean performance improvement over the standard CPython interpreter built with all optimisations enabled on x86-64 Linux.
On AArch64 macOS, 12-13% speedup over the tail calling interpreter with all optimisations enabled.
The speedups versus no JIT builds range from roughly 15% slowdown to over 100% speedup on x86-64 Linux and AArch64 macOS.
https://docs.python.org/3.15/whatsnew/3.15.html#upgraded-jit-compiler
RE: https://fosstodon.org/@pillow/116844696941687840
New @pillow release!
🛞 Wheels for Python 3.15 beta
🧾 An SBOM in all the wheels
🚅 Performance improvements thanks to @akx
🔒 Security fixes
❌ No longer a wheel for free-threaded Python 3.13, it was experimental and 3.14+ has official support with better performance
#Python #Pillow #PythonPillow #release #security #Python315 #SBOM
🎤 Speaker Spotlight
Elizabeth Christensen joins DjangoCon US 2026 with:
"What's New in Postgres 18 & 19"
Learn which new PostgreSQL features are ready for your Django apps and which ones can wait.
To remember that you need strptime for parsing instead of strftime, remember that it's "string parse time" and "string format time".
Read more 👉 https://trey.io/l4b84k
Hi All, I am looking for full time, mid-senior level UK #Python job roles. I am based in the UK and I've got 9 years experience working with it primarily in scientific disciplines (Earth Observation #EO #RemoteSensing) and a small amount in doing backend work. I've designed a wide variety of scientific Python scripts and programs and I've had the privellige of working with #ESA on several projects including presenting my work internationally and having my investigations published on their websites.
I'm looking for more coding work in scientific disciplines or more #Humanitarian work if possible. I am also skilled in QA like work, deep analysis, Git and self hosting.
I'm primarily open to remote work within the UK and remote European work dependent on what is available. I am open to hybrid work based in Buckinghamshire but it would preferably have to be 1 day a week in an office, potentially 2. Reply or DM me for more details. Boosts appreciated!
Python Tip #188 (of 365):
To find the first item that matches a condition, combine next with a generator expression.
Like this:
>>> numbers = [4, -1, 8, -3, 0, 6]
>>> next(n for n in numbers if n < 0)
-1
The generator expression finds matching items lazily and next stops as soon as a match is found.
🧵 (1/2)
Python Tip #187 (of 365):
Need to count how many items match a condition? Sum up booleans. 🧵
Booleans are integers in Python:
>>> issubclass(bool, int)
True
True acts just like 1 and False acts just like 0.
I wouldn't rely on that fact often... BUT there's one specific place where this fact is very handy...
🧵 (1/3)
https://pyuppsala.readthedocs.io/en/latest/ I released 0.9.0 of my #rust based #python #XML library. A lot of #security hardening and very good #performance improvement.
What's New in Python 3.15:
warnings
* Improve filtering by module in warnings.warn_explicit() if no module argument is passed. It now tests the module regular expression in the warnings filter not only against the filename with .py stripped, but also against module names constructed starting from different parent directories of the filename (with /__init__.py, .py and, on Windows, .pyw stripped). (Contributed by Serhiy Storchaka.)
Workshop sponsorships are now open for DjangoCon US 2026!
Have a hands-on tutorial, onboarding workshop, or technical training session your team already uses? Bring it to DjangoCon US and teach an audience that's ready to dive deep.
🗓️ Applications close July 28
https://2026.djangocon.us/sponsors/information/
#Django #Python #OpenSource
Appel à bonnes âmes 😁
Mon compagnon, cet homme incroyable, m'a fait un script python pour me permettre de tamponner des pièces de procédure en 3 secondes.
En ayant parlé à d'autres, il s'avère qu'iels seraient intéressé.e.s mais ne sont pas sous linux (cheh)
J'ai deux questions :
- où mettre son dépôt git pour pouvoir le partager
- est-ce qu'il y a des trucs pour pouvoir faire fonctionner facilement ce truc sans passer par un terminal => le rendre humain compatible 😁 et éventuellement mac et windows accessible
Tout en réalisant le traitement sur le PC et non en ligne (secret pro 4ever)
Merci d'avance pour votre aide
Python's error messages have improved a lot in the past few versions, and this is exactly the kind of change that makes Python even more beginner-friendly.
Read more 👉 https://trey.io/flfwr9
Fiston est méga motivé pour, à la rentrée, remplir un site web avec
- photo d'aménagement piéton/vélo ridicule
- localisation dans l'agglo
- textes
Si possible avec des mômes de son âge, qui feront le design.
Je vais bien sûr mettre ce site web en place.
Idéalement, j'aimerais que ça soit le moins de maintenance possible hors mises à jour de contenu.
En gros, une galerie de photos géolocalisées et un blog. Je parle pas trop mal le #Python et je tiens pas à tout réinventer.
Django bolt 0.9.0 Update
- Welcome an new HTTP method `Query`, now your get requests can carry a body.
- Workers now can now respawn according to memory usage limit or time limit.
- Other bug fixes (Open API, Serializer computed field, django admin)
Thanks to all contributors of this release.
Python Tip #186 (of 365):
Use the errors argument when reading files with encoding issues.
When reading a file, invalid bytes in the chosen encoding will raise an exception:
>>> p = pathlib.Path("p")
>>> p.write_text("café", encoding="cp1252")
>>> p.read_text(encoding="utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 3: unexpected end of data
With the "errors" argument, we can suppress this exception.
🧵 (1/3)
“Python's while loops are for looping based on a condition.”
Read more 👉 https://pym.dev/while-loops/
Sans doute la façon la plus simple de télécharger un album, un artiste depuis Spotify. L'astuce, c'est bien sûr qu'il ne télécharge pas les chansons depuis Spotify. Le seul truc à personnaliser, c'est le format des fichiers (j'utilise ce formatage "output": "{artist}/({year}) - {album}/{track-number} - {title}.{output-ext}") https://spotdl.github.io/spotify-downloader/ #spotify #download #script #python #automatisation
“What if you want every key lookup you ever perform on your dictionary to have a default value?”
Read more 👉 https://pym.dev/default-dictionary-values/
Python Tip #185 (of 365):
Normalize Unicode strings before comparing them.
Some Unicode characters can be written in more than one way.
Python's == won't consider them equal even if they look identical.
Use unicodedata.normalize() to fix this.
The letter "é" can be stored two ways:
• 1 precomposed character
• "e" plus a combining accent
Both look the same, but they're not:
>>> x, y = "café", "café"
>>> x == y
False
>>> len(x), len(y)
(4, 5)
🧵 (1/2)
@hugovk #python #programming I think this is a wrong solution, in the sense that this is a built in conceptual downside of a central repository.
If things like that are done, we have long left the space of simple packages, simple installs and simple quick and dirty scripts.
To me, it would make way more sense to leverage urls, redirects and long, explicit names. The projects have their own domains anyway.
e.g. https packages.google.com/cloud/w/e
1/2
The reversed() function works on all sequences, but it also works on some other iterables, like dictionaries
Read more 👉 https://trey.io/ur7l4g
step 1: do an experimental JIT
step 2: do a website called https://www.doesjitgobrrr.com to track performance
step 3: write a PEP called "JIT Go Brrr"
step 4: non-experimental JIT gone brrr?
step 5: CPython gone brr?
step 6: brrr?
https://peps.python.org/pep-0836/
#Python #CPython #JIT #PEP #PEP836 #JIT #GoBrrr
🎤 Speaker Spotlight
Abigail Afi Gbadago will be speaking at DjangoCon US 2026!
"Polyglot Persistence with Django: When One Database Isn't Enough"
Learn how Django apps can combine PostgreSQL and MongoDB, and explore the integration patterns and real-world tradeoffs involved.
Python Tip #184 (of 365):
Always specify the encoding when opening text files.
With no encoding specified, Python will pick a platform-dependent default encoding.
A wrong encoding may raise an exception or may result in "mojibake" (garbled nonsense).
Opening a UTF-8 file as CP-1252 turns "✨" into "✨":
>>> path = pathlib.Path("sparkles.txt")
>>> path.write_text("✨", encoding="utf-8")
>>> https://path.read_text(encoding="cp1252")
'✨'
🧵 (1/2)
🗓️ The Language Summit schedule is now up!
https://ep2026.europython.eu/language-summit/#schedule
⚡ Lightning talks can be submitted on site on the day.
Have you written a new PEP and are ready for a PEP number? (Either you're a Python core team member or found one to sponsor your PEP.)
Old way: scour through https://peps.python.org/ and https://github.com/python/peps/pulls to find which is next
Better way:
❯ uvx pepotron next
Next available PEP: 837
🆕 New: visit https://hugovk.dev/next-pep-number/
EuroPython's sponsors have open opportunities... in #Python, of course:
https://blog.europython.eu/europython-2026-job-opportunities-from-our-sponsors/
Summary: 8 positions, 6 on AI, 2 in marketing, 3 in Finance or Banks. 3 without location; 2 hybrid, Kraków and Paris; 2 on site, Dublin and US or UK; and 1 remote but on selected countries in Europa.
“Most of our loops in Python are modeled from the perspective of looping over an iterable: that's what Python's for loops are for.”
Read more 👉 https://pym.dev/while-loops/
uv audit: a new Command for the Python project manager ; scans your dependencies for known vulnerabilities and "adverse" project statuses (such as being deprecated). Alternative to pip-audit, and is between 4x and 10x faster on typical projects #Python https://astral.sh/blog/uv-audit
Got questions about the 2026 PSF Board election? Curious about running? Join the upcoming PSF Board Office Hours session on Tuesday, July 14th, at 1 PM UTC on the PSF Discord to chat with current board members! #Python
https://pyfound.blogspot.com/2026/07/thinking-about-running-for-psf-board.html
If you’re at a loose end, I’m chatting to @mkennedy on @talkpython later on this afternoon. You can get it live at 2pm UTC, or watch the replay later🎙️
Python Tip #183 (of 365):
Wrap text to a fixed width with textwrap.wrap.
Need to hard-wrap a long string to 70 (or any number of) characters?
Use wrap() or fill() from Python's textwrap module.
The wrap() function breaks text into a list of lines:
>>> import textwrap
>>> text = "Permission is hereby granted, free of charge, to any person obtaining a copy of this software..."
>>> textwrap.wrap(text, width=20)[:2]
['Permission is hereby', 'granted, free of']
🧵 (1/2)
How can you improve the readability of long Boolean expressions in Python?
Read more 👉 https://trey.io/f98u5c
Python Tip #182 (of 365):
Use textwrap.dedent to unindent multi-line strings.
Without dedent:
>>> def help_text():
... return """
... Usage: my_tool [options]
... -h, --help Show this message
... """
...
>>> print(help_text())
Usage: my_tool [options]
-h, --help Show this message
With dedent:
>>> from textwrap import dedent
>>> print(dedent(help_text()))
Usage: my_tool [options]
-h, --help Show this message
🧵 (1/3)
Hey la team #python : quelqu'un saurait m'expliquer pourquoi dès qu'il est utilisé, mon objet CSV (ici reader) se retrouve vidé ?
Je cherche à l'utiliser plusieurs fois, c'est quoi la bonne méthode pour le conserver entre deux usages ? J'ai pas envie de refaire un open, c'est un gros fichier.
f = open("Lexique4.tsv", encoding="utf-8")
reader = csv.DictReader(f, delimiter="\t")Python Tip #181 (of 365):
Don't use Python's "str.title()" method.
It capitalizes letters after apostrophes, turning "don't" into "Don'T".
Here's the problem:
>>> "Python is a don't-miss language".title()
"Python Is A Don'T-Miss Language"
str.title() defines a "word" as anything following a non-letter character.
Since ' isn't a letter, the t in "don't" gets capitalized.
For most cases, capwords() from the string module is a better choice.
🧵 (1/2)
“Self-concatenation is useful for making strings that contain the same character or the same sequence of characters a specific number of times.”
Read more 👉 https://pym.dev/self-concatenation/
@skjaeve You're in luck when you upgrade to 3.13!
A better interactive interpreter
...
* Direct support for REPL-specific commands like help, exit, and quit, without the need to call them as functions.
https://docs.python.org/3.13/whatsnew/3.13.html#a-better-interactive-interpreter
#Python
🐍🚀 Out now: Humanize 4.16!
Add Latvian language localization
Add i18n support for naturalsize() and French translation
Performance improvements: 1.07x - 8.4x
Lazy imports for Python 3.15+
Drop experimental Python 3.13 free-threaded
Refactor: simplify scientific() and extract _SUPERSCRIPT_MAP constant
And seven assorted bug fixes!
https://github.com/python-humanize/humanize/releases/tag/4.16.0
#Python #Humanize #release
Well, a week at the beach was a nice break but it didn't make me leave tech forever. :)
gh-profiler 0.8.4 is a small release. You can pass a GitHub profile URL instead of just a bare username. Also, -h works for help.
This is nice because if you're on a user's profile page, you can just copy the URL instead of trying to copy or type just their username. Thanks @hugovk
🚀 It's out!
🥧 Please install and enjoy Python 3.14!
https://discuss.python.org/t/python-3-14-0-final-is-here/104210?u=hugovk
🐍🚀 Out now: pylast 7.1.0!
pylast is a Python interface to Last.fm and Libre.fm
🎹 Replace HTTPX with HTTPX2
🎶 Remove legacy Python 2 code
🪇 And five bug fixes
https://github.com/pylast/pylast/releases/tag/7.1.0
#Python #release #LastFM #LibreFM #scrobbler #pylast
Forget* about Python 3.14, all the cool kids are trying out Python 3.15.0 alpha 1 (but not on production)! 🚀
🔬 PEP 799: A dedicated profiling package for Python profiling tools
💬 PEP 686: Python now uses UTF-8 as the default encoding
🌊 PEP 782: A new PyBytesWriter C API to create a Python bytes object
⚠️ Better error messages
https://discuss.python.org/t/python-3-15-alpha-1/104358?u=hugovk
* Please don't forget about 3.14...
Just released! 🚀🚀🚀🚀🚀
Pillow 12.0.0
https://fosstodon.org/@pillow/115379893139846791
norwegianblue 0.23.0
https://github.com/hugovk/norwegianblue/releases/tag/0.23.0
pypinfo 23.0.0
https://github.com/ofek/pypinfo/blob/master/CHANGELOG.rst#2300
Humanize 4.14.0
https://github.com/python-humanize/humanize/releases/tag/4.14.0
Tablib 3.9.0
https://github.com/jazzband/tablib/releases/tag/v3.9.0
#Python #release #Pillow #pypinfo #Humanize #norwegianblue #Tablib
Just released! 🚀
📜 Python Docs Sphinx Theme, with added Arabic, French, Romanian and Russian translations.
https://github.com/python/python-docs-theme/releases/tag/2025.10
#Python #release #PythonDocsSphinxTheme #Sphinx #theme #translations
Just released! 🚀
🎨 termcolor 3.2.0
https://github.com/termcolor/termcolor/releases/tag/3.2.0
🟣 Expose `can_colorize` as public API
🟢 Add support for Python 3.15 (🥉 at https://pyreadiness.org/3.15/)
🔴 Drop support for EOLish Python 3.9
Out now: pepotron 1.6.0, with the new Python 3.16 schedule:
❯ pep 3.16
https://peps.python.org/pep-0826/
❯ pep 8
https://peps.python.org/pep-0008/
❯ pep lazy
Score Result
90 PEP 810: Explicit lazy imports
73 PEP 690: Lazy Imports
68 PEP 217: Display Hook for Interactive Use
68 PEP 802: Display Syntax for the Empty Set
57 PEP 227: Statically Nested Scopes
https://peps.python.org/pep-0810/
❯ uvx pepotron 3.16
https://peps.python.org/pep-0826/
https://mastodon.social/@peps@feedsin.space/116122903304128032
Python Tip #180 (of 365):
Zero-pad numbers with f-strings.
Need to format a time like "9:05" instead of "9:5"?
Use "02d" in your f-string format spec.
Without zero-padding:
>>> hour, minute = 9, 5
>>> f"{hour}:{minute}"
'9:5'
With zero-padding on the minutes:
>>> f"{hour}:{minute:02d}"
'9:05'
The "02d" format spec pads the number with zeros until it's 2 digits long. 0 means "zero pad", 2 is the minimum width, and "d" means integer.
🧵 (1/2)
I want default #python extras so bad...
- put fast things like orjson, rtoml, google-re2 and so on in extras: 99% of your users will have a bad experience out of box
- move them to direct dependency? now you can't upgrade or try out 3.15 and *some day* your users will not be able to carry on because the orjson or rtoml guy died or google-re2 staff were laid off and there aren't wheels anymore.
“The get method is the classic way to look up a value for a dictionary key without raising an exception for missing keys.”
Read more 👉 https://pym.dev/default-dictionary-values/
Big news for the #Python packaging world: The inaugural Python Packaging Council election is coming up soon! The council will be the technical decision-making body for Python packaging specs, coordinating across tools, teams, and the wider community. Learn more on the PSF blog:
https://pyfound.blogspot.com/2026/06/packaging-council-inaugural-election.html
Just accepted:
PEP 752 – Implicit namespaces for package repositories
https://peps.python.org/pep-0752/
https://discuss.python.org/t/pep-752-implicit-namespaces-for-package-repositories/63192/96
RE: https://social.breizhcamp.org/@pythonrennes/116720426748989669
Mercredi soir, c'est la dernière session de #PythonRennes de la saison. On y parlera majoritairement de #SQL donc ça peut vous intéresser même si vous ne faîtes pas de #Python.
- Plaidoyer pour un monde sans #ORM par Jonathan Leger.
- SQL avancé (via ORM #Django) par moi même.
Il reste des places et la météo sera agréable. Inscription sur https://www.meetup.com/python-rennes/events/315168209/.
Merci Liksi pour l'accueil !
🐍📣 la prochaine session de #PythonRennes aura finalement lieu le mercredi 1er juillet 2026 à 19h chez Liksi (🙏 pour l'accueil) 🎉
Jonathan Leger questionnera l'utilisation d'#ORM, @anthony vous parlera de #SQL avancé avec @django.
Inscription gratuite mais nécessaire sur https://www.meetup.com/python-rennes/events/315168209/
“Python will be happy with it, but other programmers will probably find it pretty confusing.”
Read more 👉 https://pym.dev/unnecessary-parentheses/
Python Tip #179 (of 365):
Use history & paste mode in the new REPL. 🧵
F2 enters history: previous code is shown WITHOUT >>> prompts, so you can copy just the code.
F3 enters paste mode: Enter won't accidentally run your code block while you're editing it.
I find history mode (F2) useful for copying code out of the REPL.
In history mode, you see just the code you typed, without the prompts and output intermixed.
https://pym.dev/repl-features/#history-mode
🧵 (1/2)
Mardi prochain à 18h30 au bar Fermenté.e, je présenterai le fonctionnement technique de Trognoncal, le logiciel que j'ai développé pour faire fonctionner @pommesdelune
Si vous voulez y assistez, foncez réserver votre place ici :
https://www.meetup.com/pyclermont/events/315067285/
À la suite de cette présentation, la communauté pommes de lune se retrouvera pour un moment de convivialité :
https://pommesdelune.fr/event/2026/6/30/23090-rencontre-de-fin-dannee-pommes-de-lune
venez discuter avec celles et ceux qui font vivre ce site, qui l'alimentent au quotidien, et vous proposent un agenda culturel toujours plus chouette !
Last chance to register and speak at #EuroPython #RustSummit - we only have a couple of talk slots left, if you would like to speak, let us know #ASAP. We also welcome anyone at any #Rust level to join us. All information at https://ep2026.europython.eu/session/rust-summit-at-europython
✍️ New post on using WeakKeyDictionary to store extra per-object data
Documenting a pattern I’ve used in several places to store extra data without touching the object itself.
https://adamj.eu/tech/2026/06/27/python-weak-key-dict-pattern/
Python Tip #178 (of 365):
Hack your Python REPL.
The REPL in Python 3.14 includes syntax highlighting. It's pretty great!
But did you know that you can customize the color scheme it uses?
You can also customize other REPL features, like adding your own custom keyboard shortcuts.
🧵 (1/3)
Python Tip #177 (of 365):
Learn your REPL's keyboard shortcuts. 🧵
This is especially useful in Python 3.13+ because there are even more useful shortcuts.
The most useful: Ctrl+P and Ctrl+N navigate between blocks (not lines).
There's also:
• Ctrl+L: clear screen
• Ctrl+R: search your history
• Alt+Enter: run current block
• Ctrl+K: delete from cursor to end of line
• Ctrl+Left / Ctrl+Right: jump one word at a time
🧵 (1/2)
#Python question:
So I can do this to increment some value:
```
a += 1
```
And I can do this do make a value roll through `0, 1, 2, 0, 1, 2`:
```
a = (a + 1) % 3
```
Is there some shorthand which combines these two?
Python Tip #176 (of 365):
Customize your REPL with PYTHONSTARTUP. 🧵
If you set the PYTHONSTARTUP environment variable to point to a file containing Python code:
export PYTHONSTARTUP=~/.pythonstartup.py
Python will run that file at the start of each new Python REPL.
For example, ~/.pythonstartup.py might contain:
from pprint import pp
from pathlib import Path
Now those are available in each new REPL:
>>> Path.cwd()
PosixPath('/home/trey')
https://docs.python.org/3/tutorial/appendix.html#the-interactive-startup-file
“All forms of iteration do the same thing in Python.”
Read more 👉 https://pym.dev/all-iteration-is-the-same/
Great coverage from @lwn of the PSF PyPI Safety & Security Engineer @miketheman's talk on Trusted Publishing at Open Source Summit. 36% of @pypi uploads now use Trusted Publishing. Is yours one of them?
Dev depuis 2003, dev Python depuis 2010 (donc je code sans LLM).
Je suis à l'aise aussi côté réseau, sysadmin, devops, Linux, C, SQL...
Vrai Full Stack quoi : du métal au CLI, ou du métal à l'API comme tu veux tant qu'il n'y a pas de JS, pas de HTML, pas de CSS (si c'est moi qui fait le front c'est moche).
Mon CV au cas où ça serve encore : https://mdk.fr/Julien-Palard.pdf
Région : Yvelines/Hauts-de-Seine/Paris. TT apprécié.
🐍 Petit rappel pour les adeptes du fourchelang lyonnais : ce soir il y a un Meetup Python à 19h chez @WanadevDigital
Au programme : découverte de Doctest, un framework de test atypique.
Info et inscription :
➡️ https://www.meetup.com/fr-fr/python-afpy-lyon/events/315052543/
Python Tip #175 (of 365):
Pass "-i" to #Python to drop into a REPL after your script runs.
$ python -i fibonacci.py
>>> nth_fibonacci(10)
55
You'll have access to everything the script defined.
Passing "-i" is like pasting your script into a REPL.
After the script runs, you're dropped into an interactive session with all variables still in scope, even if the script crashed.
It's handy for debugging: run your script, inspect what's in scope, and figure out what went wrong.
Released a new version of #pyuppsala my #xml library for #python written in #rust https://pypi.org/project/pyuppsala/
“You can (unofficially) customize the Python REPL syntax highlighting as well.”
Read more 👉 https://pym.dev/repl-features/
"Dependabot no longer supports Python version 3.9, which has reached its end-of-life. If you continue to use Python 3.9, there’s a risk that Dependabot will not create pull requests to update dependencies. If this affects you, please update to a supported release of Python."
https://github.blog/changelog/2026-06-23-deprecation-of-python-3-9-for-dependabot/
Ever wonder how Python's grammar actually fits together? PSF CPython Developer in Residence @encukou is presenting a full railroad diagram of #Python's entire grammar in the poster session at @europython 2026 on July 16- make sure to check it out! #EP2026 https://ep2026.europython.eu/session/python-syntax-diagram