PPlamenu
HomeTrendingLive feedsPeopleGroupsRulesStaff
Sign in
PPlamenu
HomeTrendingLive feedsPeopleGroupsRulesStaff
Sign in
Мя ��@mo@mastodon.ml
⁨23⁩d

Every time I have to deal with python packaging I hate it even more than before

Like, sure, serialising your API as HTML5 is totally fine and not unspeakably cursed way to do it

1000
Open original page
BoostsQuotesFavs
Мя ��@mo@mastodon.ml
⁨23⁩d

Replying to @⁨mo@mastodon.ml⁩

....yes, they invented a JSON version, but it's not supported by our version of internal registry, and updating it will take somewhere between two hours and half year

1000
Open original page
BoostsQuotesFavs
Мя ��@mo@mastodon.ml
⁨23⁩d

Replying to @⁨mo@mastodon.ml⁩

and, the most convenient way to parse such amazing markup with python stdlib, is regular expressions. Because xml parsers can't do html, and included html.parser is only half-done

1000
Open original page
BoostsQuotesFavs
Мя ��@mo@mastodon.ml
⁨23⁩d

Replying to @⁨mo@mastodon.ml⁩

LMAO, even half-done stub in stdlib uses regular expressions

after three different full featured xml parsers in module next to, this feels like an insult

https://github.com/python/cpython/blob/3.14/Lib/html/parser.py

The Python programming language. Contribute to python/cpython development by creating an account on GitHub.GitHubcpython/Lib/html/parser.py at 3.14 · python/cpythonThe Python programming language. Contribute to python/cpython development by creating an account on GitHub.
⁨Jul⁩ ⁨23⁩, ⁨2026⁩, ⁨13:35⁩en
1000
Open original page
BoostsQuotesFavs
Мя ��@mo@mastodon.ml
⁨23⁩d

Replying to @⁨mo@mastodon.ml⁩

There's several completely incompatible formats, and zero official tooling to deal with that

except pip, but it works only for cli

1000
Open original page
BoostsQuotesFavs
Мя ��@mo@mastodon.ml
⁨23⁩d

Replying to @⁨mo@mastodon.ml⁩

well, I sorta hacked it with pip & grep via subprocess.run

slow as fuck, but at least I don't have to manually parse 5 different formats

and our repo is small anyways

1000
Open original page
BoostsQuotesFavs
Мя ��@mo@mastodon.ml
⁨23⁩d

Replying to @⁨mo@mastodon.ml⁩

Note to self: never, ever try dealing with not installed python packages

Create venv in /tmp, install without deps, and read metadata/source from site-packages

Overkill? In case of python — no.

0000
Open original page
BoostsQuotesFavs