Anže
anze3db.pecar.me
Anže
@anze3db.pecar.me
Writing Python and surfing waves 🏄‍♂️
6 hours until the first advent of code puzzle unlocks. Who's going to participate this year? 🎄
November 30, 2025 at 11:02 PM
I've just published a new version of my adventofcode PyPI package, just in time for Advent of Code that starts in 36 hours! 🎉

I've added a command line tool that helps you scaffold all the files for puzzle days because I got annoyed by copy pasting the same file each time!

pypi.org/project/adv...
November 29, 2025 at 4:55 PM
Reposted by Anže
Wooo, unanimous acceptance of 810!

Python is getting lazy imports!

So excited about this!

discuss.python.org/t/pep-810-ex...
PEP 810: Explicit lazy imports
Dear PEP 810 authors. The Steering Council is happy to unanimously[1] accept “PEP 810, Explicit lazy imports”. Congratulations! We appreciate the way you were able to build on and improve the previ...
discuss.python.org
November 3, 2025 at 4:36 PM
Reposted by Anže
Python 3.9 is officially EOL!

Congratulations to @lukasz.langa.pl on a wonderful run as release manager! 🖤

discuss.python.org/t/the-final-...
The final Python 3.9 security fix release is out!
Python 3.9.25 is available now! If you’re still using that, grab the sources and build the update as there’s some final fixes: Security (low severity) gh-136063: email.message: ensured linear comp...
discuss.python.org
October 31, 2025 at 8:05 PM
Carlton's proposal to move Django to an annual release cycle makes all the sense.

The x.2 LTS releases always felt wrong to me since it has always been much easier and safer to upgrade each version rather than doing the LTS to LTS leap in one go.

buttondown.com/carlton/arc...
An Annual Release Cycle for Django
A proposal for moving Django to an annual release cycle.
buttondown.com
October 31, 2025 at 12:00 PM
Reposted by Anže
Useful article by @anze3db.pecar.me.
Be cautious with your memory usage.

blog.pecar.me/django-bulk-...

#django #python
Django bulk_update memory issue
Recently, I had to write a Django migration to update hundreds of thousands of database objects.
blog.pecar.me
October 30, 2025 at 8:35 AM
Reposted by Anže
Hearts at the PSF are full today from the responses about the recent grant turn down news we shared. All of your kind words of support & solidarity, as well as your donations & new memberships, mean the world to us. We're so grateful to be in community with each of you 💛🐍💙
TLDR; The PSF has made the decision to put our community and our shared diversity, equity, and inclusion values ahead of seeking $1.5M in new revenue. Please read and share. pyfound.blogspot.com/2025/10/NSF-...
🧵
The official home of the Python Programming Language
www.python.org
October 28, 2025 at 7:04 PM
Reposted by Anže
TLDR; The PSF has made the decision to put our community and our shared diversity, equity, and inclusion values ahead of seeking $1.5M in new revenue. Please read and share. pyfound.blogspot.com/2025/10/NSF-...
🧵
The official home of the Python Programming Language
www.python.org
October 27, 2025 at 2:47 PM
us-east-1 is down, happy Monday!
October 20, 2025 at 8:55 AM
I had a memory issue with Django's bulk_update queryset method.

The TLDR version is that bulk_update prepares all the update statements in advance (even when batch_size is set) which can use more memory than expected.

Details and a solution in the blog:
blog.pecar.me/django-bulk...
Django bulk_update memory issue
Recently, I had to write a Django migration to update hundreds of thousands of database objects. With some paper-napkin math I calculated that I can fit all the necessary data in memory, making the migration much simpler than it would have been otherwise.
blog.pecar.me
October 13, 2025 at 9:57 AM
Reposted by Anže
In case you prefer text over video, the blog post version of my #EuroPython keynote about why it took 4 years to get a lock files specification for #Python is now up at snarky.ca/why-it-took-... .
Why it took 4 years to get a lock files specification
(This is the blog post version of my keynote from EuroPython 2025 in Prague, Czechia.) We now have a lock file format specification. That might not sound like a big deal, but for me it took 4 years o...
snarky.ca
October 11, 2025 at 3:48 AM
I've improved the performance of the starter packs list query from about 200ms to 2ms. 🎉

