PEP 621: how to specify dependencies?

I agree to a point, but nor should we optimise for non-experts, when those non-experts are likely to have many other things that they’ll struggle to deal with.

Better documentation and tutorials, and more accessible examples of “how to set your project/workflow up”, would be of far more use, I suspect, to the average “non-expert” than simplified syntax for one fairly niche area of packaging. The problem is that no-one is writing such documentation, no-one is (to my knowledge) sharing problems and solutions, and people are picking stuff up cargo cult fashion.

That’s maybe a really good area for funded work - developing newcomer-friendly guides and tutorials for packaging. We could get specialist technical writers and trainers to produce such things, rather than (as we currently do) relying on packaging specialists who are too close to the problem to know how to present things.

Honestly, that probably mainly demonstrates that tools like pip should validate their inputs more eagerly and bail out on errors. (It may be that “compatibility with legacy forms” is the justification for not doing so, but maybe we should just bite the bullet and start rejecting invalid syntax).

I agree that PEP 508 syntax isn’t simple to get right (but nor is regex syntax, for example!) but tools not telling you when you made a mistake is not going to help. Once you know you made a mistake, you can look up the syntax. It’s when you think you got it right, but the tool veered into “undefined behaviour” territory without warning, that you have problems…

2 Likes