Arie Bovenberg
Software engineer in the Netherlands. I write about Python, datetimes, performance, and what makes code good. I don't post often, but I make each one count.
2024
-
__init__.pyfiles are optional. Here’s why you should still use them__init__.pyfiles have been optional since Python 3.3. So why keep them? Without them, neither developers nor tools like mypy can tell what’s a package. -
Ten Python datetime pitfalls, and what libraries are (not) doing about it
It’s no secret that the Python datetime library has its quirks. Not only are there probably more than you think; third-party libraries don’t address most of them! I created a new library to explore what a better datetime library could look like.
-
The curious case of Pydantic and the 1970s timestamps
Pydantic guesses whether Unix timestamps are in seconds or milliseconds. For dates in the 1970s it guesses wrong, and Apollo 13 launches in 2245.
2022
-
Finding broken slots in popular Python libraries (and so can you!)
__slots__only save memory if every base class has them too. I built slotscheck to catch broken slots, and found them in pandas, SQLAlchemy, and more.
2021
-
Is your Python code vulnerable to log injection?
Python’s logging is safe from log4j-style exploits, but untrusted input and f-strings still let attackers forge logs, stall your server, or leak secrets.