The trick was to stop dynamically computing the number of accounts in a starter pack and instead precompute it in a column.

A bit more work on each update, but worth it!
October 11, 2025 at 9:23 AM
Yesterday, Python 3.14 was released, and today all of my Django side projects are running on 3.14. 🎉

The upgrade didn't require any code changes on my part, but I did see a few return statements in the finally block SyntaxWarnings in a few dependencies.
October 8, 2025 at 8:49 AM
Reposted by Anže
🐍 Python 3.14 is here! 🎉

✨ Template strings (t-strings) for safer string interpolation
🚀 Free-threaded Python officially supported (bye GIL!)
🎨 Syntax highlighting in the REPL
📦 Zstandard compression in stdlib
🔍 Remote PDB debugging

Full release notes: docs.python.org/3.14/whatsne...
October 7, 2025 at 4:46 PM
I was moving imports into functions just last week and thinking how horrible this is. Great that we’ll get a solution for this in 3.15! 🤞🤞🎉🎉
October 3, 2025 at 10:16 PM
Over the weekend, I migrated one of my Django Apps from Gunicorn to Granian.

TLDR:
• The migration went smoothly.
• There were no visible performance gains.
• I still can't set a timeout for requests.

I also wrote a blog post about this: blog.pecar.me/migrating-g...
Migrating Gunicorn to Granian
I migrated one of my Django apps from Gunicorn to Granian yesterday. Here is how the migration went and some of my thoughts on Granian and Gunicorn.
blog.pecar.me
September 29, 2025 at 7:56 AM
I'll be giving a talk about Free-threaded Python at the #01 - Python Lisbon Meetup next week (Oct 2)! 🎉

Hope to see you there!

www.meetup.com/python-lisb...
#01 - PyLM Meetup at Técnico 🎓🐍, Thu, Oct 2, 2025, 7:00 PM | Meetup
🇵🇹 Vamos encontrar-nos no dia **2 de outubro às 19:00 no IST, Pavilhão de Matemática, sala 3.10**! Desta vez teremos uma sala com projetor, por isso preparem-se para uma
www.meetup.com
September 24, 2025 at 6:23 PM
Reposted by Anže
The Python Lisbon Meetup is kicking itself up. We will meet monthly, every first Thursday. Edition #0 is less than a month away, on Sep 4th.

Join us on Discord for tuning in!

discord.gg/PEnzcJzNyj
August 9, 2025 at 6:54 PM
The best TED Talk I've seen was about tying shoes.

It's mind blowing that we are all taught the weaker form of the knot as kids and never learn that there is a stronger version.

www.ted.com/talks/terry...
How to tie your shoes
Terry Moore found out he'd been tying his shoes the wrong way his whole life. In the spirit of TED, he takes the stage to share a better way.
www.ted.com
August 5, 2025 at 2:02 PM
LLMs really are an amazing peace of technology. How were we ever able to live without them?
August 2, 2025 at 9:49 AM
Early birthday present has arrived! 🎂
August 1, 2025 at 1:34 PM
Reposted by Anže
Who's up for showing up at @pyconpt.bsky.social this Thursday to give a 30 minute talk?

We just had a last-minute cancellation!
July 21, 2025 at 10:06 AM
Reposted by Anže
Happy 20th birthday Django! 💝🎂🎉

www.djangoproject.com/weblog/2025/...

Our open source journey started 20 years ago today, on July 13th 2005. Come celebrate this big milestone at one of our many community events this year

#Python #Django #OpenSource #DjangoBirthday
Happy 20th birthday Django!
Posted by Thibaud Colas & Benjamin Balder Bach on July 13, 2025
www.djangoproject.com
July 13, 2025 at 10:03 AM
Has anybody had any luck speeding up Django tests with pytest-xdist? On a single core, the test suite takes about 67s to complete, but regardless of the number of cores I set with xdist, it doesn't finish faster than 60s.

./manage.py test --parallel can finish in less than 20s.
July 10, 2025 at 11:35 AM