-
I fell down a rabbit hole of build backends for Python packages and wanted to experiment with #maturin. Two weeks later, and I finally have a #Rustlang+#Python project for zen-gardenning (and I'm soooo far behind on my github backlog 🙈).
Anyway, I'm pretty happy about it, so in case anyone would like to try it out, here’s what I believe is now the fastest and most portable implementation of Line Integral Convolution on PyPI: introducing `rLIC`
-
I can't quite convince myself yet that all inheritance/coupling is intrinsically bad, but I'm more and more recognising abstract base classes (ABCs) and #mixin classes as anti-patterns because they hinder #testability, which to me is key to quality software; #ABCs and mixins are by construction impossible to test on their own, and both patterns only make sense if a language supports inheritance, so it seems that the simplest option to avoid them is to get rid of inheritance altogether.
-
@__sharky__ @bouncing
As far as I understand, stuff like `setattr` or any sort of cache needs to be handled with care in multi-threading. Again, this is already true with the GIL, it's just that I never considered the possibility of my code running concurrently at all and #freethreading #Python just gave me the push I needed to think about it. I also maintain packages filled with C and Cython extensions, so I need to know this stuff anyway. -
@bouncing no, you're right ! It’s just that my own pure Python libraries were *not* thread safe yet since I never considered it before.
Yet, #freethreading being marked as experimental (and overall brand new) I don't think it’d hurt to also test pure Python projects that already claim thread safety: you may discover the GIL was actually hiding bugs, or better yet, you might find edge cases where Python itself breaks.
-
Resources that helped me a lot getting started:
How to even get #freethreading #Python in CI, by @hugovk
https://dev.to/hugovk/help-test-python-313-14j1and the dedicated blog by the Quansight team
https://py-free-threading.github.io/Many thanks to the authors !
-
Getting my packages ready for #freethreading #Python (PEP 703) means I need to learn all-things-threads for the first time.
This wasn't obvious to me at first, but you can't just run your existing *single-threaded* tests suite: you also need to check how your objects behave in a multi-threaded context.
So you need new tests. Where should you even start ? A good strategy is to write tests around mutating methods. And boy am I glad that I already had an aversion for mutability. -
#astraluv 0.2.15 is out and includes a new tool that I’ve wanted for so long: `uv pip tree` displays the whole dependency tree in your current virtualenv !
https://pypi.org/project/deptree/ Already implemented this but it's much more convenient to have a version of this tool that doesn’t actively “pollute" the environment it’s meant to display.
kudos to @charliermarsh and team 🎉
-
Today I'm celebrating my first can-of-worms bug (a bug that’s discovered while fixing another bug) in #astropy ! 🎉
It’s a bit paradoxical: these situations are not exactly pleasant to work through, but I find that it’s actually a signal of extreme #codequality that it’s only happening *now*, after two months on the job just tracking #bugs down ! 🪲
-
I wonder what #condaforge’s plan is to handle the transition to #Numpy 2.0 (expected to land about a month from now). My guess is that all build-time dependent packages will probably need to be rebuilt ? I don’t really know who/where to ask about this, so any help would be welcome !
(If Numpy 2.0 is news to you and makes you nervous I suggest reading https://github.com/numpy/numpy/issues/24300#issue-1828940995)
-
New bio !
This week was my last as a researcher, and starting tomorrow I'll work as a contractual research software engineer for the #Astropy project !
I am thrilled about onboarding this thriving community and excited that fixing bugs is now my job instead a distraction from it !