News for hackers. Stuff that matters.
Re:Uv's killer feature is pulling in local dependencies by mdaniel on Sunday January 12, 2025 @05:45PM (#42677756)
But let's all be real here: the ability of __init__.py to do FUCKING ANYTHING IT WANTS is insanity made manifest

I am kind of iffy on golang's import (. "some/packge/for/side-effects") but at least it cannot suddenly mutate GOPATH[0]="/home/jimmy/lol/u/fucked" as one seems to be able to do on the regular with python

I am acutely aware that is (programmer|package|organization|culture)-dependent but the very idea that one can do that drives us rigorous people stark-raving

Re:Uv's killer feature is pulling in local dependencies by zahlman on Monday January 13, 2025 @02:45AM (#42681073)
It took me a while to realize that you do mean __init__.py running when a package imports.

But, you know, top-level code (which can do anything) runs when you import any Python module (the first time), and Python code doesn't have to be in a package to get imported. (The standard library depends on this.)