social.dk-libre.fr is a Fediverse instance that uses the ActivityPub protocol. In other words, users at this host can communicate with people that use software like Mastodon, Pleroma, Friendica, etc. all around the world.
This server runs the snac software and there is no automatic sign-up process.
Python Tip #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
Actually, CPython, I think you understood perfectly well exactly what I wanted you to do. Yet here we are.
🐍🚀 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
My wife pointed out that I tend to be REALLY LOUD when I'm on a zoom/Meet call for work.
I realized she's right, so I built a tool called "Inside Voice" that beeps at me if my microphone's audio gets louder than an adjustable threshold.
I'm pretty happy with it!
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
Pillow 12.0.0 is out!
🎨 Support for Python 3.14!
🎨 Dropped EOL 3.9!
🎨 New ImageText.Text API!
🎨 Removed deprecations!
🎨 New deprecations!
📜 And more: https://pillow.readthedocs.io/en/stable/releasenotes/12.0.0.html
📜📜📜 And much more: https://github.com/python-pillow/Pillow/releases/tag/12.0.0
🚀 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
Falls jemand einen #Softwareentwickler braucht: Ich bin gerade auf der Suche nach einer neuen Stelle.
(Programmier-) sprachen: #TS, #JS, #Java, #Python sowie ein bisschen C++, PHP, CMD, C#, ...
und einiges an Erfahrung mir Shell/Bash/Batch Scrippting, (#GitHub-) Actions u.a., #Yaml, #Markdown, #RST, #JSON, ...
DB: NQL, SQL u.a. (meiste Erfahrung mit einer Eigenentwicklung der flexis und #PostgrSQL)
Bisherige Softwarebranche(n): #Webdevelopment, #Planungssoftware, #3D Darstellung, #Tools & #Scripting (#Arduino) u.a.
Ich hab vor allem Interesse(n) in den Bereichen: #Webentwicklung, IT-Security und allgemein der sinnvollen nachhaltigen #Softwareentwicklung (gerne auch im Bereich der Green IT) und sehr gerne mit #Linux.
Voraussichtlich werde ich demnächst fertig mit meiner #Ausbildung zum #Fachinformatiker für #Anwendungsentwicklung und wäre danach frei in der Entscheidung eine neue Stelle als Softwareentwickler / Software Engineer / Webentwickler oder ähnliches zu beginnen.
Also falls irgendeine Firma sucht, dann gerne mich erstmal hier kontaktieren und ich gebe euch dann meine Kontaktdaten.
---
Kontaktiert mich bitte nicht, wenn ihr nur einen Entwickler oder Betreuer für Apple / Mac Geräte braucht. Dafür bin ich nicht qualifiziert.
#Jobsuche #Stellensuche #Mittelsachsen #Chemnitz #Leipzig #Döbeln #Mittweida #Remote
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)
#Python: Attackers Planted a #Telegram-Powered Backdoor #Malware Across Fake 'pyrogram' Packages on #PyPI:
* pyrogram-navy
* pyrogram-styled
* sepgram
* pyrogram-kelra
...and others - check out the @CheckmarxZero blog post for more details:
👇
https://checkmarx.com/zero-post/operation-navy-ghost-pyrogram-telegram-supplychain-attack/
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
TIL: Some surprising numeric conversions in Python
https://yossarian.net/til/post/some-surprising-numeric-conversions-in-python
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/
uv 0.11.25 is a small but useful security release: it bumps its internal tar library, astral-tokio-tar, to v0.6.3, which tightens how source distributions are parsed. uv may now reject sdists with malformed or ambiguous content it previously accepted without complaint. If you maintain packages with older or non-standard build artifacts, it is worth testing. Have any of your packages started failing to build after this update?
#Python #security
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 !
An ideal is that it should not happen.
The reality might be Python-related in this case. Two days ago:
Default Python has been upgraded to 3.12 : r/freebsd
<https://www.reddit.com/r/freebsd/comments/1ugdsdk/default_python_has_been_upgraded_to_312/>
<https://www.reddit.com/r/freebsd/comments/1ugdsdk/comment/ou25r7m/> noted the removal of qutebrowser.
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
I'm told I need pinned posts on my profile.
I'm a #software #engineer living in #Saskatchewan, #Canada, the middle of the prairies. I've worked in countless domains, but find #python generally useful for many of them, and have been using it for nearly 30 years.
I'm a #HouseRabbit enthusiast and have had them for more than 20 years.
Other hobbies include #electronics, #rock music / playing #guitar, writing #FreeSoftware, and enjoying novelty music & #RiffTrax / #CinematicTitanic / #MST3K.
✍️ 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)
RE: https://fosstodon.org/@europython/116783034135869682
Very excited to share stories, insights, recommendations at my first @europython
I'll also be attending the Packaging and Language Summits, as well as any other opportunities to increase awareness of #Python and #PyPI #OpenSource #SupplyChain #Security initiatives.
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)
Leveraging Python 3.13+'s improved repl to show a preview of what my RPN calculator will calculate ...
_1k switches the calculator into a mode where it shows fractions as repeating decimals.
It's RPN so in the end, (1 - 2/3) is shown as the repeated decimal 0.3 with a bar over the 3.
I updated my blog post about using pyrepl in your own programs: https://emergent.unpythonic.net/01781963135
#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/
Explicit Lazy Imports Are Coming to Python 3.15
#Pycharm #News #Python
https://blog.jetbrains.com/pycharm/2026/06/explicit-lazy-imports-are-coming-to-python-3-15/
Wer ein Homelab betreibt kennt das: Proxmox, Docker, ein Raspberry Pi, ein VPS — und für alles einen anderen Befehl in einem anderen Fenster.
Ich hab das mit einem kleinen Python-CLI gelöst: `dsn update homelab`, `dsn status`, `dsn restart claire`. Alles an einem Ort.
Blogpost dazu ist online:
→ https://m1ch4.net/blog/dsn-cli/
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?
Since it remains unclear whether my current #PostDoc contract will be prolonged in January, I am starting to look for a new #AcademicJob!
My expertise are #ecology, #ethology, #AnimalBehavior, with a focus on #olfaction in #mammals.
I had a stint in #NeuroEthology, but that wasn't quite my cup of tea, and I am currently working in #AnimalWelfare for husbandry animals (think cows, pigs etc).
I have done field work (wild rodents), lab work (very controlled behavioral assays), and pure data analysis.
I do everything in #rstats, so my standard analysis tools are GLM/GLMM, but I'm currently learning how to properly use Generalized Additive Models, as they seem like the natural next step.
I've also dabbled in #python in order to work with #DeepLabCut and #moseq, so the last few years I spent mostly with #ComputerVision, #DeepLearning, and extracting data from videos.
As that requires heavy GPU calculations, I've done most on my work on institutional and/or national #HPC, and then crunched the masses of resulting data in #rstats
I'm looking for a job in the #EU, preferably anywhere north of Germany, but let's be honest, I'll go wherever there is a job.
My website is a bit outdated, but https://tsievert.com/
Please boost for visibility!
#AnimalBehaviour #FediJobs #FediHire #GetFediHired #LookingForJob
This is what collaborative, coordinated, responsible disclosure looks like.
It was a pleasure to work with GitGuardian on this #PyPI #security investigation to help protect the global #Python #SupplyChain
https://blog.gitguardian.com/hunting-leaked-pypi-tokens-62-live-125-packages-exposed/
Also serves as a reminder to adopt Trusted Publishing whenever possible!
https://docs.pypi.org/trusted-publishers/
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é.
We are absolutely delighted to welcome @Marlene to the EuroPython 2026 speaker lineup! 🎉
Marlene is a Senior Developer Advocate at Microsoft (Python & AI), co-chair of the ACM Practitioner Board, ex-vice chair of the PSF, and led the first PyCon Africa! 🌍✨
Join us in Kraków or watch online from 13-19 July! 🎟️
Tickets: https://europython.eu/tickets/
🐍 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
I've spent years maintaining the UNICORN Binance Suite, dealing with those weird edge cases where WebSockets look alive but are actually dead to your trading strategy.
Since most tutorials completely skip these production-level failure modes, I wrote a comprehensive Python API guide for 2026. It focuses purely on data integrity, proper lifecycle handling, and local depth caches.
If you are building crypto trading tools with Python, I hope this architecture blueprint saves you some sleepless nights.
🔗 https://blog.technopathy.club/the-complete-binance-python-api-guide-2026
Python Tip #174 (of 365):
Python modules are cached.
The first time each Python process imports a module, it caches it in sys.modules.
The second time you import the same module, Python returns the cached module object without re-running the module code.
This means if you edit a file and then re-import it in the same REPL session, your changes won't appear.
Re-importing a module does not reload it.
The simplest fix: RESTART PYTHON.
🧵 (1/2)
Reminder: The PSF's Strategic Plan full draft is available and we want your feedback! Check out the full draft and tell us: Are these the right goals? Is anything missing?
The feedback window closes in a couple of days on June 25, 2026, AoE.
https://pyfound.blogspot.com/2026/06/psf-strategic-plan-2026-draft-open-for.html
RE: https://fosstodon.org/@ThePSF/116800035337786641
Completely remediating this report was a massive coordinated team effort and would not be possible without paid security staffing at the PSF. Confirmed remediation in 48 hours from report with extensive follow-up auditing, hardening, and coordinating a third-party audit from Trail of Bits.
Thank you to Alpha-Omega for funding my time and OpenAI for funding the audit through "Patch the Planet".
Please see the write-up for details.
#opensource #oss #security #supplychain #python
The Python Security Response Team patched an authentication bypass in the python.org release management API in under 48 hours. No evidence of exploitation, all artifacts verified.
Check out the full writeup 👇
https://pyfound.blogspot.com/2026/06/mitigated-api-bypass-for-download-metadata-python-dot-org.html
The Python Security Response Team patched an authentication bypass in the python.org release management API in under 48 hours. No evidence of exploitation, all artifacts verified.
Check out the full writeup 👇
https://pyfound.blogspot.com/2026/06/mitigated-api-bypass-for-download-metadata-python-dot-org.html
🐍🚀 Out now: Python 3.15 beta 3!
💤 Lazy imports!
🧊 frozendict builtin!
💂 sentinel builtin!
📉 Tachyon profiler!
🖼️ Frame pointers everywhere!
🛅 Unpacking in comprehensions!
🗣️ UTF-8 as the default encoding!
🆕 Package startup config files!
⌨️ TypedDict and TypeForm!
🐎 Faster JIT!
🎨 More colour!
🚌 & more!
Library maintainer? We *strongly encourage* you to add 3.15 to your CI and test during the beta. And send us those bugs reports!
https://discuss.python.org/t/python-3-15-0-beta-3-is-here/107866?u=hugovk
#Python #Python315 #CPython #release
The supplemental June 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 receive your questions and feedback about the ongoing strategic planning at the PSF! #python
https://pyfound.blogspot.com/2025/10/a-new-psf-board-another-year-of-psf.html
RE: https://hachyderm.io/@cleder/116796446972749174
My #awesomelist for #precommit and #prek is now at 60 #awesome hooks. 🎉
Find linters, formatters, security scanners, code quality tools, and more in one place.
Contributions welcome! 🔧
Languages
docker, go, img, js, md, nb, py, ru, sh, sql, tf, toml, ts, yaml
Frameworks
bevy, django, git, k8s, react, sphinx
So the next time you find yourself making a list of lists or flattening a list of lists, try out the comprehension approach.
Read more 👉 https://trey.io/aeo9fg
Look! It's @sethmlarson and I at the #UNOpenSourceWeek !
We presented, facilitated, and listened to others.
Python Tip #173 (of 365):
Use _ to see the previous REPL result.
Say you ran an expression in the REPL and only decided AFTER you ran it that you want to capture the result:
>>> 2**50
1125899906842624
This is what the REPL's magical _ variable is for.
The last result the REPL generated is stored in the _ variable.
So you can just point a different variable to that value:
>>> n = _
>>> n
1125899906842624
This week's tips are all about the Python REPL.
Out now: linkotron 0.7!
CLI to format links in a shorter format.
🖇️ Format regular links
🔗 Format GHSA links -- thanks @stanfromireland!
🖇️ Add support for Python 3.15-3.16
🔗 Stop testing experimental 3.13t
Maybe one day I'll remember how to write reStructuredText links but now I don't need to:
❯ linkotron example.com --rst
Copied! `example.com <https://example.com>`__
Out now: PrettyTable 3.18!
Library to display tabular data in a visually appealing ASCII table format.
Lots of stuff here, including performance improvements, some thanks to improvements in wcwidth dependency.
Add support for:
Python 3.16
reStructuredText tables
multiline headers
captions in Markdown
And more!
https://github.com/prettytable/prettytable/releases/tag/3.18.0
#Python #release #PrettyTable
🐍🅰️ Out now, Python 3.15 alpha 6!
PEP 799: A high-frequency, low-overhead, statistical sampling profiler
PEP 798: Unpacking in comprehensions with * and **
PEP 686: Python now uses UTF-8 as the default encoding
PEP 782: A new PyBytesWriter C API to create a Python bytes object
PEP 728: TypedDict with typed extra items
The JIT compiler has been significantly upgraded with up to 7-8% speedup
🧊 Just two more alphas until the feature freeze! 🧊
https://discuss.python.org/t/python-3-15-0-alpha-6/106122
#Python #Python315 #release
Watch PSF PyPI Safety & Security Engineer @miketheman's talk from Open Source Summit NA 2026: Trusted Publishing uses OIDC to generate short-lived tokens from CI/CD. No passwords. No tokens to rotate. No secrets in repos.
TIL about #python named escapes: "\N{FIGURE SPACE}" is equivalent to and more self-explanatory than "\u2007"
“Dataclasses allow us to create friendly classes while writing less boilerplate code.”
Read more 👉 https://pym.dev/friendly-classes/
Python Tip #172 (of 365):
Know your object introspection tools
When you're in an interactive Python environment remember that these 4 tools can be helpful for introspecting the state of your Python process:
1. type
2. help
3. dir
4. vars
type shows the class of an object (the terms "class" and "type" are synonyms in Python).
If you have a mystery object, type can tell you what it is:
>>> type(letter_counts)
<class 'collections.Counter'>
🧵 (1/4)
RE: https://mastodon.social/@coredispatch/116777745023446095
If you are interested in the beating hearts of the #Python community (the language core, the PSF, and other things), then reading @coredispatch is well worth your time, it is always informative!
I blogged what I've learned about using the _pyrepl module in Python 3.14+ to add multiline & colorized input to my own project. https://emergent.unpythonic.net/01781963135
Customize PDB with a ~/.pdbrc file.
You can make a ~/.pdbrc file to add your own commands to the Python debugger.
This ISN'T a Python file, so it's a bit tricky to create, but spending a few minutes making one is well worth it.
At startup, PDB runs commands from a ~/.pdbrc file.
The handiest thing to put there are custom PDB aliases.
🧵 (1/4)
I was told about this blog site, a couple of weeks ago. There are interesting pages listed here
The subjects vary in the manner as seen in the first page (check the screencaps)
## What I really like about this place, is that it loads blazingly fast
I also love the fact that you can use browsers in your,
* bash
* csh
* ksh
* zsh
* sh
* fish
* without any bloat just like browsing should be, everywhere
https://rldane.space/junited-2026.html
Thank you @rl_dane
#Blog #site #fast #HTML #great #cool #sweet #nice #programming #Python
An #introduction perhaps?
I’m this middle-aged dad from Germany. I have a wonderful partner, 4 kids and a cat.
I care about society and technology. A retired #FOSS activist, these days I work at a globocorp doing IT stuff for trains 🚄
My interests include baking #bread, #fermenting stuff, paddling a whitewater #kayak, n00bing around with #Python, #RaspberryPi and #arduino, and oh so many books.
There’s never enough time, and I haven’t been bored in more than a decade.
Python Tip #170 (of 365):
Use b to set a breakpoint while you're in PDB
You can use the b command to set a breakpoint at a certain line of code:
(Pdb) b 4
Breakpoint 1 at script.py:4
But why...?
Why not just add another breakpoint() call?
Well, imagine you've entered PDB via post-mortem debugging (see tip 154 from yesterday).
You've realized once you're IN PDB that it would be useful to pause on a particular line.
The b command makes that easy!
🧵 (1/2)
“You can make a self-documenting expression by putting an = sign at the end of an f-string's replacement field (the part between { and }).”
Read more 👉 https://pym.dev/debugging-with-f-strings/
Ce mardi 30 juin 2026 à 18h30, je présenterai le fonctionnement de Trognoncal, le moteur d'agenda culturel participatif que je développe depuis plus de trois ans pour propulser https://pommesdelune.fr
Ça se passera au bar Fermenté.e, et même si on ne rentrera pas trop dans la technique, je présenterai tout de même pas mal d'éléments du fonctionnement interne.
Tout ça est organisé par David Rigaudie / PyClermont, et il reste encore quelques places :
https://www.meetup.com/pyclermont/events/315067285/
Après 20h, on invite toutes les personnes intéressées par l'agenda à venir partager un moment de convivialité pour la fin de la deuxième saison de pommes de lune.
La communauté Python au Togo @pytogo_org lève des fonds pour offrir des bourses à 100 étudiant·e·s pour participer à la prochaine PyCon Togo.
J'ai été invité à parler de ma relation à #Python lors d'un stream cet après midi : https://inv.thepixora.com/watch?v=U1a-crY7xGs
Et pour donner des sous, c'est là : https://pycontg.pytogo.org/donate
La configuration d'une application Django se fait habituellement via un script Python dont les résultats dépendent de l'environnement d'exécution (variables d'environnement). Ce projet de @adamghill permet de déporter tout ou partie de la configuration dans des fichiers TOML qu'on peut associer à des environnements différents : https://github.com/adamghill/dj-toml-settings
I just submitted my (first ever!) affirmation of my intention to vote in a PSF election https://pyfound.blogspot.com/2026/06/psf-board-election-dates-for-2026.html #python #PSF #psfmember
Python Tip #169 (of 365):
Use PDB's post-mortem mode to debug exceptions
Python script raising an exception and want to drop into an interactive environment RIGHT after the exception occurs?
Use "python -m pdb your_script.py"
Using "-m" runs the pdb module as a script.
When launched like this, PDB enters "post-mortem debugging" mode.
You'll drop into PDB as soon as your program launches.
🧵 (1/3)
The 2026 PSF Board Elections are coming up soon 🗳️ Whether you share our social media posts, vote, or decide to run, your engagement in the election makes all the difference! #Python
Check out the timeline on our blog: https://pyfound.blogspot.com/2026/06/psf-board-election-dates-for-2026.html
Python Tip #168 (of 365):
Want to start a proper Python REPL within PDB?
Run the interact command:
(Pdb) interact
*pdb interact start*
>>>
Before Python 3.13 added support for multi-line Python expressions within PDB, I used interact often.
Launching a Python REPL was essential whenever I needed to run a block of code or even to span one line over multiple lines with code wrapped in braces/brackets/parentheses (thanks to implicit line continuation).
🧵 (1/3)
My talk from @posetteconf : An Event for Postgres 2026 is now available on YouTube 🎥🐘
If you missed it live, you can now watch “PostgreSQL Generated Columns by Example” online.
I’ve also collected links and additional information on my blog, and I plan to publish the slides there next week ✨
RE: https://mastodon.social/@djangonews/116765592686029364
Thanks to the support of six of our sponsors, the Django Software Foundation has secured initial funding to support an Executive Director.
This is the very beginning, and we have a lot of planning and discussions to go, but this is a big step towards hiring an Executive Director.
Lily boostedAnnouncing the Search for a DSF Executive Director https://www.djangoproject.com/weblog/2026/jun/17/announcing-the-search-for-a-dsf-executive-director/
“When you find yourself using indexes in Python, ask yourself is there a specialized tool for this task that might avoid indexing and make my code more readable?”
Read more 👉 https://pym.dev/avoid-indexes-in-python/
Python Tip #167 (of 365):
In PDB, prepending a line with ! will force it to be treated as Python code.
This is especially handy when your expression starts with something that PDB thinks is a debugger command.
For example, n is a PDB command ("next line"), so if you have a variable named n, typing this won't show its value:
(Pdb) n
Instead, use "!n":
(Pdb) !n
'1'
The ! tells PDB to treat n as Python code, not as a PDB command.
Da gibt es so eine LED-Badge in 🔴 oder 🟢 oder 🔵 mit einem programmierbaren LED Feld . Herkunft und Link zum ursprünglichen Bashslript gibts hier.
Das Python GUI hat Dankward, Teilnehner am Wolust gemacht. Ein Fork
https://github.com/dewomser/LED-badge-gui
ICYMI: There’s a new Humble Bundle from No Starch Press with 15 #Python related titles!! Grab ‘Python: the Good Stuff’ for just $36 and a percentage of the proceeds goes to supporting the PSF 💝🐍 https://www.humblebundle.com/books/python-good-stuff-no-starch-books
We are thrilled to announce Leah Wasser (@leahawasser) as a #EuroPython keynote speaker! 🚀
Leah is the founder of pyOpenSci, a community of 400+ researchers making research software more sustainable and human. 🔬
As GenAI reshapes coding, Leah is protecting the human networks that keep open source sustainable. 🤝
Join us in Kraków or remotely, July 13-19!
🎟️ https://europython.eu/tickets/
Python Tip #166 (of 365):
Consider using PDB to debug your code.
Instead of temporary print calls, consider using Python's breakpoint() function to pause your program and drop you into the Python debugger (PDB).
Here's a tiny example:
from random import randint
breakpoint()
answer = randint(0, 1)
n = input("Guess: 0 or 1? ")
🧵 (1/2)
“What if you wanted to sort by something that wasn't quite the original item?”
Read more 👉 https://pym.dev/sorting-in-python/
I'm looking for work, please boost!
I'm a senior software engineer with 35 years of experience. I've worked across an unusually wide range of domains: mobile game backends, privacy-preserving data platforms, high-throughput COVID testing infrastructure, email and account systems, e-payment processing, job marketplace systems, and bioinformatics. I pick up new domains quickly and have a track record of doing it repeatedly. I understand how to turn business needs into engineering requirements.
I've worked remotely since the 1990s and can operate with minimal supervision. I don't need hand-holding to find the right problem to solve. Several of my most valued projects were self-directed: I identified the need, built the thing, and shipped it.
Some of the technologies I'm familiar with include: Python, Perl, TypeScript/JavaScript, Haskell, Go, C, Java. Postgres, MySQL, SQLite. Flask, SQLAlchemy. AWS (Lambda, S3, RDS, SQS, EC2). Docker, Git. Github and Gitlab.
I've also repeatedly picked up new languages and stacks as needed: Haskell for differential privacy research, TypeScript for a 24/7 AWS Lambda system, Flask for my most recent employer. I've become productive with new systems over and over, and I can do it quickly.
I'm also a published author (Higher-Order Perl, Morgan Kaufmann), longtime blogger, and conference speaker with a reputation for making complex ideas clear.
My résumé is at https://plover.com/~mjd/cv/Mark%20Jason%20Dominus.pdf
mjd@pobox.com
Thanks for your attention!
#OpenToWork #remoteWork #softwareEngineering #Python #backend #hiring
@JallBarret Hardcoding the path like that would break execution of the script in a virtual environment (which is exceedingly common these days), so I wouldn't do that. A better shebang line would be `#!/usr/bin/env python3`, since that will resolve it using PATH, and I believe /usr/bin/env is very standard on POSIX-ish systems.
pyodide est un portage de l'interpréteur Python en webassembly, qui permet donc de faire tourner du code écrit en Python dans le navigateur, code qui a accès à toute l'API web du navigateur.
Avec l'acceptation de la PEP 783, il est désormais possible de publier sur PyPI des paquets construits pour PyOdide : https://blog.pyodide.org/posts/314-release/.
Michel Caradec nous avait parlé de PyOdide dans son intervention "Python loin de ton ordinateur" : https://youtu.be/Dzjjwhx2Amk?list=PLv7xGPH0RMUT1GSCGHJmqnswpk-nyz5aq&t=1129
Prochain meetup #Python à #Lyon : jeudi 25 juin à 19h !
Rendez-vous à @WanadevDigital où @FLOZz nous parlera de Doctest, un framework de… tests 🐍
Pour vous inscrire ⬇️
https://www.meetup.com/fr-fr/python-afpy-lyon/events/315052543/
Python Tip #165 (of 365):
You can make a set of sets by using frozenset.
Sets can only contain hashable objects. And regular sets are NOT hashable:
>>> groups = {{"a", "b"}, {"c", "d"}}
Traceback (most recent call last):
...
TypeError: unhashable type: 'set'
So you can't make a set-of-sets with regular sets.
🧵 (1/3)
Pyodide 314.0: Python packages can now publish WebAssembly wheels to PyPI
https://blog.pyodide.org/posts/314-release/
#HackerNews #Pyodide #WebAssembly #Python #PyPI #314.0 #development
Pyodide 314.0: WebAssembly wheels for PyPI https://lobste.rs/s/azz673 #python #wasm
https://blog.pyodide.org/posts/314-release/
Python Tip #164 (of 365):
Thinking in terms of a Venn diagram? You need a set.
Need to find all items in one collection but not another? Intersect two collections? Check what's unique to each?
Python's sets support set arithmetic using operators:
>>> a = {1, 2, 3, 4, 7}
>>> b = {1, 3, 5, 7, 9}
>>> a | b
{1, 2, 3, 4, 5, 7, 9}
>>> a & b
{1, 3, 7}
>>> a - b
{2, 4}
>>> a ^ b
{2, 4, 5, 9}
🧵 (1/2)
RE: https://mastodon.social/@hugovk/116731833341936501
I wrote about the stuff I got up to during the Sovereign Tech Fellowship pilot last year. Turns out it was a lot! Expect more this year!
https://hugovk.dev/blog/2026/sovereign-tech-fellowship/
#Python #SovereignTechFellowship @sovtechfund
RE: https://mastodon.social/@sovtechfund/116731663840822816
After our successful pilot last year, I'm very excited to not only rejoin the 2026 Sovereign Tech Fellowship, but also that @georgically and @stanfromireland are also joining! Plus looking forward to meeting the other new Fellows!
#SovereignTechFellowshipWe’re thrilled to announce the 2026 #SovereignTechFellowship cohort. Welcome to Jan Kowalleck, Philipp Sauberzweig, Pablo Neira Ayuso, @jorisvandenbossche, @yabellini, Denis Cornehl, Jakub Beránek, @matk, @georgically, @stanfromireland, @hugovk, Alexander Ziaee, @elioqoshi and @b0rk
Meet the 14 maintainers, community managers, and technical writers building and sustaining the critical open source infrastructure we all rely on: https://www.sovereign.tech/news/meet-the-2026-sovereign-tech-fellows
#LabPlot (upcoming release) just got even more powerful.
The latest merge request introduces native support for importing data from the following file formats:
👉 #Apache #Parquet
👉 #Apache #ORC
👉 #Arrow #IPC (#Feather)
—three of the most efficient and widely used storage formats in data science.
#DataScience #OpenSource #FOSS #FLOSS #KDE #DataVisualization #BigData #Data #DataAnalysis #Python #R #MachineLearning #DataEngineering #TechNews #OpenData #Science #Research #DataScience
Python Tip #163 (of 365):
Commit the most important time complexities to memory.
Time complexity is about how your code slows as your data grows (I stole that phrase from @nedbat).
You don't need a Computer Science degree to benefit from knowing a handful of common complexities.
🧵 (1/4)
“Unlike many programming languages, you can accomplish quite a bit in Python without ever making a class.”
Read more 👉 https://pym.dev/when-are-classes-used/
Python Tip #162 (of 365):
Avoid modifying a list while you're looping over it.
Adding or removing items while looping over a list can cause clear bugs due to skipped or double-visited items.
This loop misses -3:
>>> numbers = [4, -1, -3, 2, -1, 5]
>>> for n in numbers:
... if n < 0:
... numbers.remove(n)
...
>>> numbers
[4, -3, 2, 5]
🧵 (1/3)
Welcome to #linux! It's super easy! To install packages, just use the GUI... oh. Oh that one. Well, that is super easy too! Just open a terminal and type pip3 .... oh, that? Yeah, you just have to figure out what a virtual environment is, figure out how to create one, whether to create a new one every time, how to manage it, and how to install your software using that! Oh you'll need some other libraries for that, and maybe to install some new things in the venv and oh yeah that's a common problem. It just means you have to... where are you going? It's super easy!
pipx seems like a good alternative except apparently it can't install what I need, for some reason. Back to trying to figure out how to set up and use virtual environments so I can install a damn thing.
Edit: It's not actually hard to do this, unless there are complications. It's just yet another damn thing to remember, and more steps to go through. Hoping this #pipx tool gets developed enough that it can do all of this with one command.
Edit 2: So I'm not That Asshole: what I did, from here
https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/
python3 -m venv .venv
source .venv /bin/activate
pip3 install [the software]
deactivate
Those are all easy commands, and I will 100% need to search for them next time (unless I use this #uv thing just recommended to me!)
@hugovk @georgically @stanfromireland This is absolutely incredible news for the #Python ecosystem and for all #opensource ecosystems. The STA Fellowship Program is one of the most exciting things happening right now IMO, I am so happy to see it return after the pilot and to have even more lovely Pythonistas among the ranks of fellows.
Congratulations everyone!
One of those "I wonder if I could" not "I wonder if I should" results...
A command line sub-pixel renderer (gray scale). Uses 7 sub pixel emoji and 5 semi-shade emoji all in bash.
Python Tip #161 (of 365):
To flatten an iterable-of-iterables, use chain.from_iterable.
Got a list of lists?
>>> groups = [["Hong", "Ryan"], ["Anthony", "Willa"], ["Margaret", "Adrian"]]
You could flatten it with a nested comprehension:
names = [name for group in groups for name in group]
Or you could use chain.from_iterable:
from itertools import chain
names = list(chain.from_iterable(groups))
🧵 (1/4)
Out now: Python 3.14.6 and 3.13.14!
A day late to include a last-minute OpenSSL release in the installers. Thanks to @standupmaths for the help with the release notes :)
https://discuss.python.org/t/python-3-14-6-and-3-13-14-are-now-available/107714
#Python #CPython #Python314 #Python313 #release
Just released! 🚀
🎶 pylast 6.0.0
🎤 A Python interface to Last.fm and Libre.fm
📯 Restore proxy support (potential breaking change: proxies are now always stored as a dict, before it was a str or dict)
🪇 Drop support for almost-EOL Python 3.9
Just released! 🚀
em-keyboard 5.3.0
🎲 Pick a random emoji from a search. For example:
❯ em --search music --random
Copied! 👩🎤 woman_singer
🧛♂️ Drop support for Python 3.9
Just released! 🚀
flake8-implicit-str-concat 0.6.0
A Flake8 plugin to identify those unjoined strings that a first Black run leaves behind:
"111111111111111111111" "222222222222222222222"
I hear there's another big release tomorrow? This release adds support for Python 3.14 and for once code changes were needed due to AST deprecation removals.
Also drop support for almost-very-nearly-EOL Python 3.9.
https://github.com/flake8-implicit-str-concat/flake8-implicit-str-concat/releases/tag/0.6.0
#Python #flake8 #release #Python314 #Python39
Out now!
Python 3.14.3 and 3.13.12!
All the best bugfixes!
https://discuss.python.org/t/python-3-14-3-and-3-13-12-are-now-available/105995
New screencast on stack-like and queue-like operations in Python.
Lists are great for one of these and not so great for the other.
gh-profiler 0.8.3 introduces a feature people have been asking for: when running it as a GitHub Action against new PRs or issues, you can have the action only write the profile output to the Actions log.
Instead of writing the profile output in a public comment on the PR/issue, it writes a link to the Actions log. The profile is still public, but it's not nearly as prominent.
Just posted an updated version of my little #Python frontend to yt-dlp. With this one I'm no longer bundling yt-dlp, but instead it gets downloaded to a config directory. As a result, if there's an update to yt-dlp, I don't have to go updating my software, anybody else who uses it doesn't have to install an update, all they have to do is run the "Component Updater" shortcut in their applications menu and it'll automatically pull down the updated yt-dlp.
https://gitlab.com/gerowen/youtube-dl-pytk/-/releases/26.6.10
les outils Python écrits en rust se multiplient : polars, uv, prek, pydantic, pyarrow, etc. À l’aune de cette belle collaboration entre les langages, ce guide "Rust pour les développeur·euses Python" de Microsoft est intéressant. Il explique les rouages de rust pour des personnes ayant les concepts de Python en tête.
The June edition of the PSF Board Office Hour is about to begin 🐍 🗒️ 9 PM UTC. We welcome you to join us to share how we can help your community, express your perspectives, and we'd love to receive your questions and feedback about the ongoing strategic planning at the PSF! #python
https://pyfound.blogspot.com/2025/10/a-new-psf-board-another-year-of-psf.html
Python Tip #160 (of 365):
Using list.insert(0, ...) in Python? Consider using a deque instead.
Inserting at the beginning of a list is slow because every existing item needs to be shuffled over.
On my machine, this takes multiple seconds to run:
numbers = []
for n in range(200_000):
numbers.insert(0, n)
There's a better structure than a list for this situation...
🧵 (1/3)
The June edition of the PSF Board Office Hour is about to begin 🐍 🗒️ 9 PM UTC. We welcome you to join us to share how we can help your community, express your perspectives, and we'd love to receive your questions and feedback about the ongoing strategic planning at the PSF! #python
https://pyfound.blogspot.com/2025/10/a-new-psf-board-another-year-of-psf.html
To remove a prefix or suffix, use the removeprefix or removesuffix methods.
Read more 👉 https://trey.io/dley4p
“Generator expressions also pair nicely with reducer functions.”
Read more 👉 https://pym.dev/custom-comprehensions/
🐍📣 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/
Hear from PSF's @pypi Support Specialist Maria Ashna on what her day-to-day looks like, how she cleared multiple months-long backlogs, and the future of PyPI Orgs in this Behind the Commit episode from Mia Bajić.
“So the next time you need to split a string into lines, don't use the string split method.”
Read more 👉 https://pym.dev/splitlines/
Python Tip #159 (of 365):
When it comes to modifications, think of lists as stack-like.
This week's tips are all about lists and data structures.
Regardless of how large your list is, these are both very fast operations:
items.append("more")
last = items.pop()
Lists are optimized for adding items to the end and removing items from the end.
🧵 (1/3)
I'm excited to announce Packaging Summit at EuroPython 2026, Monday, July 13, in Kraków (Poland). Pradyun and I are co-chairing again.
Request to attend and propose topics by June 29 AoE:
https://programme.europython.eu/europython-2026/talk/SBREFN/
If you're involved in Python packaging, as a tool author, library maintainer, downstream distributor, or user, and want to help hash out the present and future of packaging in person, this is the place.
gh-profiiler's bulk processing feature is a really interesting way to see how AI has been affecting contribution patterns in different projects.
Here's the 25 most recent merged/closed PRs in cPython. Most were merged. Two of the three PRs that were rejected were submitted by a user who raised a red flag when profiled.
To be clear, cPython maintainers are not using gh-profiler to make these decisions. But the output is aligning reasonably well with those decisions so far.
🐱 What can cats teach us about open source leadership? A lot, actually.
PSF Executive Director @baconandcoconut spoke at @NorthBayPython 2026 on staying focused, filtering noise, and not letting the internet knock you off course.
Check it out: https://www.youtube.com/watch?v=lHlAY1bLRBs
la dernière intervention de @lucsorelgiffo tournait autour des #conventionalcommits (https://youtu.be/KKBBOGeRPJg?si=zejM7RTwFtrQ6PVN&t=578) :
- extension git-commit-plugin + hook de pre-commit commitlint : guider l'écriture du message de commit
- python-semantic-release : calculer la prochaine version du paquet
- le mécanisme de trusted publisher pour pousser le paquet sur PyPI
Conscient des limites de ce formalisme, Luc vous partage cet article très pertinent qui les analyse très bien : https://sumnerevans.com/posts/software-engineering/stop-using-conventional-commits/
#Python #CI
slimtoolkit permet de réduire la taille d'une image Docker. L'outil s'appuie pour cela sur une analyse dynamique du container lors de son exécution, en consignant tous les fichiers utilisés.
Il faut donc être certain de passer par tous les chemins d'exécution. Ça peut être risqué pour une image contenant un produit complexe, mais pourquoi pas pour des micro-services (vraiment micros) ou des images de démonstration...
- https://codecut.ai/shrink-python-container-slimtoolkit/
- https://github.com/slimtoolkit/slim
Symbolica 2.0: Programmable Symbols for Python and Rust
Python Tip #158 (of 365):
If you had to choose, prefer automated tests over type annotations.
Of course... you don't need to choose. You can have both!
A type checker can tell you that your function returns the wrong type but it can't tell you that it returns the wrong answer.
Type annotations catch a specific category of bug: passing the wrong KIND of object.
Tests can catch that and more: logic bugs, incorrect output, mishandled edge cases, etc.
🧵 (1/2)
Mini Shai-hulud / Miasma on #pypi https://socket.dev/blog/shai-hulud-descends-to-hades-miasma-pypi-wave #malware #python
Deux ressources autour du monkeypatching et de la création de mocks pour des tests :
- Bob Benderbos : https://belderbos.dev/blog/python-mock-patch-verify-interception/
- Anthony Sottile : https://www.youtube.com/watch?v=ZW0QaclnJKA
Python Tip #157 (of 365):
Old type annotations still work, but newer Python has cleaner ways to write most of them.
Modernizing your annotations removes a lot of typing imports and boilerplate.
🧵 (1/3)
Weekend project that turned into infra I actually run daily: MastoSum.
The stack: RHEL host, 100% rootless Podman. Web on FastAPI, Celery worker/beat/flower, PostgreSQL 16, Valkey. All on userspace networking (pasta), images built & shipped by a self-hosted Forgejo runner. No root daemon, no privileged anything.
What it does: tracks technical hashtags all day and produces one daily briefing, every point linked to the original post + author. It reads only public hashtag timelines, credits every source, and trains on nothing.
And yes, an LLM writes the prose: a local Ministral model from French lab Mistral AI, running on my own hardware. No cloud, nothing leaving the box. Saying that plainly, not burying it. The whole design goal was to point readers *back* at the authors, not replace reading them.
Example output:
https://mastosum.linuxserver.pro/s/OGuLC5whmCS1ET9jAe9leg
This is really good: @ichard26 has funding to work part-time on pip for the next three months! 🎉
He has lots of exciting things planned, but also the flexibility to work on whatever is best for pip, including all-important general maintenance. 💪
https://sichard.ca/blog/2026/06/pip-contract-development/
#Python #pip
Python Tip #156 (of 365):
Parsing JSON with json.loads hands you a blob of nested dicts and lists with no structure.
But you CAN describe the shape, so a type checker (or pydantic) can catch typos and wrong assumptions.
Parsed JSON has no schema. Nothing would catch a mistyped keys:
>>> import json
>>> book = json.loads(response)
>>> book["titel"] # typo, no warning
You only find out at runtime, with a KeyError (if lucky) or a subtle bug (if not).
🧵 (1/4)
Vous aimez Python, Django, les logiciels libres et toute cette sorte de choses ? Profitez de votre week-end pour postuler ! On ferme dimanche soir.
#jerecrute #python #django #logiciellibre
https://mastodon.libre-entreprise.com/@entrouvert/116651361333143503
🤔📚 Wondering what to do this weekend? Grab the latest No Starch Press Humble Bundle, ‘Python: the Good Stuff’ and dig into 15 #Python related titles for just $36! A percentage of the proceeds goes to supporting the PSF! https://www.humblebundle.com/books/python-good-stuff-no-starch-books
I'm trying to measure noise levels in my room. I downloaded an Adroid app which giving me base levels of ~30dB, but then I have this python program https://stackoverflow.com/questions/79636781/how-can-i-find-the-decibel-of-music-or-video-that-comes-out-of-my-device-python (which is more similar to what I want in terms of capturing the sound and providing values to register) that is giving me values in the ~-40dB.
Could it be a matter of "just" adding a constant so they more or less match? Or could it be related to mixer volumes and different mics (phone vs computer)?
1/
behave-django v2.0.0 released! Introduces automatic isolation of fixtures per scope (feature, rule, scenario) – a usability improvement, but may break your old tests! Drops unsupported versions of Python and Django, supports Python 3.10+ and Django 5.2 and 6.0. 🤖 ✨ https://pypi.org/project/behave-django/ #python #django #behave #bdd #testing
Made some changes to and posted an update for one of my really old #Python #programming projects. I first wrote this back in like 2011. It's a tool that lets you ping several targets in series and save the results to an output file.
“This seems like it should have resulted in a SyntaxError!”
Read more 👉 https://pym.dev/implicit-string-concatenation/
Python Tip #155 (of 365):
When a method returns an instance of its own class, annotate the return type as Self.
Hard-coded class names break for subclasses:
class Connection:
def __enter__(self) -> "Connection":
self.connect()
return self
If PooledConnection inherits from Connection, a type checker will think PooledConnection().__enter__() returns a Connection (not a PooledConnection).
🧵 (1/2)
gh-profiler 0.7.0 is a significant improvement over previous versions.
All PR and issue activity is broken into three categories: repos the user owns, repos in orgs the user is publicly associated with, and external repos. All flag evaluation focuses on activity against *external* repos.
This is a model open source maintainer. They were showing up red, because they were opening a bunch of identical issues. But those were in their own orgs, and quite appropriate.
Ça fait bientôt six mois que je fais du #rustlang, web client (yew), serveur (actix), système (io, filesystem, process, pipes), binding Python (pyo3 et maturin), threads, async, ligne de commande (clap), parsing (toml, json, xml, avec serde), bref pas mal de choses assez variées.
Plus j'en fais moins j'ai envie de revenir à #Python et Cython.
The PSF's Strategic Plan full draft is available and we want your feedback.
After sharing high-level goals in May, we're opening a 3-week community feedback window. Read the full draft and tell us: Are these the right goals? Is anything missing? #Python #PyPI
https://pyfound.blogspot.com/2026/06/psf-strategic-plan-2026-draft-open-for.html
un article sur uv et les écueils relatifs à la gestion des dépendances :
The talks list is up for the Language Summit and we've emailed the attendees! This'll be the first time for the summit at EuroPython since we decided to alternate with PyCon US.
https://ep2026.europython.eu/language-summit/
I'm looking forward to it in Kraków next month!
Python Tip #154 (of 365):
Writing a type that's "this or that"? Use the | operator instead of Union or Optional.
"int | str" reads better than "Union[int, str]", and "int | None" reads better than "Optional[int]".
The old way involved helpers imported from typing:
from typing import Optional, Union
def parse(value: str) -> Optional[int]: ...
def normalize(value: Union[int, str]) -> str: ...
🧵 (1/2)
New #blog on #BurgeonLab ✍️
➡️ https://burgeonlab.com/blog/pre-hugo-build-draft-status-checker/
I share my fix on preventing accidentally publishing draft posts on Hugo with a Bash script pre-build check.
This is post 50 of #100DaysToOffload
📈 https://burgeonlab.com/tags/100daystooffload/
#blogging #blogs #guides #newpost #blogpost #smolweb #techblog #techguides #python #scripts #markdown #drafts #blogger #blog #hugo #gohugo #staticsitegenerator #webdev #ssg @gohugoio
At the recent @pycon, @cheukting_ho gave a talk on free threading, which was great BTW. She mentioned PEP 8, calling it the “King of PEPs” 👑
Giving it a read over. I’ve probably skim-read it at best — just doing what flake8 told me for years. 🫡
That the opening bit is “A Foolish Consistency is the Hobgoblin of Little Minds” is just lovely. 🥰
I wonder if “this style guide evolves over time” will mean that the 79 chars line length will be revisited? 🤔
https://peps.python.org/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds #PEP8 #Python
“You can use the built-in sorted function to sort any iterable in Python.”
Read more 👉 https://pym.dev/sorting-in-python/
🐍🚀 Out now: Python 3.15 beta 2!
Still all this good stuff:
💤 Lazy imports!
🧊 frozendict builtin!
💂 sentinel builtin!
📉 Tachyon profiler!
🖼️ Frame pointers everywhere!
🧳 Unpacking in comprehensions!
8️⃣ UTF-8 default encoding!
🆕 Startup config files!
⌨️ Loadsa typing!
🎨 More colour!
🚌 & more!
Library maintainer? Add 3.15 to your CI and keep those bug reports coming!
https://discuss.python.org/t/python-3-15-0-beta-2-is-here/107610
Just released: Python Docs Sphinx Theme 2025.9! 🚀
This enables translations of the theme and adds translations for:
Brazilian Portuguese
Greek
Japanese
Polish
Simplified Chinese
Spanish
Swedish
Traditional Chinese
Turkish
Thanks to all our translators!
https://github.com/python/python-docs-theme/releases/tag/2025.9
#Python #docs #Sphinx #PythonDocsTheme #PythonDocsSphinxTheme
Just released: Python Docs Sphinx Theme 2025.9.2! 🚀
Add German, Korean and Indonesian translations
Fix html page translation
Fix Copy button copying line numbers
Fix search button cutting off long translations
https://github.com/python/python-docs-theme/releases/tag/2025.9.2
#Python #docs #Sphinx #PythonDocsTheme #PythonDocsSphinxTheme
Just released: Python 3.14.0 release candidate 3! 🚀🐍
🪄 Finally, the final release candidate
🪄 We fixed *another* bug that required the ".pyc magic number" to be increased
🪄 The ABI isn't changing, and wheels built for rc1 and rc2 should still work
👤 This was the first release @savannah shadowed!
🏆 Please test and report bugs!
https://discuss.python.org/t/python-3-14-0rc3-is-go/103815?u=hugovk
Just released: Python 3.15.0a4 and look at those JIT numbers!
I heard you like alphas?
Just released! Python 3.15.0a5, this time built against `main` from today instead of last month! 🚀
https://discuss.python.org/t/python-3-15-0-alpha-5-yes-another-alpha/105721
By popular demand (@miketheman), pypistats now has a `--sort` option so you can sort by other columns such as date, rather than the default downloads.
Python Tip #153 (of 365):
When you write type annotations, embrace duck typing: annotate with the most general type you can.
Don't require a list if any iterable will do. Don't require a dict if any mapping will do.
Most functions that "accept a list" actually accept any iterable.
Instead of:
def square_all(numbers: list[float]) -> list[float]: ...
Prefer:
from collections.abc import Iterable
def square_all(numbers: Iterable[float]) -> list[float]: ...
🧵 (1/2)
🟣️ Nouveau journal de bord sur le blog !
➡️ https://blog.flozz.fr/2026/06/02/journal-de-bord-1-rencontres-irl/
Le weekend dernier c'était les JDLL à Lyon, je vais donc revenir un peu sur cette édition. Je profite aussi de ce journal pour vous annoncer mon talk au prochain meetup Python lyonnais. 😄️
Want to support the PSF and stock up on #Python books at the same time? The @nostarch Humble Bundle has 15 titles (including Automate the Boring Stuff + Python Crash Course) for just $36. Offer ends June 18th! https://www.humblebundle.com/books/python-good-stuff-no-starch-books
We're looking at parental leave policies across Europe for #TidyTuesday this week!
📊 Small multiple area chart showing maximum job protected leave for parents
🛠️ Made with Plotnine in #Python
Code: https://github.com/nrennie/tidytuesday/tree/main/2026/2026-06-02
But if we use the built-in list function instead, we could make a copy of our list and accept any iterable, not just lists
Read more 👉 https://trey.io/rbi1o4
Python Tip #152 (of 365):
Be consistent about your type annotations: skip them entirely or run a type checker.
An unchecked annotation is really just a comment, and it may be a confusingly incorrect comment. A type checker keeps your annotations honest.
Annotations can add noise to code, but they can also increase correctness.
Half-annotated code that isn't type checked adds visual noise WITHOUT adding the safety of type checking.
🧵 (1/2)
ESP32/MicroPython expert wanted
My company is looking for someone to make a small proof of concept:
Read the data (NDEF) of an NFC tag using (async) MicroPython on an ESP32C3 and a PN532 (or comparable) NFC reader
If you think you can make this proof of concept, contact me for negotiating details.
la prochaine conférence PyConFR, organisée par l' @AFPy aura lieu du 29 octobre au 1er novembre 2026 à Biarritz 🎉 !
https://mamot.fr/@AFPy/116651189914289333
L'appel à interventions est ouvert jusqu'au 31 juillet 2026 : https://cfp.pycon.fr/pyconfr-2026/cfp.
Python Rennes boostedNous sommes ravi·es de vous annoncer que la #PyConFR 2026 se déroulera à Biarritz cette année, à l’école ESTIA BERRI, du 29 octobre au 1er novembre 2026 🐍
Vous avez un talk, un atelier ou un retour d’expérience à partager auprès de la communauté francophone Python ?
Le CFP (Call for Propositions) est ouvert jusqu’au 31 juillet 2026 inclus !
Candidatez ici : https://cfp.pycon.fr/pyconfr-2026/cfp
It's been so long with zero interest that I forgot that my commissions are open on my Kofi. I have mainly game development stuff on there right now. Depending on interest shown from interactions with this post, I may just close them indefinitely. Here's hoping someone likes what I do?Current Commissions Consultation (Game Design, Software Architecture) starting at $10 USD I have a range of supported contexts: Godot, Bevy, C++, Rust, Python, and C#. If what you want isn't on this list feel free to ask, this is just what's off the top of my head. Extra fees for working in closed source and/or on an NDA, both of which prevent me from using the work to boost my portfolio which helps me land more gigs and maybe a job someday. Please use the poll to help me guage interest in the commissions I am offering. It is a multi-select poll so choose all that apply please. Commission List My Itch (for context of games & tech skills): My technical portfolio (that I use for applying to jobs and shit):
For all of my commissions, I recommend talking through what you want first so I can help set expectations and recommendations for which commission item to select (if you are unsure)
Game Modules and Prototyping starting at $15.
| I have $10-15 USD and am interesting in a commission: | 1 |
| I am interested in a commission but do not have enough money: | 1 |
| I have enough money but am not interested in a commission: | 3 |
| I have neither the money nor the interest: | 1 |
| Alternatively, I have the funds and the interest but am not sure how best to commission (I would be happy to chat more: | 1 |
| Alternatively, I have funds and interest in a commission that is not currently offered (comment and tell me what!!!): | 0 |
✍️ New post about a new package, django-integrity-policy, for setting the new Integrity-Policy security header.
https://adamj.eu/tech/2026/05/31/introducing-django-integrity-policy/
“Normally, classes store their attributes in a dictionary called __dict__.”
Read more 👉 https://pym.dev/__slots__/
Python Tip #151 (of 365):
For truly unpredictable randomness, use the secrets module
Python's random module relies on pseudo-randomness, meaning it generates numbers in a predictable order. If someone can guess the random "seed" (it's based on the current time) they can predict the numbers produced.
For true randomness, use Python's secrets module instead.
🧵 (1/3)
🐍 Paolo shares his favorite memory from his very first EuroPython back in 2011 in Florence. Meeting the Django community changed the course of his career forever! 🚀 What was your first EuroPython experience like? Let us know below! 👇 #EuroPython #Python #Django
I’d like to announce the most unlikely #Python package release:
service-identity 26.1.0, the best way to verify if a certificate is valid for a hostname, IP, or URI is out!
The main change is that we were able to switch from pyasn1 (thank you for more than a decade of great service! 🫡💛) to do everything within PyCA's cryptography.
https://github.com/pyca/service-identity/releases/tag/26.1.0
Si j'arrive à faire marcher ce truc, je crois que je serai heureux comme un pape ... https://ubuntuhandbook.org/index.php/2025/06/one-click-turn-linux-second-monitor/ #linux #gnome #networking #display #opensource #python
The other day I "heard" someone mentioning `niquests` as a replacement for `requests`:
https://pypi.org/project/niquests/
"It is a drop-in replacement for Requests, which is under feature freeze [...] is the “Safest, Fastest[^10], Easiest, and Most advanced” Python HTTP Client"
Meanwhile `requests` made a release after. Is this some kind of typosquatting? What do we know about `niquests` real reason to fork and/or reimplement?
Every terminal debugger forces a choice: a REPL with full evaluation power but no source context, or an editor with visual breakpoints but a crippled debug console. dap-mux removes the need to choose.
Connect your editor and your REPL to the same debug session. Both are first-class clients. Neither knows the other is there.
Ships with an IPython frontend. Speaks standard DAP — any language, any editor. This is the very first release. There's so much work to do.
github.com/dap-mux/dap-mux
#Python #debugging #Helix #neovim #IPython
Python Tip #150 (of 365):
When you need to pick a random item, use random.choice
You might be tempted to use random.randrange for selecting random items from a list by their index, but there's a better way!
To pick a random item any sequence, use random.choice:
>>> import random
>>> random.choice(["red", "green", "blue"])
'green'
“Indexing isn't bad, but there's often a higher level way to accomplish a goal than using an index.”
Read more 👉 https://pym.dev/avoid-indexes-in-python/
Another Italian-language talk this morning at PyCon Italia 2026 🇮🇹🐍
This time I’m following Luca Di Vita, co-founder of @pescara together with me, as he takes the audience on a journey from derivatives and differential equations to Neural ODEs and continuous neural networks.
It’s always nice to see local community members sharing their expertise on stage, especially on topics that combine mathematics, machine learning, and research ✨
At #PyConItalia, @cheukting_ho is telling us about free-threaded #Python. Since the screenshot was taken, we're now up to 208 / 360 of the top PyPI packages ready for free threading! 🚀🧵
https://hugovk.dev/free-threaded-wheels/
#PyConIT
One thing I always appreciate about PyCon Italia is that part of the schedule is in Italian, making the conference accessible to people who may not be comfortable following talks in English 🇮🇹🐍
This morning I’m attending Juna Salviati’s talk, “L’essenziale è invisibile agli occhi (ma non a Python)”, an introduction to steganography and the art of hiding messages in plain sight. Very interesting topic and a great example of how broad the Python ecosystem can be ✨
anybody here using niquests or, even better, urllib3.future? The projects look pretty sweet and like straight upgrades, have they been stable and good to use in your experience?
https://niquests.readthedocs.io/en/latest/ and https://urllib3future.readthedocs.io/en/latest/
Ohlala, encore du code ésotérique ...
C'est très rigolo, et très bizarre en même temps. https://susam.net/elliptical-python-programming.html #python #programming #bizarre
@pycon @BajoranEngineer @djangoconeurope Dawn’s keynote was a great way to close the second day of PyCon Italia 2026.
The talk sparked lots of questions from the audience, and the discussion could probably have continued much longer.
To wrap up the session, we took a final selfie together on stage before bringing the second day of the conference to a close.
Python Tip #149 (of 365):
Sort by specific attributes with operator.attrgetter.
Have an iterable of dataclasses, namedtuples, or some other record-like object?
Want to sort them by a specific attribute?
Use operator.attrgetter:
from operator import attrgetter
For example, if we had an iterable of Book objects that have a title attribute, we could sort them by that:
sorted_books = sorted(books, key=attrgetter("title"))
🧵 (1/2)
Closing the second day of @pycon 2026 as talk manager for @BajoranEngineer keynote.
After a long day, I’m tired but genuinely happy to help Dawn on stage. Years ago, she helped me when I gave my first talk abroad at @djangoconeurope 2019 in Copenhagen. It feels special to return the favour.
Her keynote, "Stop Being a Generalist", explores why going deep on a domain can be more valuable than trying to do everything.
This afternoon after lunch at @pycon 2026 we gathered for a community photo with many local Python groups from across Italy.
From @pycatania to @pybari , Campania @pescara , Marche, @pyvenice , Turin, @pythonmilano , Genoa, @pbg and the newest community joining the network, like Salento, it was great to see so many people representing local Python communities in one place.
The @pythonitalia community keeps growing. 🐍🇮🇹
I'm also helping Jonathan Ehwald as talk manager for his session at PyCon Italia.
Jonathan is presenting "What I learned migrating @FastAPI & Friends to uv", sharing lessons learned while migrating FastAPI, Typer, SQLModel and other projects to uv.
As someone who maintains libraries himself, it's great to hear practical advice from somebody who has already done the migration work at scale.
Today I'm helping my friend Piero Savastano as talk manager at PyCon Italia.
Piero is presenting his talk in Italian, "Stregatto 2.0", about Cheshire Cat AI, an AI agent framework born in Italy and released under the GPL license.
He brings a lot of energy to the stage: moving around the room, engaging the audience, asking questions, and throwing Cheshire Cat t-shirts to people with the right answers.
Today I'm helping my friend @carlton present his talk "Static Islands, Dynamic Sea" at PyCon Italia 2026.
We've known each other for years through Django, and we're currently co-organising Django on the Med together.
Former @django Fellow, maintainer, and co-host of @Djangocha, Carlton is exploring how typing can add safety where needed while keeping Django's dynamic nature intact.
Day 2 of PyCon Italia 2026 has started! ☕🐍
After a social evening that ended a little later than planned, we're back in the keynote room this morning with Diego Russo talking about the evolution of CPython performance.
It's always a pleasure to see friends from the Python community on stage, especially when the topic is how Python itself keeps getting faster release after release.
A strong start to the second day of the conference. 🚀
The day started with the annual @pythonitalia members' meeting. 🇮🇹
It's always a good opportunity to hear about what's happening across the Italian Python community, discuss ongoing initiatives, and help shape what comes next. 🐍
“When you print to the terminal in Python, by default, your output goes to standard output.”
Read more 👉 https://pym.dev/standard-error/
For an hour we walked through streets, squares, and porticoes while discovering the history of a city with more than two thousand years of history and home to the world's oldest university, where I had the pleasure of studying 😊
This afternoon, after the closing keynote, around sixty PyCon Italia participants joined a guided tour through the historic centre of Bologna.
This afternoon I had the pleasure of introducing @sarahboyce keynote at @pycon 2026 🐍
Her talk, “Django has a marketing problem”, tackled some old myths about Django and reminded us that, after 20 years, it is still modern, fast, and actively developed.
As someone involved in the Django community, it was a real pleasure to welcome Sarah on stage 💚
Python Tip #148 (of 365):
Sort by specific sequence items with operator.itemgetter.
Have an iterable of sequences (tuples, lists, etc.)?
You can sort them by one or more of their indexes using itemgetter from Python's operator module.
from operator import itemgetter
For example, say we have CSV rows:
rows = list(csv.reader(file))
And we want to sort these rows by their second column.
We can do this:
sorted_rows = sorted(rows, key=itemgetter(1))
🧵 (1/2)
Just finished presenting my talk at PyCon Italia 2026: “Django GeneratedField by Example” 🐍
The schedule was a bit tight, but somehow we still managed to get through all the questions after the talk 😄
Thanks to everyone who joined the session, asked questions, grabbed Django on the Med stickers, or adopted one of the small 3D-printed Python Pescara keychains 🐬
Now time to finally breathe a little before the next hallway conversation starts ☕️
borgstore 0.5.0 was just released!
borgstore is a general purpose key/value store with some nice features, supporting misc. backends (local fs, sftp, REST https, s3, rclone).
it now supports optional caching (usually via an additional posixfs caching backend).
Right now I’m helping Francesco Bruzzesi present his talk “Narwhals: One dataframe API to run them all” as talk manager here at PyCon Italia 🐍
Even if Francesco is already a very experienced speaker, it’s always nice helping behind the scenes with the setup, timing, microphones, questions from the audience, and all the small details that help a talk flow smoothly.
Lots of interest around the Python dataframe ecosystem right now 📊
#TIL #jinja2 expression have no operator precedence, so `{{ ['z'] + ['a', 'b'] | sort }}` gives `['z', 'a', 'b']` and not `['a', 'b', 'z']`.
See also https://github.com/pallets/jinja/issues/119 14yo
L’équipe Entr’ouvert s’agrandit encore : nous recrutons un·e développeur·euse Python/Django.
Consultez l'offre et candidatez avant le 7 juin : https://www.entrouvert.com/actualites/2026/embauche-developpeureuse-python-django-2026/
RE: https://mastodon.social/@raffaellasuardini/116651793485587192
Lots of good practical advice in here from @foosel,
https://securitytxt.org is a new one to me.
#Python #security
Le petit plus #fediverse :
**: non, ce n'est pas vrai, mais si je ne le dis pas, ils vont me tomber dessus :-p
L’équipe Entr’ouvert s’agrandit encore : nous recrutons un·e développeur·euse Python/Django.
Consultez l'offre et candidatez avant le 7 juin : https://www.entrouvert.com/actualites/2026/embauche-developpeureuse-python-django-2026/
The first keynote of the first day at PyCon Italia 2026 has just started 🐍
Right now Merve Noyan from Hugging Face is walking through the current state of open-source multimodal AI, from vision-language models to agents and OCR tools 👀
A very packed room for a topic that feels increasingly close to everyday developer workflows lately 🤖
PyCon Italia 2026 has officially started 🐍
The opening by Valerio and Sara walked everyone through the whole PyCon Italia opening: talks, lightning talks, social events, community spaces, and all the practical details around the conference.
We also received an important introduction to one of the key local topics in Bologna: the difference between tortelli and tortellini 🍝🙂
After cooling down from the intense heat with a swim in the hotel pool, we treated ourselves to a very typical Bolognese dinner near the hotel 🍝✨
Then one last round of chats at the hotel bar before the night ended.
Days at @pycon always become very long, and somehow nobody ever seems to want to go to sleep 😄
Next stop: the official start of the conference tomorrow morning 🐍
eeyyyyyy fellow python spice enjoyers, what would you say is more "readable" / straight-forward for a nested dictionary creation/update scenario?
a = {}
b = "pumpkin"
c = "spice"
if b in a:
a[b][c] = True
else:
a[b] = {c: True}vsa = {}
b = "python"
c = "spice up ya life"
a.update({b: {c: True}})Assume it will be read by non-python experts, as well, but that visually things are getting a little cluttered so maybe condensing some things would be nice...
#python #pythonQuestionsAdvice for new #Python learners: break the habit of starting every for loop with `for i in`: there is probably a much better name for your iteration variable than `i`.
Python Tip #147 (of 365):
Sort by unbound method objects instead of using "lambda" 🧵
Say you're sorting mixed capitalization strings:
>>> frameworks = ["jQuery", "React", "Alpine", "htmx", "Svelte"]
>>> sorted(frameworks)
['Alpine', 'React', 'Svelte', 'htmx', 'jQuery']
You could case-normalize with a key function that calls casefold on each string:
>>> sorted(frameworks, key=lambda s: s.casefold())
['Alpine', 'htmx', 'jQuery', 'React', 'Svelte']
Or...
🧵 (1/3)
Thanks to @sethmlarson we have a new CPython security policy.
I like how it starts:
"Python Security Response Team (PSRT) members balance this work against many other responsibilities. Please be thoughtful about the time and attention your report requires. Repeated failure to respect the security policy will result in future reports being rejected, or the reporter being banned from the python GitHub organization, regardless of technical merit."
https://devguide.python.org/security/policy/
#Python #security
I'm looking for a job!
Do you need someone who can do:
Contact me!
https://lexbailey.me/
#getfedihired #jobsearch #softwareengineering #formalverification #formalmethods #rust #rustlang #c #python
@nedbat Can you really claim to support recent Python versions if you don't have 3.16 in your classifiers?
https://github.com/coveragepy/coveragepy/blob/eb55feedf54b363e3d0b678f20abf3bfd3551a88/setup.py#L68-L73
Newly public screencast on randomness in Python.
The most common function I use from #Python's random module is the choice() function.
Also, when I need randomness for something security-sensitive, like a password, I do NOT use the random module.
More on the random module in tomorrow's Python tip email.
Python Tip #145 (of 365):
To sort by specific features of an iterable of objects, use a key function.
For example, we could sort strings by their lengths:
>>> colors = ["yellow", "blue", "green", "purple"]
>>> sorted(colors, key=len)
['blue', 'green', 'yellow', 'purple']
A key function can be any callable that can accept each object from the iterable and return a "key" for each.
This all works because functions are objects (recall tip 34).
🧵 (1/2)
Python Tip #146 (of 365):
Don't use sorted to find the largest/smallest item(s).
Have an iterable of items and need the largest/smallest ones?
>>> numbers = [47, 199, 123, 275, 29, 123, 18, 76, 76, 351]
Unless you need every item in sorted order, you probably don't need to sort your iterable.
You can use the max function:
>>> max(numbers)
351
To get the smallest value, you can use min:
>>> min(numbers)
18
🧵 (1/2)
Convert csv to wikimedia table format with #Python
#!/usr/bin/env python3
import csv,sys
r=csv.reader(open(sys.argv[1]) if len(sys.argv)>1 else sys.stdin)
print('{| class="wikitable"')
for i,row in enumerate(r):
print('|-')
print(('!' if i<1 else '|')+' || '.join(row))
print('|}')
Sortie de Tryton 8.0 https://linuxfr.org/news/sortie-de-tryton-8-0 #Bureautique #cadriciel #gestion #tryton #python #erp
Are you a #python package maintainer and looking for funding? Read the Docs allows you to collect funds via EthicalAds. And now if you'd like, you can route that directly to the #Django Software Foundation
https://www.better-simple.com/django/2026/05/24/using-read-the-docs-to-benefit-django/
The django debug toolbar has been sending money to the DSF for a year now. Major thanks to @readthedocs for making this possible!
Python Tip #145 (of 365):
To sort by specific features of an iterable of objects, use a key function.
For example, we could sort strings by their lengths:
>>> colors = ["yellow", "blue", "green", "purple"]
>>> sorted(colors, key=len)
['blue', 'green', 'yellow', 'purple']
A key function can be any callable that can accept each object from the iterable and return a "key" for each.
This all works because functions are objects (recall tip 34).
🧵 (1/2)
Happy to announce the 0.18 release of Poezio, a terminal XMPP messaging client.
This new release brings better compatibility with python 3.15, Message Retraction support, a new way of showing or hiding groupchat presences, and a lot of typing!
A more detailed changelog is available on my blog:
https://blog.mathieui.net/poezio-0-18.html
#poezio #python #slixmpp #XMPP #Jabber
Last week I was in Long Beach for @pycon 2026 🌴🐍
Beyond my talk, the best part as always was meeting people from all across the Python community: hallway conversations, old friends, new friends, selfies, tacos, and many unexpected moments ✨
I collected the live posts and photos I shared during the conference into a small timeline on my blog 🙂
Python Tip #144 (of 365):
To suppress specific exceptions, use contextlib.suppress.
You could suppress an exception like:
try: ...
except ValueError: pass
But I would recommend:
from contextlib import suppress
with suppress(ValueError): ...
contextlib.suppress more clearly indicates "we're deliberately suppressing an exception" instead of "we got lazy while exception handling".
You should ALSO always ask yourself, "should I actually BE suppressing this exception?"
gh-profiler 0.6.2 no longer flags users whose only issue is having a newer account. If all other flags are green, the account age flag is adjusted back to green.
This avoids discouraging people who are excited to contribute to open source, and immediately see a red or yellow flag when they're profiled.
Python Tip #143 (of 365):
Re-raise exceptions deliberately
When you need to re-raise an exception, you have 2 options:
1. Use a bare "raise" statement
2. Use "raise" with a "from" clause
🧵 (1/3)
#GetFediHired Our team at Fable is looking for a Staff Software Backend Engineer (10 years+) familiar with #python and #django in one of various US cities, Canadian cities, or Mexico City.
https://jobs.ashbyhq.com/ScribdInc/450391bf-4fb2-4fae-9acd-96851c7e82e3?utm_source=BDVAEvOEqo
Tuple unpacking allows us to give names to values that would otherwise only be referenced by an index.
Read more 👉 https://trey.io/nb3z3t
📰 Issue 338: Django 6.1 alpha 1 released
https://django-news.com/archive/issue-338-django-61-alpha-1-released/
This afternoon I had the honor (and honestly a lot of fun) recording an episode of @talkpython with @mkennedy 🎙️
We met last week at @pycon 2026 in Long Beach after my talk "AI-Assisted Contributions and Maintainer Load", and he invited me to continue the conversation on the podcast I’ve listened to for years 🎧
At the end we even had to take a screenshot together because we couldn’t take a proper selfie 📸😂
Live recording here: https://www.youtube.com/watch?v=1RJ1kkpTdow
Python Tip #142 (of 365):
Be specific when handling exceptions
Unless you're specifically trying to catch all possible exceptions (often for the purpose of logging them) I HIGHLY recommend being as specific as possible when handling exceptions.
In your "except" block, catch only the specific types of exceptions you intend to handle.
🧵 (1/2)
“The _ variable (if not deliberately set) will hold the value of the previously run statement, if there is one:”
Read more 👉 https://pym.dev/repl-features/
Little change we just made to the https://docs.python.org/3/ homepage:
The table on the front is no longer an HTML <table>, but <ul> lists with CSS to make it a grid.
That's because a <table> should be used for tabular data and not layout.
This improves accessibility, and also looks better as a list on mobile instead of a squashed table (compare https://docs.python.org/3.12/).
Python Tip #139 (of 365):
Use assert statements for yourself but exceptions for your users.
And "users" INCLUDES other Python programmers who are using your code function/class/etc.
When you need to ensure a precondition is met, start with assert:
assert len(character) == 1
If that condition is possible in real code, graduate to "if" with "raise":
if len(character) != 1:
raise ValueError("'character' must be a string of length 1")
🧵 (1/2)
Python Tip #141 (of 365):
Don't use bare "except" clauses
Instead of this:
try: ...
except: ...
Do this:
try: ...
except Exception: ...
Or this:
try: ...
except BaseException: ...
If you need to catch EVERY exception either use:
1. "except Exception" (excludes system-exiting exceptions)
2. "except BaseException" carefully (catches system-exiting ones too)
Note: BaseException will catch the exception raised by the user hitting Ctrl+C as well as sys.exit calls.
Hey, Mastodon! My team at Scribd is hiring a Senior Backend Engineer. #RubyonRails & #Python onto the Publisher Content Management team.
https://jobs.ashbyhq.com/ScribdInc/df3f9e47-6df4-4ae6-be4a-cba1de5a36de?utm_source=JaP91bA8Dv
Python 3.15 apparently includes symmetric difference support for collections.Counter.
It's a niche feature but it's one I've needed in real code before (albeit only once so far).
This apparently happened because I started a Discourse thread about it.
Requesting a feature can serve as validation that at least one other person has thought of it and wanted it in real code. It apparently did in my case!
gh-profiler 0.5.1 includes a number of bug fixes and small updates: better formatting, don't include private activity when profiling yourself, avoid yellow flags for having a small number of identical issues, support Python 3.10.
If you know someone is doing OSS in good faith and profiling them shows yellow or red flags, please consider opening an issue. It will take a little while to settle on appropriate criteria and thresholds.
Improving Accessibility in JetBrains IDEs: What’s New and What’s Next in 2026
#Python #Pycharm #News #Accessibility
The guidelines for using AI tools when contributing to CPython has just been updated. Must read whether you're an existing or aspiring contributor.
tl;dr: you're still responsible for what you submit.
Tell everybody you know!
https://devguide.python.org/getting-started/ai-tools/
#Python
Python Tip #140 (of 365):
Embrace EAFP (it's Easier to Ask Forgiveness than Permission) in Python
This is in contrast to Look Before You Leap, which we DO use, but a bit less often than in many other languages.
EAFP: https://pym.dev/terms/#EAFP
LBYL: https://pym.dev/terms/#LBYL
We use EAFP more often in Python because it makes duck typing easier. Instead of trying to ask whether seems to be a duck, we just treat it like it is and handle the exception if it isn't.
🧵 (1/3)
Django 6.1a1 is out 🎉 💚 I'm really happy and proud that database-level delete options for ForeignKey.on_delete (which we implemented during Django on the Med 🏖️ ) are one of the highlights of this release 💪 🤝 #django #djangoonthemed #sprint #python
https://www.djangoproject.com/weblog/2026/may/20/django-61-alpha-1-released/
My employer just announced a "strategic partnership" with Anthropic so I think it's time to try and get #FediHired. I'm a software engineer with 20 years of experience. I consider myself a #Python genralist and also have experience in embedded C (though I haven't done much C in the past few years).
And by "overwhelming" I mean: that one tag contributes over a hundred posts per day to my feed. Maybe that’s not overwhelming for you, but along with everything else, for me it is. #Python
I follow the #Python tag, and that alone makes my feed overwhelming. I do not yet have a strategy for narrowing it down to only the most valuable content. Suggestions, of course, welcomed!
RE: https://mastodon.social/@jonafato/116606614638510514
It only takes an email with a paragraph or two!
Python Tip #139 (of 365):
Use assert statements for yourself but exceptions for your users.
And "users" INCLUDES other Python programmers who are using your code function/class/etc.
When you need to ensure a precondition is met, start with assert:
assert len(character) == 1
If that condition is possible in real code, graduate to "if" with "raise":
if len(character) != 1:
raise ValueError("'character' must be a string of length 1")
🧵 (1/2)
Just arrived back home after a long and tiring trip ✈️
But it was absolutely worth it. PyCon US 2026 was an intense week full of talks, keynotes, hallway track conversations, and so many encounters with people from the community.
As always, the best part of conferences for me is the people and the chance to create more connections around open source and Python.
Thanks everyone 💚
Hope to see some of you at PyCon Italia 🙂
Python Tip #138 (of 365):
Use try-except to see whether a particular import exists
Need to see whether a third-party library is installed or whether a newer standard library module or feature exists?
You can attempt an import and catch an ImportError to fallback to the "apparently it's not available" path.
For example, if you customize the color scheme of your Python 3.14 REPL, in your PYTHONSTARTUP file you might have something like this...
🧵 (1/2)
@webknjaz @MaggieFero And here's the video of the EuroPython keynote from Antarctica in 2018!
"White Mars: living far away from any form of life"
https://www.youtube.com/watch?v=9s0AUlyIbUU
#EuroPython #Python #Antarctica
Does #python have as standard something similar to a dict but where keys are a regex (or other pattern) that is matched on lookup?
We have a very unique keynote this year: Guido van Rossum - the creator of Python - will be the guest on an episode of the https://core.py podcast, recorded live from the conference stage by @ambv and Pablo Galindo Salgado!
🎫 Grab your ticket for EuroPython 2026, it’s going to be epic: https://ep2026.europython.eu/tickets/
Can’t wait to see you all in The City of Castles and Dragons!
#europython #conference #europython2026 #python #opensource #community
The PSF's PyPI Safety and Security Engineer, @miketheman, is giving a keynote at OpenSSF Community Day this Thursday! "Anatomy of a Phishing Campaign" is a deep dive into the 2025 PyPI phishing attack, how it worked, and what stopped it.
Thu May 21 @ 9:20am CDT 👉 https://openssfcdna2026.sched.com/event/2I44z
#Python #PyPI #SupplyChain #Security
https://openssfcdna2026.sched.com/event/2I44z
Listening to the Python Steering Council panel with Barry Warsaw, Donghee Na, Pablo Galindo Salgado, Savannah Ostrowski and Thomas Wouters at PyCon US 2026 🐍
One of those moments where you remember how much invisible work, discussion and coordination happens behind Python itself.
Currently following the final keynote of @pycon 2026 🚀
Really happy to see @Rachell and @CodenameTim on stage talking about @djangonaut , a project I’m personally very connected to and that I also had the chance to participate in.
It’s great to see a keynote focused on mentorship, inclusion, sustainability, and helping more people become long-term contributors and community leaders in open source ✨
Python Tip #137 (of 365):
You can SORT OF slice non-sequences
Iterables that aren't sequences (like iterators) don't support Python's slicing syntax, but you can accomplish something similar with itertools.islice or collections.deque.
🧵 (1/2)
I just attended the “PSF - Update from our Security Engineers” session at @pycon 2026 🔐
@miketheman and @sethmlarson were both excellent presenters: funny, clear, and very informative at the same time.
It was great to hear more about the huge amount of work happening behind the scenes to improve the security of Python, @pypi and the @ThePSF infrastructure ✨
A few folks from the #PSF and #JetBrains will be hosting an openspace about the #Python Developers Survey. If you have opinions, we want to hear them
Room 102C | 10 a.m. - 11 a.m. @ #PyConUS
https://us.pycon.org/2026/schedule/open-spaces/#OpenSpace-28
Sitting in the keynote room at PyCon US 2026 listening to @amcasari 🎤
The way she moves through topics like complexity, socio-technical systems, and the unexpected behaviors that emerge from them makes the whole room follow along naturally.
Really enjoying the examples and the direction of the talk so far. 🐍
CC @pycon
💬 The Python Developers Survey: What Would YOU Ask?
Join us for this Open Space session today at #PyConUS 2026:
📍 Room 102C
🕙 10-11 AM
Come share your ideas and feedback on how the Python Developers Survey can become more community-driven and collaborative!
#PythonDeveloperSurvey #Python
https://us.pycon.org/2026/schedule/open-spaces/#OpenSpace-28
@nedbat Can you really claim to support recent Python versions if you don't have 3.16 in your classifiers?
https://github.com/coveragepy/coveragepy/blob/eb55feedf54b363e3d0b678f20abf3bfd3551a88/setup.py#L68-L73
This afternoon, before the Expo Hall closed, we took a big group photo together at the Django and Djangonaut Space booth 📸✨
Django Fellows, Steering Council representatives, DSF members, volunteers, contributors, and community participants all joined together.
Guido van Rossum also stopped by and shared kind words about Djangonaut Space and the constant work the Django community brings into the wider Python ecosystem 🙂
After lunch I joined the “Community Organizers Unite!” open space at PyCon US 2026 ✨
It was really interesting to connect with organizers from conferences, meetups, and other technical communities, and exchange stories, ideas, and experiences around community building.
One of those sessions where you leave with many new thoughts and contacts 🙂
The Four Horsemen of the LLM Apocalypse https://anarc.at/blog/2026-05-16-four-horsemen #llm #analysis #sysadmin #copyleft #copyright #debian-planet #python-planet #internet #linux #security #kernel #software #vulnerability #free-software
I just attended the PSF Member Lunch at PyCon US 2026 🍽️
It was really interesting to hear the updates and reports from the PSF and PyCon US organizers.
I also enjoyed the Q&A session afterwards and the chance to stay around talking with other participants and sharing experiences from the community ✨
Black 26.5.0 is out supporting Python 3.15! Now you can format code with the `lazy` keyword (PEP 810), and unpacking in comprehensions (PEP 798) 🚀
https://github.com/psf/black/releases/tag/26.5.0
#Black #Python #Python315 #PEP810 #PEP798
Python Tip #136 (of 365):
Wrap iterators in iterators for VERY lazy looping
Have a file object? That's an iterator.
You can process it lazily with a looping helper.
You can wrap that in a generator expression if you want.
Lazy iterables wrapping lazy iterables makes for nicely-chunked (hopefully) work while keeping your code efficient.
One of the funniest moments in Pablo Galindo’s keynote this morning was realizing that several slides were almost identical to some I used yesterday in my talk about AI-assisted contributions and maintainer load 😄
Completely different talks, prepared independently, and yet we both referenced the same stories from projects like Matplotlib and Godot.
I guess many maintainers across open source are currently running into very similar problems at the same time.
Currently following Pablo Galindo’s keynote at PyCon US 2026 🎤
It’s the first keynote in Spanish at PyCon US, and even as an Italian speaker I’m able to follow most of it surprisingly well 🙂
Pablo is giving a keynote that is both very interesting and genuinely funny, while talking about the life of open source maintainers and the changing world around them.
CC @pycon
Currently following the D&I panel at PyCon US 2026: “Python is for Everyone — Growing the Community Without Limits” ✨
Really interesting discussion around community building, inclusion, education, and local Python communities from different parts of the world.
Panel with Débora Azevedo, Alla Barbalat, Georgi Ker, Theresa Seyram Agbenyegah, and Abhijeet Mote.
#PyConUS #Python #Diversity #PyLadies #OpenSource #DjangoGirls
CC @pycon @ThePSF @georgically @pyladies @pyladiescon @djangogirls
Thank you @samdoran 🙂 hearing that means a lot to me.
I had the feeling during the conference that this topic has been weighing on many people in open source for quite some time, so I’m really happy the way I approached it resonated with you. 😊
I hope to continue discussing it with more people across the community, and in the meantime I’ve shared the slides from the talk on my website ✨
https://www.paulox.net/2026/05/15/pycon-us-2026/#1
This morning at PyCon US 2026 I presented my talk about AI-assisted contributions and maintainer load 🎤
Thanks to everyone who joined the session. It was a really great experience, and I had many interesting conversations afterwards.
Also thanks to @simon for hosting the AI track, the first one at PyCon US ✨
I’ve already uploaded the slides to my personal website for anyone who couldn’t attend the talk.
https://www.paulox.net/2026/05/15/pycon-us-2026/
The “Open Source Maintainer Security Forum” Open Space will be in Room 202C at 3PM today 🐍🛡️
If you’re a project maintainer and want to discuss security, how to keep your project secure, or how to handle vulnerability reports: come and find us! 👋
👉 https://us.pycon.org/2026/schedule/open-spaces/#OpenSpace-43
#Python #PyCon #PyConUS #PyConUS2026 #security #oss #opensource
Python Tip #135 (of 365):
Embrace the infinite
Remember that infinite iterables are possible in Python.
itertools.count() is like an infinite range().
itertools.repeat() and itertools.cycle() are like infinite self-concatenation.
🧵 (1/3)
RE: https://tech.lgbt/@skimbrel/116579499717899668
"Python 3.15.0 is in beta 1! And, it's the most colourful Python yet!"
🎨
Receipts:
"More color in argparse, ast, calendar, difflib, http.server, pickletools, PyREPL tab completion, python –help, sqlite3, timeit, tokenize, unraisable exceptions and stdlib (ast, compileall, doctest, gzip, inspect, json.tool, pdb, profiling.sampling, random, regrtest, sqlite3, timeit, tokenize, trace, unittest, uuid, zipapp, zipfile) CLI help."
https://docs.python.org/3.15/whatsnew/3.15.html#whatsnew315-more-color
Today at 11:00 AM I’ll be speaking at PyCon US in Grand Ballroom A about AI-assisted contributions and the impact they are already having on open source maintainers 🎤
Really curious to hear how other people in the community are experiencing this shift in practice and discuss it after the talk.
🔐 Catch PSF's PyPI Safety and Security Engineer, @miketheman, talking Trusted Publishing at #OSSummit next week! Learn how to eliminate long-lived credentials from your #PyPI release workflow: no tokens, no secrets, just secure deploys. Tue May 19 @ 11am CDT #Python #SupplyChain #Security
https://osselcna2026.sched.com/event/2JQsc
Python Tip #134 (of 365):
Use looping helpers
Python's "for" loops are simple: they loop over an iterable one item at a time.
That's all they can do.
Because our "for" loops are so simple and iterable-centric, looping helpers are a VERY big deal in Python.
We use enumerate to count upward while looping, reversed to loop in the reverse direction, and zip to loop over multiple iterables at the same time.
🧵 (1/2)
After 20 hours of traveling, I finally arrived at the hotel in Long Beach for the conference 🌍
Already met a few friends, took some selfies, and had a first quick look around the city.
So far, Long Beach looks really beautiful ☀️
Selfie with @Rachell, Natalia Bidart, @bmispelon, @CodenameTim, and @pythonbynight
#PyConUS #PyCon #PyConUS2026 #Python #OpenSource #Community #Conference #US
La prochaine #PyConFR sera à Biarritz !
https://linuxfr.org/users/chadys/liens/la-prochaine-pyconfr-sera-a-biarritz
Si votre boite ou si vous connaissez une boite qui peut sponsoriser une conférence #Python, #need
Speaker spotlight: Felipe Moreno: "How Translations Work" - Maintainers Summit
Most OSS projects say they want to be welcoming to a global community. Far fewer have actually figured out the translation pipeline, how you avoid the "half-translated forever" problem.
Felipe is going to walk through how it actually works, in enough detail to take back to your own project.
🕥 2:10 PM, Saturday, May 16, Room 201A
RE: https://mastodon.social/@bagder/116566403633172153
#Python has been reproducible since October 2023 (Python 3.12.0)
https://sethmlarson.dev/security-developer-in-residence-weekly-report-14
"Packages that can't be rebuilt byte-for-byte are now blocked from entering Debian's testing branch."
https://itsfoss.com/news/debian-makes-reproducible-builds-mandatory/
Python Tip #133 (of 365):
Beware of containment checks on iterators
Membership checks will consume iterator items and can completely exhaust them.
Using "item in my_generator" will loop over my_generator, consuming items from it until a matching one is found. If you need to loop again, you'll start from where you left off.
One of my strong suites in all the packaging work is the knowledge in my head.
"Why don't you write it down for others to benefit from, then?", you'd ask.
The thing is, this knowledge is basically "hot cache". I'm bumping hundreds of #Python packages in #Gentoo, so I remember stuff. And because of that, I can quickly notice some things or answer some questions.
If that were written down, the effort needed to find it would diminish all the gain. I mean, technically *it is* already written down, and the whole point is that I have it "cached".
On my way to Los Angeles from Rome ✈️
See you all there in only 12 hours 👋
#PyConUS #PyCon #PyConUS2026 #Python #OpenSource #Community #Conference
RE: https://fosstodon.org/@pycon/116538489589981492
This talk from @andrewnez grows more and more important as the days go on... it's a must watch!
Python Tip #132 (of 365):
Know your iterator concepts.
Items are "consumed" from an iterator as you loop over it.
And iterators can be "exhausted" if their items have all been consumed.
But not all iterators CAN be exhausted. Infinitely long iterators do exist.
🧵 (1/2)
Lyon: Excursion dans le monde des microcontrôleurs, Le lundi 18 mai 2026 de 19h00 à 21h00. https://www.agendadulibre.org/events/35113 #python #micropython
RE: https://fosstodon.org/@ThePSF/116521504644649677
We've still got some volunteer shifts open at the PSF Booth (and other shifts across the conference)! Our shifts take a little bit of work but they include a LOT of fun and connections with other folks in the #Python community 🤝🤩 Sign up today via the #PyConUS website: https://us.pycon.org/2026/volunteer/volunteering/
Joining #PyConUS 2026? PSF booth volunteers WANTED!! Spend a little of your conference time helping things run smoothly at the PSF Booth (or other volunteer opportunities!), hang out with fellow Pythonistas, and enjoy the fun activities we have planned (coloring & video games included) 💛🐍💙 https://us.pycon.org/2026/volunteer/volunteering/
Congratulations to the newest PSF Community Service Award recipients!
Inessa, Kafui, Kalyan, Maria, and @pauleveritt have each made lasting contributions to the Python community. From conferences to founding initiatives to education worldwide, their service to the community deserves recognition and celebration!
https://pyfound.blogspot.com/2026/05/announcing-psf-community-service-award.html
The May 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 receive your questions and feedback about the ongoing strategic planning at the PSF! #python
https://pyfound.blogspot.com/2025/10/a-new-psf-board-another-year-of-psf.html
Sortie de Crème CRM en version 2.8 https://linuxfr.org/news/sortie-de-creme-crm-en-version-2-8 #gestion_relation_clients #Commercial #cremecrm #python #django #crm
Le nombre de téléchargements sur pypi.org est vraiment effrayant !
Oui on parle de ~140 milliards de téléchargements par mois, contre ~40 milliards il y a 2 ans.
They say you're supposed to scratch your own itches, so here's my take on a printer-friendly version of the #PyConUS 2026 schedule:
https://snoopj.dev/files/PyConUS_2026_printable/
My target here is to fit one day on a double-sided landscape 8.5x11" (on my browser/printer) and it just about squeezes down this way.
Python Tip #131 (of 365):
Know the difference between iterables and iterators.
Python programmers sometimes say "iterator" when they mean "iterable".
These terms are NOT interchangeable.
Any objects that you can use a "for" loop to loop over is an iterable.
Iterators can be passed to the built-in next() function. Arbitrary iterables cannot be passed to next(). Only iterators can be.
But all iterables can be passed to iter() to get an iterator from them.
🧵 (1/2)
The PSF is excited to share that the PSF Board is developing a five-year strategic plan–and we want to hear from you! We're sharing the high-level goals we’ve drafted and welcoming the whole Python community into the conversation. Read more on our blog: https://pyfound.blogspot.com/2026/05/strategic-planning-at-psf.html
#Python #PyPI
https://pyfound.blogspot.com/2026/05/strategic-planning-at-psf.html
RE: https://fosstodon.org/@ThePSF/116555573783540910
The PSF Board has been developing a strategic plan and today we're sharing the high-level goals for community feedback. Full draft with detailed objectives follows in June.
This plan will shape how the PSF spends its resources for the next five years. If Python is part of your world, we'd love to hear from you.
The PSF is excited to share that the PSF Board is developing a five-year strategic plan–and we want to hear from you! We're sharing the high-level goals we’ve drafted and welcoming the whole Python community into the conversation. Read more on our blog: https://pyfound.blogspot.com/2026/05/strategic-planning-at-psf.html
#Python #PyPI
https://pyfound.blogspot.com/2026/05/strategic-planning-at-psf.html
There are a couple of ways to share your feedback:
- Email the address listed in the blog post
- Join PSF Board Office Hours in May & June
- Comment on the Discuss thread
- Join the dedicated Open Space session at #PyConUS
https://discuss.python.org/t/strategic-planning-at-the-psf/107314
#Python #PyPI
https://discuss.python.org/t/strategic-planning-at-the-psf/107314
The PSF is excited to share that the PSF Board is developing a five-year strategic plan–and we want to hear from you! We're sharing the high-level goals we’ve drafted and welcoming the whole Python community into the conversation. Read more on our blog: https://pyfound.blogspot.com/2026/05/strategic-planning-at-psf.html
#Python #PyPI
https://pyfound.blogspot.com/2026/05/strategic-planning-at-psf.html
La rediffusion du #PythonRennes du 27 avril est en ligne : https://youtu.be/FhUBmdUDe-w?list=PLv7xGPH0RMUT1GSCGHJmqnswpk-nyz5aq 🎉
Merci Néosoft pour l'accueil, Alex pour la captation et la mise en ligne, Quentin et Jesshuan pour vos interventions sur les frameworks web et d'orchestrations de workflows.
Retrouvez les diaporamas des actualités et des interventions sur https://github.com/python-rennes/sessions/tree/main/python-rennes-2026.04.27-rex-frameworks-web-et-orchestrateurs
@mgorny You're welcome?
We don't usually do RCs for patch releases, the last one was five years ago. The 3.14.5 RC was specifically for the GC change.
Unfortunately timelines were a bit short because I wanted to get this out, but it took a bit of time to prepare and test the patches and I didn't want to rush that, nor release during PyCon US.
https://discuss.python.org/t/reverting-the-incremental-gc-in-python-3-14-and-3-15/107014
#Python #CPython
Always appreciate how people release RCs to give others opportunity to test their changes early, then release final versions before the fixes for "breaks #Portage" kind of regressions introduced in the RCs are merged.
So either I've overdone it, or really nailed it:
The #python version of REBOUND is only a thin wrapper of the C code interfaced via ctypes. In the past, adding or changing a parameter in a C structure required you to also update the parameter on python. I have now one source of truth, the C code. I there define the structures, but now also an interface to them. This is not only used by python to access and modify parameters, but also by C itself to serialize data to a restart file.
#PyConUS is only a few days away! 🤩 As usual I’ll be covering the event exclusively on Mastodon (specifically the NEW “Trailblazing #Python Security” talk track on Saturday May 16th).
Time to reshare my hack for quick #Mastodon toot templates with event #hashtags:
https://sethmlarson.dev/quick-mastodon-toot-templates-for-event-hashtags
Python Tip #130 (of 365):
Only use recursion for trees
Recursion is most useful for traversing or constructing TREE-LIKE STRUCTURES.
For most other problems, iteration is usually more readable.
Recursion is when a function calls itself.
Computer science classes almost always introduce recursion using factorial or fibonacci. Those are not great examples because those are both very clear (and fast) using a simple "for" loop instead.
🧵 (1/6)
🐍🚀 Out now: Python 3.14.5 final!
♻️ This now has the new (old) garbage collector, and the official macOS installer has been updated to use Tcl/Tk 9.0.3 instead of 8.6.17.
https://discuss.python.org/t/python-3-14-5-is-here-with-a-new-old-garbage-collector/107304
“This is the situation where you're most likely to see implicit string concatenation used: to break up a long string literal into smaller strings over multiple lines, putting parentheses around them to create an implicit line continuation.”
Read more 👉 https://pym.dev/implicit-string-concatenation/
Python Tip #129 (of 365):
Use None as a sentinel value
None is great for representing nothingness, but it can also act as a placeholder for "no real value yet".
It's common to use None to distinguish between "caller didn't pass an argument" and "caller passed a real value".
🧵 (1/3)
If I recall correctly, it was Akkana Peck @akkana who first introduced me to Python, probably around 1998 or 1997 (so something in the neighborhood of Python v1.5) while working together at Netscape (I had a different name back then). **That** turned out to be a life-changing event; so thanks, Akkana!
Python Tip #128 (of 365):
Chain method calls for readability's sake
When an object's methods return the same type of object, prefer to chain calls together instead of juggling extra variables.
String methods are the classic example of this.
Each one returns a new string, so they chain nicely:
normalized = message.strip().lower().replace(",", "")
Imagine if we made a "stripped" variable and a "lower_stripped" variable for those 2 intermediary steps.
🧵 (1/4)
Heizungs-Fernsteuerung per SMS
Ich bin Fernpendler. In meiner "Arbeits"-Wohnung benutze ich nur mobiles Internet. Um die Heizung bei Bedarf anschalten zu können, habe ich eine Steuerung gebaut, die auf SMS reagiert.
#Wettbewerb_Frühling_2026 #Automatisierung #SMS #Python #gammu #Linux
#Linux #Python
Diese USB-schaltbare Steckdosenleiste beim Pearl-Versand gekauft 2009 funktioniert immer noch. Und die Links auf meiner Webseite zu Sourceforge tun auch noch.
Das nenn ich mal #Nachhaltigkeit 👍 👍 👍
https://www.wormser-region.de/index5482.html
🐍🚀 Out now: Python 3.15 beta 1!
🧊 This is the feature freeze, and now it's *your* turn to test out all the amazing things we've been baking for the past 12 months!
💤 Lazy imports!
🧊 frozendict builtin!
💂 sentinel builtin!
📉 Tachyon profiler!
🖼️ Frame pointers everywhere!
🧳 Unpacking in comprehensions!
8️⃣ UTF-8 default encoding!
🆕 Startup config files!
⌨️ Loadsa typing!
🎨 More colour!
https://discuss.python.org/t/python-3-15-0-beta-1-is-here/107231
Please report bugs, we'll fix for the big October release.
I couldn't sleep, so I got up at 5 am this morning.
To kill some time before work, I wrote a new Python-based proof of concept for Copy Fail based on the original, but one that is easier to read (I don't care about the byte size bragging rights) and which does not push a payload into the page cache of a setuid exec (which is bad). Instead it just overwrites text on a temp text file. It works great!
I got the idea from the copy-fail-c implementation on GitHub.
Hey #Python library maintainers! 👋 I sometimes see pull requests from well-meaning users about bumping minimum versions of dependencies to "fix security vulnerabilities". Here's a resource you can link to about why this strategy doesn't work in practice:
https://sethmlarson.dev/library-version-specifiers-not-for-vulnerabilities
RE: https://mastodon.social/@7ASecurity/116521920390604616
💪 “urllib3's supply chain posture was described as exceptionally strong, with advanced compliance across SLSA Source, Build, and Provenance requirements. The project maintainers were helpful, responsive, and engaged throughout the audit, ensuring that 7ASecurity had the necessary access and information at all times”
Excellent work @illiav and @quentinpradet! 👏
RE: https://mastodon.social/@hugovk/116534312819614916
Just as importantly!
After two years, it's now time to ceremoniously hand over the `main` branch to @savannah!
`main` is now accepting new features for Python 3.16, and I bet it's going to be even better than 3.15.
https://peps.python.org/pep-0826/
#Python #Python315 #Python316
🐍🚀 Out now: Python 3.15 beta 1!
🧊 This is the feature freeze, and now it's *your* turn to test out all the amazing things we've been baking for the past 12 months!
💤 Lazy imports!
🧊 frozendict builtin!
💂 sentinel builtin!
📉 Tachyon profiler!
🖼️ Frame pointers everywhere!
🧳 Unpacking in comprehensions!
8️⃣ UTF-8 default encoding!
🆕 Startup config files!
⌨️ Loadsa typing!
🎨 More colour!https://discuss.python.org/t/python-3-15-0-beta-1-is-here/107231
Please report bugs, we'll fix for the big October release.
🐍🚀 Out now: Python 3.15 beta 1!
🧊 This is the feature freeze, and now it's *your* turn to test out all the amazing things we've been baking for the past 12 months!
💤 Lazy imports!
🧊 frozendict builtin!
💂 sentinel builtin!
📉 Tachyon profiler!
🖼️ Frame pointers everywhere!
🧳 Unpacking in comprehensions!
8️⃣ UTF-8 default encoding!
🆕 Startup config files!
⌨️ Loadsa typing!
🎨 More colour!
https://discuss.python.org/t/python-3-15-0-beta-1-is-here/107231
Please report bugs, we'll fix for the big October release.
Just released: PrettyTable 3.16 🚀
Just released: norwegianblue 0.21.0 🚀
Add support for OSC 8 hyperlinks in the terminal.
https://github.com/prettytable/prettytable/releases/tag/3.16.0
norwegianblue now uses this to create hyperlinks in the terminal instead of printing a wide column of links. Use command+click with iTerm.
Also create hyperlinks for Markdown, reStructuredText and HTML output.
https://github.com/hugovk/norwegianblue/releases/tag/0.21.0
Attached are before and after images.
Just released: termcolor 3.0.0 🚀
ANSI colour formatting for the terminal.
🎨 Add support for Python 3.14
🎨 Only apply FORCE_COLOR, NO_COLOR & ANSI_COLORS_DISABLED env vars when present & not an empty string
🎨 Replace literal types with strings
🎨 Replace deprecated classifier with licence expression (PEP 639)
🎨 Speedup: move typing imports into type-checking block
🎨 Remove deprecated __ALL__, use __all__ instead
Just released: Python 3.14.0a7 🚀
Just released: Python 3.13.3 🚀🚀
Just released: Python 3.12.10 🚀🚀🚀
Just released: Python 3.11.12 🚀🚀🚀🚀
Just released: Python 3.10.17 🚀🚀🚀🚀🚀
Just released: Python 3.9.22 🚀🚀🚀🚀🚀🚀
Last 3.14 alpha! Less than a month to get new features in before beta!
Last 3.12 bugfix release! Now in security fix only!
And security releases of 3.9-3.11.
Please upgrade 3.9-3.13!
Please test 3.14!
Just released: Pillow 11.2.1 🚀
There was meant to be a 11.2.0 on 1st April, but we put too much good stuff in the wheels and hit the @pypi.org project limit before it could all be uploaded. That was yanked and now deleted and 11.2.1 is back to normal size.
We'll try and put the good stuff back for 11.3.0 on 1st July but take up less space.
Just released: Python Docs Theme 2025.4 🚀
📚 Require Sphinx 7.3
📚 Add support for Python 3.14
📚 Drop support for Python 3.10-3.11
📚 Copy button for code samples
📚 PEP 639 licence metadata
📚 and more!
https://github.com/python/python-docs-theme/releases
Thanks to Tomas Roun for the copy button! Demo:
🙈 https://www.youtube.com/watch?v=2cxSP90gj8c [Vappu is May Day]
Just released! 🚀🚀🚀🚀
termcolor 3.1.0
Add true colour, cache system lookups
https://github.com/termcolor/termcolor/releases/tag/3.1.0
em-keyboard 5.1.0
Add Emoji 16.0: 🇨🇶
https://github.com/hugovk/em-keyboard/releases/tag/v5.1.0
Humanize 4.12.3
Fix regression in naturalsize, improve French translation
https://github.com/python-humanize/humanize/releases/tag/4.12.3
Python Docs Theme 2025.4.1
Fix copy button with multiple tracebacks
https://github.com/python/python-docs-theme/releases/tag/2025.4.1
#Python #release #termcolor #humanize #Sphinx #theme #EmKeyboard #PythonDocsTheme
Just released: Python 3.14.0 beta 1! 🚀🐍
🥧 Deferred type annotation evaluation!
🥧 T-strings!
🥧 Zstandard!
🥧 Syntax highlighting in the REPL!
🥧 Colour in unittest, argparse, json and calendar CLIs!
🥧 UUID v6-8!
🥧 And much more!
https://discuss.python.org/t/python-3-14-0-beta-1-is-here/91117?u=hugovk
Just released: Python 3.14.0 beta 2! 🚀🐍
🥧 Deferred type annotation evaluation!
🥧 T-strings!
🥧 Zstandard!
🥧 Syntax highlighting in the REPL!
🥧 Colour in unittest, argparse, json and calendar CLIs!
🥧 UUID v6-8!
🥧 And much more!
Do you maintain a Python package? Please test 3.14. If you find a bug now, we can fix it before October, which helps everyone. And you might find some places in your code to update as well, which helps you.
https://discuss.python.org/t/python-3-14-0-beta-2-is-here/93396?u=hugovk
Just released: Python 3.14.0 beta 3! 🚀🐍
🥧 All the good stuff of b2 but also:
🥧 Free-threaded Python is officially supported! (PEP 779)
🥧 Subinterpreters in the stdlib! (PEP 734)
Do you maintain a Python package? Please test 3.14.
If you find a bug now, we can fix it before October, which helps everyone. And you might find some places in your code to update as well, which helps you.
https://discuss.python.org/t/python-3-14-0-beta-3-is-here/95843?u=hugovk
#Python #CPython #Python314 #release #PEP779 #PEP734 #FreeThreaded #subinterpreters
Just released: linkotron 0.6.0!
🔗 Adds OSC 8 formatting so you can do make those clickable links in terminal emulators.
https://pypi.org/project/linkotron/
#Python #release #linkotron