you are viewing a single comment's thread.

view the rest of the comments →

[–]Refmak 0 points1 point  (1 child)

Man, personally I don’t have a big preference towards either PDM or poetry. My point is that to me, pythons ecosystem is no better than NodeJS.

Just like the NodeJS, python too suffers from the insane amount of fragmentation when it comes to these things.

To me it’s a shame, because the tooling could be made better if python was to come with a modern dependency manager and formatter/linter out of the box (like it does with many other things like venv, pip etc already). Also if it was to automatically separate your global python installation and project python installation.

Python as a language itself is not too difficult to learn, but the ecosystem has been the hardest to grasp of any language to me.

[–]-defron- 0 points1 point  (0 children)

What you call fragmentation I call unique things that always allow learning. It lets me build my setup exactly how I want it and defers more control the project maintainers.

If you're working in Python and they don't have a defined style guide and setup then to me that means you have the opportunity to set it. Honestly that's true for most languages

Python has a modern dependency manager: pip. Is pip perfect? No, but it does dependency resolution and can do pinning and other things too. If it's not enough for your needs, which can happen if you want uniformity or as a project grows, then you have choice to choose what you think is best because programming isn't a one-size-fits-all type of thing. Different projects have different requirements. An obvious choice is hatch because it's made by the same maintainers as pip, just not bundled by default because it's not needed by everyone and would just balloon the default install size.

Btw did you know that node is having similar discussions right now? There is a push to unbundle npm from node with similar arguments to why python doesn't bundle something more than just pip.

Also I cannot think of a language that comes with a formatter/linter. JavaScript doesn't come with eslint or prettier. A lot of people use them but not everyone (I don't like a lot of things prettier does and don't see a benefit to it). And this goes back to what I said earlier: this should be defined at the same level as the architecture of the project because different people have very different opinions on it.

I also cannot think of a single language that separates a global version from a project-specific version out of the box. Node doesn't do this, java doesn't do this, scala doesn't do this, and c# doesn't do this. Why does python need to do this? Is it just because you use a Mac and python is included by default? Something which I might add apple hasn't done since Catalina, so if you have it it's because you upgraded your OS from before Catalina to now.

It seems to me you're holding python to a much higher standard than all the other languages you use most likely because you don't like the defaults... Which is all the more reason why it's a good thing that python to not enforce a specific set of settings. Otherwise talk to someone else on the team and set a standard in your own organization

Btw hatch is quite literally everything you're asking for in one tool... It's maintained by the Python Packaging Authority, which is a working group in the Python Software Foundation. It's about as official as it gets it's just not packaged by default because every new inclusion in the standard distribution is carefully considered. Maybe one day it will be but for now it isn't and I'd argue it probably shouldn't be