James Bennett's Avatar

James Bennett

@b-list.org.bsky.social

Django/Python guy. Tip your servers and normalize your Unicode. he/him Angry politics and other non-tech parts of me are at @ubernostrum.bsky.social Elsewhere: https://www.b-list.org/ https://infosec.exchange/@ubernostrum https://github.com/ubernostrum

315 Followers  |  51 Following  |  72 Posts  |  Joined: 14.11.2024  |  1.9173

Latest posts by b-list.org on Bluesky

Finished a long-overdue transition away from subscribing to the Planet Python RSS feed, which has become close to unusable, and now am subscribed individually to a bunch of interesting people.

10.08.2025 01:39 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Dependencies are not evil, and in some ways are unavoidable (operating system, language runtime/standard library, etc.). Having been in the business of maintaining a web framework, I think you probably don't want to get into that business *on top of* whatever your actual business is.

07.08.2025 08:20 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

There are lots of acceptably-good programming languages out there. Choose any of them. Choose on factors like "what's the team most familiar with". Scaling to OMGHUGE is something *no* language does out of the box.

07.08.2025 08:19 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

The "function color" problem is a tradeoff, and what you get in exchange is increased ability to reason about what might happen. I find this a strong enough benefit to outweigh the "color" issue.

07.08.2025 02:26 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
Litestar is worth a look A few years ago at work, I had a project which offered an opportunity to look at the new generation …

New blog post: I've mentioned before that #litestar is by far my favorite of the new generation of #python web frameworks, and I've finally found time to write about why.

www.b-list.org/weblog/2025/...

06.08.2025 19:37 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Object-Oriented Programming is good, actually. Having a *thing* that carries both some data and the logic to work with it is a really useful idea and a lot of allegedly non-OOP languages adopted it anyway and pretended they didn't.

06.08.2025 19:31 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Test coverage is useful. Not as a target, but as a warning sign: if it suddenly *drops*, that's a reliable sign something has gone wrong.

06.08.2025 00:13 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Instead of doing "Agile", read Fred Brooks and implement his recommendations for how to build software and manage software projects.

His advice is concrete, actionable, and correct, and "Agile" misses on at least two of those adjectives.

05.08.2025 21:13 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

The growing tide of worthless slop that shows up in search results for technical topics (which did not begin with LLMs but has been accelerated by them) has had the interesting side effect of getting me to buy books about programming again after many years of not doing so.

04.08.2025 22:16 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

A lot of tech that comes from huge companies is like birds on remote islands: highly evolved for an ultra-specialized niche, and won’t do so well when transplanted somewhere else.

31.07.2025 23:16 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

The primary utility of static typing is not in automated correctness checks, it's in forcing you to write *something* resembling documentation for how to use your code.

29.07.2025 02:45 β€” πŸ‘ 1    πŸ” 1    πŸ’¬ 1    πŸ“Œ 0

The pursuit of "testable" code has diminishing returns, especially as all the decomposition and extra layers of abstraction/indirection make the code harder to understand.

26.07.2025 01:34 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

ORMs are fine, actually. Manually querying and transforming DB data to/from your application's data structures is tedious and error-prone and you can skip it.

25.07.2025 23:17 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0

Doing a twist on the meme that's going around:

One like on this post = one hot (or at least lukewarm) take on tech.

25.07.2025 22:32 β€” πŸ‘ 10    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I wonder if there's any hyped-up "everyone has to use it or get left behind" thing going right now? People being swarmed with "you must have used it wrong"? I wonder what history tells us will likely happen in the end?

19.07.2025 00:20 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

A similar process happened with other techniques/methodologies. Pair programming. "Extreme" programming. The Agile-Industrial Complex.

Thing comes along, fans claim it's a revolution and everyone must adopt or be left behind, eventually it settles down to a "some use it, some don't" equilibrium.

19.07.2025 00:20 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

And so the industry has settled down to where people who like TDD do it, and people who don't like it don't do it, and neither side seems able to claim a measurable advantage.

19.07.2025 00:20 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

But somehow, for some people, TDD is awesome and amazing and they can't understand why everybody doesn't do it. And for others, TDD is "meh" at best and they can't understand why it's so hyped.

19.07.2025 00:20 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

