Tootfinder

Opt-in global Mastodon full text search. Join the index!

@mgorny@pol.social
2025-07-15 14:26:27

Nowości w świecie Pythona: #setuptools teraz zawiera zagnieżdżone zależności z licencją LGPL. Nie żeby mi to robiło różnicę (aczkolwiek są ludzie i firmy, dla których to stanowi problem) — ale te zależności nie są nawet używane! Na przykład `autocommand` to zależność kilku skryptów w `jaraco.text`, które nie są używane przez setuptools.
A czekaj, jednak mi to robi różnicę, bo muszę poprawić …

@mgorny@social.treehouse.systems
2025-07-15 14:24:39

New in #Python world: #setuptools now vendors deep dependencies with LGPL license. Not that I do mind (but some people and companies do!) — but these dependencies aren't even used! I mean, `autocommand` is just a dependency of some scripts in `jaraco.text` that aren't used by setuptools.
Oh, wait, I actually do care, because I need to fix LICENSE in dev-python/ensurepip-setuptools.
github.com/pypa/setuptools/iss
github.com/pypa/setuptools/iss

@mgorny@pol.social
2025-08-14 19:24:06

Dziś ktoś pytał w temacie walki z ostrzeżeniami o "przestarzałej" funkcjonalności w #setuptools (w #Gentoo zbieramy je i wypisujemy ponownie, więc ludzie faktycznie mogą je zauważyć). Myślę, że moją najlepszą podpowiedzią było: użyj innego systemu budowania.

@mgorny@social.treehouse.systems
2025-06-16 10:22:27

Some fun facts about #Python limited API / stable ABI.
1. #CPython supports "limited API". When you use it, you get extensions that are compatible with the specified CPython version and versions newer than that. To indicate this compatibility, such extensions use `.abi3.so` suffix (or equivalent) rather than the usual `.cpython-313-x86_64-linux-gnu.so` or alike.
2. The actual support is split between CPython itself and #PEP517 build systems. For example, if you use #setuptools and specify `py_limited_api=` argument to the extension, setuptools will pass appropriate C compiler flags and swap extension suffix. There's a similar support in #meson, and probably other build systems.
3. Except that CPython freethreading builds don't support stable ABI right now, so building with "limited API" triggers an explicit error from the headers. Setuptools have opted for building explicit about this: it emits an error if you try to use `py_limited_api` on a freethreading interpreter. Meson currently just gives the compile error. This implies that package authors need to actively special-case freethreading builds and enable "limited API" conditionally.
4. A some future versions of CPython will support "limited API" in freethreading builds. I haven't been following the discussions closely, but I suspect that it will only be possible when you target that version or newer. So I guess people will need to be building two stable ABI wheels for a time — one targeting older Python versions, and one targeting newer versions plus freethreading. On top of that, all these projects will need to update their "no 'limited API' on freethreading" conditions.
5. And then there's #PyPy. PyPy does not feature a stable ABI, but it allows you to build extensions using "limited API". So setuptools and meson just detect that there is no `.abi3.so` on PyPy, and use regular suffix for the extensions built with "limited API".

@mgorny@social.treehouse.systems
2025-08-14 19:22:03

Someone asked about fixing #setuptools deprecation warnings today (#Gentoo collects and reprints them, so people actually notice). I think my best hint is: use another build system.
#Python #PEP517