News for hackers. Stuff that matters.
Re:It's React, but in Python by zelphirkalt on Wednesday June 07, 2023 @03:32AM (#36223964)
That is not a typical lock file. If it is, then it is a bad one. Lock files need checksums, not version numbers (oh well, both.). Version numbers do not protect from changes. At least not in all important cases or scenarios. I've had packages in the PHP world change their checksum and when I alerted them about it, they were like "So? We only changed some documentation of that version." ... Who knows what else people change in the same version. No. You need checksums.
Re:It's React, but in Python by BerislavLopac on Wednesday June 07, 2023 @04:41AM (#36224409)
pip-compile provides exactly that: https://pip-tools.readthedocs.io
Re:It's React, but in Python by zelphirkalt on Wednesday June 07, 2023 @07:03AM (#36225347)
OK, I guess the question is how pip-tools relates to pip then.

Is it a random third party package (someone just grabbing that name) or who manages it? As it is, it looks like not part of pip. (But maybe you were merely posting it as an alternative?) I've never heard of it before. I have been using various tools already, including merely pip, pipenv, poetry. Do I need to look for the newest tool every month? It begins to feel like the JS ecosystem.

Re:It's React, but in Python by BerislavLopac on Thursday June 08, 2023 @03:46AM (#36238552)
There are different tools for different purposes.
Re:It's React, but in Python by laurencerowe on Wednesday June 07, 2023 @08:53PM (#36235752)
PyPI does not allow file uploads to be changed [0] but while that means this particular scenario is not an issue for PyPI/pip I'm not completely confident it's impossible to come up with a problematic scenario. Perhaps if a broken wheel was later published for an existing release with a working source distribution. In practice this is not something I've run into though.

[0] https://pypi.org/help/#file-name-reuse

Re:It's React, but in Python by di on Wednesday June 14, 2023 @11:01AM (#36327027)
Pip supports checksums too. A better link might be https://pip.pypa.io/en/stable/topics/secure-installs/