There are plenty of other people who try TDD and find it doesn't deliver what its fans claim. And when they say this, the fans show up and pick that apart.

You weren't REALLY doing TDD. You couldn't have been doing it correctly. If you had you'd have seen the same results I got!

19.07.2025 00:20 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

There are people who insist that Test-Driven Development (TDD) delivers massive gains to multiple aspects of software development, and so, they tell us, everyone should switch to TDD.

19.07.2025 00:20 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
Happy 20th birthday Django! Posted by Thibaud Colas & Benjamin Balder Bach on July 13, 2025

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

13.07.2025 10:03 β€” πŸ‘ 61    πŸ” 28    πŸ’¬ 0    πŸ“Œ 3

Anyway, I was just doing a quick investigation for whether stuff at $WORK (which uses PDM as a friendly frontend, but currently exports to requirements files installed by pip in the actual containers) could switch to pylock.toml yet.

I'll check again in a few months!

11.07.2025 21:31 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Ironically one of the things confusing me was that "uv pip install -r" works with a pylock.toml and so I wasn't sure if that meant actual pip could do it too.

11.07.2025 21:30 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0

I have basically zero patience with people who respond to a question about whether something's supported with "volunteer project, do it yourself".

11.07.2025 21:28 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Screenshot of part of a Mastodon post, saying:

`pip` tends to the lag the standards a little bit, especially if someone directly involved in the standards process is not already a champion of the stuff being added to `pip`

To put it bluntly: maintaining `pip`'s existing features is already a lot, so some standards become "implementations welcome" until there are cycles available from the maintainers themselves. PEP 723 is another one that comes to mind

Screenshot of part of a Mastodon post, saying: `pip` tends to the lag the standards a little bit, especially if someone directly involved in the standards process is not already a champion of the stuff being added to `pip` To put it bluntly: maintaining `pip`'s existing features is already a lot, so some standards become "implementations welcome" until there are cycles available from the maintainers themselves. PEP 723 is another one that comes to mind

It was this guy, who was not only rude to word it that way but also factually wrong, and has now blocked me to save face.

11.07.2025 21:28 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Of course, being Mastodon, someone else felt the need to β€œbluntly” shame me for even asking whether it was supported yet because they needed to stand up on behalf of the maintainers.

11.07.2025 08:50 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
What's new in pip 25.1 - Dependency groups! pip 25.1 introduces support for Dependency Groups (PEP 735), resumable downloads, and an installation progress bar. Dependency resolution has also received a raft of bugfixes and improvements.

Installing from a pylock file appears to be coming in the future β€” someone in the Mastodon thread linked this useful description: ichard26.github.io/blog/2025/04...

11.07.2025 08:48 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0

#Python packaging question: I'm looking at pip's documentation and I see an explanation of how to generate a pylock.toml file, but nothing which indicates pip could then install from that file. Can it? If so, what's the right combination of arguments?

11.07.2025 01:04 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

If everybody who benefits from Hynek's open source work paid in just one (1) unit of currency, this balance would be positive again by the end of the day.

07.07.2025 21:15 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 1
Code:

append_images = (Image.new("RGB", (1, 1), color) for color in colors)
im_reloaded = roundtrip(im, save_all=True, append_images=append_images)

for im_expected in append_images:
	im_reloaded.seek(im_reloaded.tell() + 1)
	assert_image_similar(im_reloaded, im_expected, 1)

And then Codecov warns these last two lines weren't covered.

Code: append_images = (Image.new("RGB", (1, 1), color) for color in colors) im_reloaded = roundtrip(im, save_all=True, append_images=append_images) for im_expected in append_images: im_reloaded.seek(im_reloaded.tell() + 1) assert_image_similar(im_reloaded, im_expected, 1) And then Codecov warns these last two lines weren't covered.

Days since running coverage on tests found a bug in the tests: 0

This time, a generator had already been exhausted, before we tried to iterate over it. The lack of coverage highlighted the problem.

hugovk.dev/blog/2025/ru...

#Python #tests #coverage

27.06.2025 18:52 β€” πŸ‘ 4    πŸ” 2    πŸ’¬ 1    πŸ“Œ 0

@b-list.org is following 20 prominent accounts