Anže

Anže

@anze3db.pecar.me

Writing Python and surfing waves 🏄‍♂️

1.2K followers161 following211 posts

django-tui 26.1 is out, the first release in two years! 🎉 It's a complete redesign! You can now type a command like in your shell and the form fills in as you go. pip install -U django-tui

🐍 Python Lisbon Meetup is tomorrow! 🎤 Talk by @mathsppblog ⚡ Lightning talks 🍻 Socializing 📍 IST, Sala Multiusos, Torre Norte (new room, not the Pavilhão de Matemática!) 🕖 Thu, 1 Oct, 19:00 RSVP links below 👇

PyCon Portugal continues to be my favorite PyCon. This year it was in Aveiro (a better Venice 😉) and we had a blast! I enjoyed giving my talk on lazy imports, but the best part was meeting new people and catching up with friends. Looking forward to it again next year!

Fun fact, I gave a lightning talk about chess and then got caught solving a chess puzzle during one the workshops 😅

I had a bit of a heart attack this morning when we noticed that my Grok 4.6 benchmark experiment using Amazon Bedrock would cost $28,044.59 instead of ~$28.00 that I was expecting 😱

We opened a support ticket, and the AI immediately identified the issue as being on their end. No answer to the ticket yet, but we no longer see the 30k charge in Cost Explorer 😮‍💨 If you are using Grok 4.6 through Bedrock Mantle, double-check how much you are spending!

One of the many things that I learned at DEF CON a few weeks ago is about Python Class Pollution and how a harmless snippet like the one below can cause a huge issue if an attacker controls it!

Because I've written a similar snippet many times in the past, the first thing I did when I got home was write an open grep rule so our existing tools could catch it. Blog post on why this can be very bad and how to protect yourself on my company blog: www.fencer.dev/blog/python...

fencer.devPython class pollution: a paste-in Opengrep rulePython class pollution turns getattr and setattr into RCE and auth bypass. Here is an Opengrep rule you can paste into your own ruleset to catch it in CI.

We benchmarked 15 models for triaging vulnerabilities. * Kimi K3 came out on top but marked a true positive as a false positive ☠️ * Opus 5 refused to give a verdict on 11 vulnerabilities * Sonnet 5 and Luna outperformed Terra and Sol Full post 👇 www.fencer.dev/blog/llm-tr...

fencer.devBenchmarking 15 LLMs on SAST false-positive triageWe benchmarked 15 LLMs on 142 real security findings to triage SAST false positives. Kimi K3 led on accuracy, with one caveat that matters for security.

I do think it nailed my voice though!

Anže@anze3db.pecar.me

I asked Claude to come up with writing guidelines based on my blog posts: > A few things I deliberately did not encode as guidelines: the frequent typos (characteristic of your fast publishing cadence) 88 blog post in 14 years is not fast publishing cadence 😅

I asked Claude to come up with writing guidelines based on my blog posts: > A few things I deliberately did not encode as guidelines: the frequent typos (characteristic of your fast publishing cadence) 88 blog post in 14 years is not fast publishing cadence 😅

We reviewed 4,978 mypy runs in our Django app: • 4,731 green • 246 failed Of the 246 failures: • 173 false positives • 73 real issues • 39 caught only by mypy and no other check! Some noise, but it prevented real bugs from reaching production. 🎉

It was also very useful to look at the false positives, and we were able to make two changes that reduced them by half: 1. Stop type-checking test files. No true positives were ever caught by this, and dynamic attrs from baker/setUpTestData are a common source of false positives

2. Turn on the DRF-type stubs we’d already installed but never wired up. It was flagging serializer-field errors, and we never figured it out until now. Yes, mypy is slow, but I think there is value in running it on Django codebases!

Our Go wrapper rebuilt an expensive index on every call. Python version builds it at package build time. Yes, we could fix the indexing problem, and then Go would be ~16x faster than Python (0.04ms vs 0.63ms), but we’ll happily trade 0.6ms to remove the whole Go-Python bridge.

