News for hackers. Stuff that matters.
Re:Self Propagating NPM Malware Compromises over 40 Packages by zahlman on Tuesday September 16, 2025 @04:26PM (#45267507)
Indeed. About 26% of the disk space for a freshly-installed copy of pip 25.2 for Python 3.13 comes from https://pypi.org/project/rich/ (and its otherwise-unneeded dependency https://pypi.org/project/Pygments/), "a Python library for rich text and beautiful formatting in the terminal", hardly any of the features of which are relevant to pip. This is in spite of an apparent manual tree-shaking effort (mostly on Pygments) — a separate installed copy of rich+Pygments is larger than pip. But even with that attempt, for example, there are hundreds of kilobytes taken up for a single giant mapping of "friendly" string names to literally thousands of emoji.

Another 20% or more is https://pypi.org/project/requests/ and its dependencies — this is an extremely popular project despite that the standard library already provides the ability to make HTTPS connections (people just hate the API that much). One of requests' dependencies is certifi, which is basically just a .pem file in Python package form. The vendored requests has not seen any tree-shaking as far as I can tell.

This sort of thing is a big part of why I'll be able to make PAPER much smaller.

Re:Self Propagating NPM Malware Compromises over 40 Packages by vasco on Tuesday September 16, 2025 @10:22PM (#45270855)
What paper?
Re:Self Propagating NPM Malware Compromises over 40 Packages by what on Tuesday September 16, 2025 @11:02PM (#45271127)
Re:Self Propagating NPM Malware Compromises over 40 Packages by zahlman on Wednesday September 17, 2025 @01:27PM (#45278782)
Yes, that. I didn't want to be too spammy, especially since I honestly haven't been getting much of anything done recently (personal reasons).