News for hackers. Stuff that matters.
Re:Why does a = a[0] = [0] create a self-referential list in... by wheelerof4te on Friday November 19, 2021 @12:37PM (#29279885)
How heavy is Poetry tool? What's it's selling point when compared with setuptools?

With setuptools, I just make setup.py and run pip install inside the root directory. If I have wheel, pip builds a wheel for my package.

Sorry, but I don't want to learn yet another packaging meta-language when plain Python worked fine for decades. Python already tried with setup.cfg ini files and people rejected it. Why would pyproject.toml be any better?

Why not improve setuptools instead? That is what sorting out packaging means. Stop copying other languages and focus on Python. Core devs took typing syntax, pattern matching and packaging from Rust and bolted it all on Python like it fits.

Well, it does not fit. Stick to your own.

Re:Why does a = a[0] = [0] create a self-referential list in... by dharmab on Friday November 19, 2021 @04:02PM (#29282458)
Poetry still uses setuptools! It makes it a lot easier for mortals. This is the blog post that convinced me to switch away from my old build system: https://blog.ganssle.io/articles/2021/10/setup-py-deprecated...
Re:Why does a = a[0] = [0] create a self-referential list in... by wheelerof4te on Friday November 19, 2021 @05:54PM (#29283672)
The blog post recommends build, not Poetry. But I guess the Python devs finally started taking this seriously.

Since build is semi-official Python project, I will use it instead of Poetry. We can no longer rely on setup.py, it seems.

Thanks.

Re:Why does a = a[0] = [0] create a self-referential list in... by wheelerof4te on Saturday November 20, 2021 @07:35AM (#29287544)
I just tried Poetry on Windows.

Installation is a mess, and official recommendation of "copying a powershell line" was already a red flag. Now I can't remove it.

Poetry is a convoluted, insecure mess. Please avoid it and use official PyPi recommendations.

Re:Why does a = a[0] = [0] create a self-referential list in... by hiptobecubic on Saturday November 20, 2021 @12:15PM (#29289902)
Python has a long history of adopting good ideas from other languages.

None of the things you mentioned were invented by Rust.

Re:Why does a = a[0] = [0] create a self-referential list in... by TingPing on Saturday November 20, 2021 @12:30AM (#29285829)
setuptools design is a mess. pip will likely support it forever though so you are fine.