After 9 meetups full of talks, lightning talks, and even lightning turtles, it's time for the Python Lisbon Meetup to take it easy. Join us at Linha d'Água on Thursday to relax and enjoy the summer in Lisbon with Python friends 🐢 www.meetup.com/python-lisb...

meetup.com#10 – PyLM Meetup – Social Get-Together, Thu, Jul 2, 2026, 7:00 PM | Meetup🇬🇧 After 9 meetups full of talks, lightning talks, and even lightning turtles, it's time to take it easy. Join us at Linha d'Água — the café by the lake in Parque Eduardo

The Claude usage page is very confusing. Since Sonnet has a separate bar I thought I'd be able to switch to it after I max out Opus, but nope. Of course this all makes sense if you actually read the tooltip/labels but who does that today anyway? 😅

Speaking about reading the labels. It says that I spent the limit for this month but it's actually a weekly limit, lol.

Running Claude in a loop to push our test coverage. After 24+ hours and 22,000 new lines of tests, coverage climbed from 92% to 95%. No clue if it’ll get merged, but it's a really fun experiment 👀

Over the last week, I've been reviewing PyCon Portugal talk and workshop proposals, and I just finished reviewing them all! 😎 Some really good ones in the mix that got me really excited about the conference in September. Make sure to grab your ticket! 2026.pycon.pt

Fun fact, I was reviewing for 3 hours straight on Saturday while the Raglan surf competition was on. There was A LOT of waiting between sets, so I could focus on proposals for most of it!

Claude wrote up a Cloudflare-style post mortem: blog.pecar.me/fedidevs-pos...

blog.pecar.meFedidevs PostmortemToday I had almost 9 hours of downtime on fedidevs.com and some of my other sites that I run on a Raspberry Pi at home. The alert came in just as I was heading to bed and I didn’t see it until I woke ...
Anže@anze3db.pecar.me

Fedidevs had quite an outage today. It went offline just as I went to bed and I didn't see it until I woke up this morning 🫣 Still better uptime than GitHub 😅

Fedidevs had quite an outage today. It went offline just as I went to bed and I didn't see it until I woke up this morning 🫣 Still better uptime than GitHub 😅

The supply chain attack has now spread to PyPI: mistralai: 2.4.6 guardrails-ai: 0.10.1 Pause your dependency updates or use package cooldowns (--uploaded-prior-to flag in latest pip) Stay safe!

Anže@anze3db.pecar.me

🚨 There was another supply chain attack, this time affecting tanstack npm packages. Make sure you haven't installed the compromised packages either in your CI or locally. I would also hold off on updating any dependency for the next week or so until the dust settles from this.

🚨 There was another supply chain attack, this time affecting tanstack npm packages. Make sure you haven't installed the compromised packages either in your CI or locally. I would also hold off on updating any dependency for the next week or so until the dust settles from this.

I told Claude to upgrade my Raspberry Pi from Debian 12 to 13 and went to enjoy my Sunday. It wasn't an easy upgrade. apt kept tripping over Debian's t64 transition, but Claude managed to unstuck it. When I came back, the box rebooted cleanly into Debian 13. 😲

I wrote a few words about the Agents Day hachaton that I attended last week on Friday. It's always fun to have an excuse to spend a day tinkering with something new. I even managed to be one of the 5 that got to demo their project on stage! 👉 blog.pecar.me/agents-day-...

We have another Python Lisbon Meetup coming up on Thursday 🐍 This time Yulia will be giving a talk on strong and weak references! See you on May 7 @ 19:00 at IST, Pavilhão de Matemática, room 3.10!

Another Python Lisbon Meetup in the books! Looking forward to the next one on May 7 👀

With recent Python supply chain attacks (Trivy/LiteLLM), it’s worth mentioning uv’s `exclude-newer = "x days"` config. It forces uv to only installs packages published more than x days ago, reducing risks since problematic packages should be yanked by then. docs.astral.sh/uv/referenc...

Can't wait for lazy imports in Python 3.15! I spent a bunch of time and tokens over the weekend inlining heavy imports so that they don't get loaded during initial start of a Django app. The `manage.py check` command is now 3.8x faster (9.45s down to 2.48s).