Search

Items tagged with: Python


Basically the idea is that your distribution maintains a "system environment" with a particular set of Python packages that are needed for system tools to function. (That includes things like apt, on Debian-based distros.) The distro maintainers have done extensive testing to make sure that anything you install through the system package manager (apt, yum, apk, emerge, etc.) will not interfere with that set of packages your system tools require, such as by upgrading some dependency to an incompatible version or uninstalling a necessary package in favor of a replacement or by installing something with a hook that breaks some system tool or so on. But when you run `pip install` as root (like with sudo), you're directly manipulating the content of that system environment but you get no such guarantees of not breaking anything. Over the years, many people have broken core tooling or rendered their systems unusable in this way.

#Python


Have you tried out the `collections` module in #Python?

I really like it. One of my favorite parts of collections if `Counter` which gives you an easy way to take in an iterable and find the most common values within it


@roskakori The advice I generally give to people on any Linux distribution is to never `sudo pip install` anything, but I suppose a package manager like uv is probably the least damaging thing you could install that way.

#Python


During the wild-west era of #Python, it was common to first `sudo apt install python3 python3-pip`. And if you wanted external packages without any `.deb` to be available system-wide, you did a `sudo pip install some-package`. Obviously, we are long past that now.

But in light of Debian's conservative update policy and uv's knack for remaining 0.x seemingly forever, this might still be the path of least resistance: `sudo pip install uv`.

And then, update it every once in a while. Either manually or using a cron job: `sudo pip install --update uv`.


#Python #uv users on #Debian: I've been using this setup:

apt install extrepo
extrepo enable uv
apt install uv

That worked perfectly for all local users using standard Debian package management + updates.

Unfortunately, "deb.griffo.io" (host behind this uv extrepo) switches to a paid service in 2026-10.

docs.astral.sh/uv/getting-star… mentions following install workflows I don't like:

installs for one user and not host; not using debian package management and/or unclear update mechanism:
- releases.astral.sh/installers/…
- pipx install uv
- Docker

github.com/astral-sh/uv/releas… as no deb packages either

Do you have an idea for me how to setup uv in a Debian way?


🪟🦾🥈 Windows on Arm (aka aarch64-pc-windows-msvc) has now been promoted to tier 2 of CPython platform support.

Tier 3 has no response SLA to failures. Tier 2 requires breaking changes to be fixed or reverted within 24 hours, and failures block a release.

Tier 3 requires at least one core team member signed up to support the platform. Tier 2 requires at least two, and we have three here.

peps.python.org/pep-0011/
#Python #CPython #PEP11 #WindowsOnArm #Windows


If you use the `setup-uv` #GitHub #Action in your workflows, consider upgrading to version 9.0.0 soon.

This version changes the default behavior to store the downloaded #Python wheels from #PyPI in GHA Cache, shedding load from PyPI, especially relevant for frequent CI/CD runs.

The maintainers considered this a breaking change, hence the version bump, probably because it flips existing expectations.

If you expected that the Action was caching downloads before, now it actually does, so it's a logical fix in that regard.
Read more: github.com/astral-sh/setup-uv/…




I did not realise I had strong feelings on docstrings. I use them sparingly, and while they are a hack, at least they serve a good purpose.

I know people have opinions on the placement of line breaks and quotes, but I thought I was above these things. That this was Python programmers yearning for curly-brace level style wars.

I was mistaken.

I just encountered docstrings written in regular quotes rather than triple quotes and, no, apparently I DO have strong feelings on docstrings.

#python


Probably an unpopular opinion, but in the last couple years I switched in doing almost anything which has more then 100 lines of code from #Python to #Typescript. It's proper object oriented and it's easy to write.


Hi — I'm Joe, a software engineer in Philadelphia teaching myself radio astronomy.

I'm building open-source Python tools as I learn: a course, a framework for reproducible research on public archives, and control software for a Discovery Dish station I'm still assembling. No first light yet.

Mostly here to learn from people who actually do this. Expect hydrogen line observing, public archives, and honest null results.

#introduction

#RadioAstronomy #Astronomy #Astrodon #Python #OpenSource



The next PyPy will be 8.0.0 and should add support for Python 3.12 and be the last to support 3.11, and require glibc 2.28 (AlmaLinux8, Amazon Linux 2023, Debian 10, Ubuntu 20.04).

pypy.org/posts/2026/07/moving-…

#Python #PyPy


Zero days since I've discovered a random #CPython bug that triggers in very specific circumstances and I don't really have time to report it, nor can expect anyone to do it for me.

This time it's a test failure and refcounts being broken while running fastjsonschema's test suite on #Python 3.15 freethreading with pytest's --junit-xml option enabled 😱. And of course removing --junit-xml makes all tests pass.

EDIT: and of course I cannot reproduce outside Portage. Yet inside, it reliably crashes every single time.

EDIT 2: couldn't reproduce at all the next day.


The library reorganization I started last year is complete! As a part of this, I have posted the #Lua library catalog tool I wrote on #Codeberg. It's my first repo on Codeberg and my first Lua work posted online.

codeberg.org/caten/LibraryCata…

Original post about this:
mathstodon.xyz/@caten/11510415…

Unlike in my original post about this, I went with pure #Lua rather than #Python + #JSON + #Librewolf as a viewer.

#math #academia #mathematics #library #research #programming #LuaLang


In the meantime, #GitPython, the package that used to be dead (because the author is busily working on their next great thing) is now slopping out 4 "security" releases a week, as their #slop machine is busily fixing unintended variable expansion in every single URL they call. Unfortunately, they probably don't have enough tokens to fix them all at once, so instead all downstreams have to deal with the churn of endless security releases. Or the brain to figure out that maybe they could just disable variable expansion by default and solve them all at once.

It's truly a great time to be a #Python packager.

#NoAI #NoLLM


Also, zero days (well, minus a lot of days because I've been slacking) since a random #Python package got a new #NIH dependency on another Python package which is actually a "fastest" #RustLang package which cannot be built because the author thinks it a great idea to require a nightly Rust compiler.

…and of course it's full of "unsafe" calls. Because Rust is obviously such a great language for making secure code.

github.com/awolverp/cachebox/i…


I had NO idea there are so many GUI options for Python! Thank you, everyone who responded.

#Python #GUI