Python now has a standard package lock file format – though winning full adoption will be a challenge (devclass.com)
from cm0002@lemmy.world to python@programming.dev on 06 Apr 2025 02:54
https://lemmy.world/post/27838286

#python

threaded - newest

holycrap@lemm.ee on 06 Apr 2025 06:54 next collapse

xkcd.com/927/

eager_eagle@lemmy.world on 06 Apr 2025 16:28 collapse

nah, the main reason we have 15 standards was the lack of an official one. This is good.

taaz@biglemmowski.win on 06 Apr 2025 07:36 next collapse

Oh finally.

The news on this is mixed. “All the tool authors have signaled they can and would implement the PEP as an export format,” said Cannon, but that does not mean they would adopt it as their sole lock file format. The creator of uv, Charlie Marsh, said that “today, the PEP 751-style pylock.toml files are not sufficient to replace uv.lock,” but that support will be added for export.

This sounds little better then “here is 13th standard” even though it’s not feature full.

logging_strict@programming.dev on 07 Apr 2025 03:59 next collapse

Viva la package dependencies!

Does it do away with setuptools? After my experience interacting with the maintainers, now refer to that package as, The Deep State

The Deep State only supports loading dependencies from pypi.org Which has many advantages right up until it doesn’t.

This new standard contains dependency host url. Hope there is a package other than setuptools that supports it.

When bring it up, and prove it, the responses alternate between playing dumb and gaslighting. The truth is The Deep State are gate keepers. And they are in the way.

Training wheels off mode please! So there is support for requirements files that contain on which server dependencies are hosted with more than one choice. Would like the option to host packages locally or remotely using pypiserver or equivalent.

On the positive side, setuptool maintainers did not suggest voodoo dolls, try to wait out the planetary alignment, better economic conditions, or peace on Earth.

That’s how the conversation comes off to my eyes. But form your own opinion. Especially enjoyable for folks who also enjoyed the TV series, The Office.

What are the alternatives to being stonewalled by setuptools?

Disclosure: Wrote requirements rendering package, wreck. I have my own voodoo dolls and plenty of pins

eager_eagle@lemmy.world on 07 Apr 2025 05:29 next collapse

Have you tried hatch?

I don’t know why people are still bothering with setuptools for new projects.

logging_strict@programming.dev on 07 Apr 2025 23:56 next collapse

Will look at it again

logging_strict@programming.dev on 08 Apr 2025 00:25 collapse

From the hatch docs, not seeing where it discusses publishing to alternative package warehouses.

eager_eagle@lemmy.world on 08 Apr 2025 01:01 collapse

AFAIK setuptools and hatch are for building. Publishing is a different process. You can try uv for publishing, but idk if it supports publishing to alternatives to PyPI.

logging_strict@programming.dev on 10 Apr 2025 06:22 collapse

setuptools is for enforcing a cartel, naively can simplify that to for building.

I hope uv completely replaces setuptools and build. Then the maintainers can move on to another racket.

abruptly8951@lemmy.world on 07 Apr 2025 06:13 next collapse

Poetry or UV

Still haven’t tried the latter but heard good things

WolfLink@sh.itjust.works on 08 Apr 2025 02:02 collapse

I really don’t understand what you are complaining about. There has been a “training wheels off I want to do things manually” option for ages.

stackoverflow.com/…/how-to-state-in-requirements-…

logging_strict@programming.dev on 10 Apr 2025 05:46 collapse

git sources are not allowed by pypi.org

pypi.org cartel does not like competition; github repos are no exception.

Try to publish packages with git sourced packages and find out the hard way or save time and take my word for it.

– author of wreck

Randelung@lemmy.world on 08 Apr 2025 00:55 next collapse

How is this different from regular dependencies?

logging_strict@programming.dev on 10 Apr 2025 06:06 collapse

Regular dependencies lack host url and hashes. Those are most important.

For the full details, encourage you to read pep751

^^ look a link! Oh so clickable and tempting. Go ahead. You know that pretty blue font-color is just asking for it. And after clicking the font-color changes colors. Wonder what font-color it’ll become? Hmmmm

[deleted] on 08 Apr 2025 01:06 next collapse
.
cm0002@lemmy.world on 08 Apr 2025 01:23 collapse

Python EEE incoming!!!

TunaLobster@lemmy.world on 08 Apr 2025 01:44 next collapse

Here I am still using requirements.txt and the built in venv. Sure poetry looks cool. I just don’t have it everywhere. Now I just have to wait 5 years before I can reliably use a pylock.toml. Progress!

logging_strict@programming.dev on 10 Apr 2025 05:39 collapse

i love requirements files, venv, and pyenv.

Bringing requirements into pyproject.toml does not have enough value add to bother with. My requirements files are hierarchical. Extensively using -r and -c options AND venv aware.

pep751 does bring value, by stating both the host url and the hash of every package.

setuptools will fight this to continue their strange hold on Python

logging_strict@programming.dev on 10 Apr 2025 05:29 collapse

i’m sad to report

wreck 0.3.4.post0 no longer emits build front end options into .lock files wreck#30.

Background of efforts to beg and plead for setuptools maintainers to bend ever so slightly.

Continuing from denied way to pass build front end options thru requirement files so know non-pypi.org hosts setuptools#4928

This hurts those hosting packages locally or remotely on non-pypi.org package index servers. For those who are, the packages themselves give no clue where the dependencies and transitive packages are hosted.

Each and every user would need to have a ~/.pip/pip.conf or pass –extra-index-url pip install cli option. And somehow know all the possible package index servers.

This allows the pypi.org cartel to continue along it’s merry way unimpeded.

Wish pep751 good luck and may there be a .unlock equivalent. Do not yet understand how the pep751 implementers will bypass setuptools and build.