Tootfinder

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

@frankel@mastodon.top
2024-04-21 09:02:05

Announcing py2wasm: A #Python to #Wasm compiler
wasmer.io/posts/py2wasm-a-pyth

@mmoya@mastodon.social
2024-04-19 10:56:07

Time is hard #python

@mgorny@social.treehouse.systems
2024-06-18 04:37:38

Now in #Python discussion forums: #Apple apparently has some broken auto-review that rejects everything including Python, because of — apparently — `itms-services://` occurring inside Python's standard library (in tests).
#GAFAM

@crell@phpc.social
2024-05-17 13:14:04

No, #Python, this really is a gotcha, and a stupid one at that.
docs.python-guide.org/writing/

@frankel@mastodon.top
2024-04-18 09:22:08

9 Advanced #Python #Type Hints That Will Improve Your Code Significantly

@fell@ma.fellr.net
2024-04-18 11:18:04

Even though I despise Python for wasting CPU cycles, I have rarely seen a CPU-limted system that was actually busy doing CPU things.
Most of the time things are only slow because GPU things like rendering and video decoding have to be done on the CPU.
#Python #Programming

@_mr_moe@mastodon.social
2024-04-19 14:22:12

I just wrote a script in #python that is using HuggingFaceH4 (hosted internally on a server) to make a proposal for the Severity of my Bugs with an explanation why it does that.
Tooked me with research and setup about 3 hours and it is pretty good. for the first 20 bugs, i would personally rate differently - but for one out of those the genAI is maybe more right than i am :)

@hynek@mastodon.social
2024-05-13 15:59:34

Before I start churning out my pre-PyCon releases, how about a build-and-inspect-python-package that adds GitHub-style build provenance attestations by just adding one setting (and one permission)!? #python

@ronaldsnijder@mastodon.social
2024-04-19 17:52:44

Here at Mastodon you are allowed to #nerd, right? Since a week or so I am learning to do some #coding in #python , and I am amazed how easy it is to work with. Need to create some JSON

@veit@mastodon.social
2024-06-09 10:00:48

Whow, #Python leads the current Tiobe Index by a wide margin: python-basics-tutorial.readthe

Tobe Index in June 2024
@astrojuanlu@social.juanlu.space
2024-04-17 16:17:02

Give a warm welcome to @… dear #Python folks! 🇮🇹

@JGraber@mastodon.social
2024-06-14 18:00:52

#Python Friday #231: Split a #FastAPI Application Into Manageable Parts

@nobodyinperson@fosstodon.org
2024-06-12 11:47:47

Missing: a :python: #Python package to make flowcharts with #pythonRich, i.e. to draw arrows between (auto-arranged) renderables.
g…

@carloshr@lile.cl
2024-06-17 15:07:09

El gran problema de #python es el puto indentado. Si llegas a combinar tabulación y espacios todo se vuelve un caos 😫

@frankel@mastodon.top
2024-04-15 17:18:03

#Python PEP 744 – #JITCompilation
peps.python.org/pep-0744/

@mgorny@social.treehouse.systems
2024-05-18 16:19:06

Technically, a large part of what amounts to #Gentoo #Python 3.13 porting could be automated. In fact, we already have most of the pieces — tooling to find next candidates, update PYTHON_COMPAT, run tests. Why do I do it semi-manually then?
Well, for a start it gives me an opportunity to look into the ebuilds. Look for old issues, improve code, sometimes discover we ought to have removed something a long time ago. At the same time, looking at build logs also sometimes makes me notice incorrectly working tests (particularly, tests not failing correctly on failure).
Not to mention it gives me a bit of purpose when the damn fever prevents me from doing anything requiring more focus.

@compfu@mograph.social
2024-04-16 20:35:21

Today I saw #Python code from hell where the author wrote a function to wrap a call that might return an empty list. Apparently they wanted to return False in that case to use it in an if statement - not knowing that Python treats empty lists as falsy by default. But it gets better. The code was broken and it was never able to return False. Instead it returned the empty list but the code worked an…

@mgorny@pol.social
2024-06-17 15:54:11

Czasem ludzie się mnie pytają, dlaczego stabilizuję paczki Pythona w #Gentoo po dwóch tygodniach, zamiast typowych czterech.
Odpowiedź jest prosta: oczekiwać, że testy w paczkach Pythona nadal będą działać cztery tygodnie po wydaniu to trochę dużo.
#Python

@datascience@genomic.social
2024-06-16 10:00:01

Video tutorials for modern ideas and open source tools. #python

@jamesthebard@social.linux.pizza
2024-06-14 13:26:00

So, looks like the way the Python `requests` module parses string arrays into parameters was very different than what the NWS API was looking for so I was only getting `Severe` watches and warnings and none of the `Extreme` ones. It's already been a busy morning...lol. #python #weather

@mgorny@social.treehouse.systems
2024-06-15 08:59:00

I've added `dev-python/legacy-cgi` to #Gentoo, as a "forward-port" of the removed #Python `cgi` (and `cgitb`) module to Python 3.13. That said, it's only a stop-gap solution to make semi-dead packages work and not something you should rely on, so it's marked as deprecated immediately after being added.
Also, ideally please avoid keeping it installed in your dev environments. Once installed, all `import cgi` statements will suddenly start working, so you're going to miss Python 3.13 incompatibility issues (and therefore miss the dependency on this package).

@cdp1337@social.veraciousnetwork.com
2024-06-15 14:56:04

Why should folks doing #Development use test-driven development?
I wrote a #Python utility to help me collect and manage systems from a variety of platforms. Originally it started as a one-off so I wasn't concerned about tests, but the code continued to grow as …

@astrojuanlu@social.juanlu.space
2024-04-16 14:22:20

Who will be at PyData Berlin/PyCon Germany next week? ✋🏼
#python #PyConDE2024 #PyDataBerlin

@underdarkGIS@fosstodon.org
2024-06-06 15:39:59

Note to self: Between #QGIS versions 3.34.5 and 3.34.6, the packaging for the #Windows version of QGIS changed from #Python 3.9 to Python 3.12.
Will have to test if/how

@compfu@mograph.social
2024-04-16 20:35:21

Today I saw #Python code from hell where the author wrote a function to wrap a call that might return an empty list. Apparently they wanted to return False in that case to use it in an if statement - not knowing that Python treats empty lists as falsy by default. But it gets better. The code was broken and it was never able to return False. Instead it returned the empty list but the code worked an…

@chrysn@chaos.social
2024-05-13 10:39:15

There is a new version, 0.4.8 of aiocoap, the asynchronous #Python library for #CoAP.
Nothing fancy in terms of features, but some improvements on error handling, type annotations (#mypy has joined CI) and platfor…

@MrBerard@pilote.me
2024-05-12 10:53:33

BeeTeeDubs, I'm going live in ten with a #LiveCoding #Python Tutorial drawing flags with turtle graphics.
Really it's about abstraction and decomposition.
#ComputerScience

@JGraber@mastodon.social
2024-04-19 18:00:47

#Python Friday #223: Better #Pydantic Models for #FastAPI

@publicvoit@graz.social
2024-03-26 18:22:52

Had an issue with #NixOS where I couldn't run a #Python tool that uses pandas. (Nix really doesn't work well with Python.)
Somebody helped me to find the solution by:
nix-shell -p 'python3.withPackages (ps: with ps; [ pandas numpy ])'
Today, another Python project with pandas a…

@mgorny@pol.social
2024-06-16 17:26:17

Ćwiczenie na dziś: ile paczek #Gentoo uda się sportować do Pythona 3.13 w czasie, który potrzeba na zbudowaniu paczek binarnych dla nowych jąder.
Następne w kolejce jest ćwiczenie trudnego `git rebase`.
#Python

@mgorny@social.treehouse.systems
2024-05-18 17:51:32

One more thing about porting #Gentoo packages to a new #Python version is that every time you discover how many *new* packages are now abandoned and broken. However, the rate at which packages are abandoned is not what's most the most terrifying thing — it's how many other packages still use these packages, years after the last commit, years after distro developers had to start patching them to have them work at all.
I'm talking of clint (2015), I'm talking of passlib (2020, though author reappeared recently), WebOb (2021), Genshi (2022). I'm talking of Bottle whose author doesn't seem to be able to accept `cgi` removal from stdlib. I'm talking of Aesara that used to be a fork of Theano, and that apparently has been forked again. I'm talking of HttpBin that was abandoned in 2018, then revived by PSF, but it's far from being well-maintained right now.
The world has moved on, apparently.

@crell@phpc.social
2024-05-13 15:27:09

Teaching #Python folks the joys of clear and explicit object type definitions. An interesting experience...
#Programming

@joe@toot.works
2024-05-31 13:23:36

If anyone wants to come hang out with me later, I am giving a short "Crafting Intelligent Python Apps with Retrieval-Augmented Generation" talk online at 12:30 (Milwaukee time)
#AI #RAG #Python

@Madelen@social.linux.pizza
2024-04-12 18:29:44

RenPy is such an interesting project.
#programming #python

@jamesthebard@social.linux.pizza
2024-06-11 20:01:21

Ah, things I found interesting...
- Figuring out if there are `NaN` numbers in a Python list: `any(i != i for i in float_list)`.
- Replacing single newlines while ignoring double newlines: `"\n\n".join([i.replace("\n", ' ') for i in cool_string.split("\n\n")])`
#python

@anders@mastodon.cyborch.com
2024-05-07 06:19:41

The more of these comments that pop up in my feed the more it feels like the internet is conspiring to make me try Julia for my next data science project.
#python #julia
From: @…

@farshidhakimy@chaos.social
2024-05-09 12:16:00

Kann man in #Python eigentlich Variablen z.B. mit #Redis oder anderen Key-Value-Stores ersetzen und dabei so wenig Code wie möglich verändern?
Sodass die Variablen sozusagen auf allen Servern in Echtzeit den gleichen Wert haben?

@mrysav@social.linux.pizza
2024-06-11 02:15:19

One thing that #python has on #ruby is that - to my eyes - I can write a mess of spaghetti code without running it in python and think "I think this is going to work."
Of course, running it is key...

@scottmiller42@mstdn.social
2024-04-08 04:02:13

It's really a bummer that #Python enumerate doesn't have an option to tell it to go backwards.
Also, it took me way too long to figure out that code like this doesn't do what I wanted it to do. (The index doesn't match the location in MyString.)
MyString = "Hello"
for index , Char in enumerate (MyString[::-1]):
print (index, Char)
0 o
1 …

@hynek@mastodon.social
2024-05-11 07:44:02

Come for wisdom on tox & Nox – stay for unrelated gems that will improve your life! #python #video
youtu.be/ImBvrDvK-1U

@frankel@mastodon.top
2024-06-08 17:12:02

#Python's many command-line utilities
pythonmorsels.com/cli-tools/

@underdarkGIS@fosstodon.org
2024-06-06 15:39:59

Note to self: Between #QGIS versions 3.34.5 and 3.34.6, the packaging for the #Windows version of QGIS changed from #Python 3.9 to Python 3.12.
Will have to test if/how

@UP8@mastodon.social
2024-06-06 10:39:38

🧮 50x faster conda environment solving with "sharded" repodata
(… nice to see that Python packaging systems are finally discovering that cache matters!)
prefix.dev/blog/sharded_repoda

@kernellogger@fosstodon.org
2024-05-30 17:50:20

Wait, what? Building #Linux now (e.g. since [1], which is in 6.10-rc1) requires #python[2]? At least when building the msm graphics driver? Uhh, interesting. 🧐
[1]

@simon_brooke@mastodon.scot
2024-04-29 15:18:30

The available open source libraries for generating human models (MakeHuman, ManuelBastioniLab) appear to be written in #Python. I need something like this, but I'm working primarily in #Clojure. I'm wondering whether it would be easier to load one of the existing libraries into Jython and try to …

@karlauerbach@sfba.social
2024-03-23 22:54:06

I have noticed that some of my Python builds are emitting "Sorry" error messages rather than "Error" message for things like indentation flaws.
"Sorry" is a sorry way to flag an error.
#python

@mgorny@social.treehouse.systems
2024-06-17 15:53:22

Sometimes people ask me why I stabilize #Gentoo #Python packages after 2 weeks, rather than following the usual standard of 4 weeks.
The answer is simple: expecting tests in these packages to still pass whole 4 weeks after the release is a bit much.

@tinoeberl@mastodon.online
2024-05-30 17:29:48

Kann man #Python eigentlich auf einem alten #Android Handy laufen lassen?
Bestimmt, oder? 🤔
Und Cron-Jobs?
Bestimmt, oder? 🤔

Ein Comic-Fragezeichen mit neugierigen Augen.
@JGraber@mastodon.social
2024-06-07 18:01:49

#Python Friday #230: Fix the PydanticJsonSchemaWarning in #FastAPI

@cark@social.tchncs.de
2024-03-28 20:23:16

I am working on a significant improvement to debug #Python code in #Jupyter notebooks:
It is based on the possibility to connect to a running Jupyter kernel from the command line and execute code in that context.
There, we can rerun the failing code and apply a custom excepthook to sta…

@nobodyinperson@fosstodon.org
2024-05-04 11:42:49

I think I have finally™️ (for the third or so time) found myself a solution for :python: #Python development on :nixos: #NixOS that allows me to just work with #pythonPoetry et. al. as on other distros.

@mgorny@pol.social
2024-06-14 15:57:23

Po kolejnej rundzie portów do Pythona 3.13 w #Gentoo, przychodzi mi do głowy ten mem z wielką, zatłoczoną autostradą, tyle że z komentarz:
Tylko jeszcze jeden microframework! Obiecuję wam, jeszcze jeden microframework i wszystkie problemy zostaną rozwiązane!
#Python

@jamesthebard@social.linux.pizza
2024-06-10 21:26:16

Severe Thunderstorm Watch here in Charleston, SC, which means it's time to breakout the NWS program...now using `webfsd` to serve the generated images. I am skipping a few types of events, but it's nice to have a real-time thread of watches/warnings as they come in. #weather #python

A screenshot of two terminal windows and Visual Studio Code being open on a desktop.  The top-left terminal window shows the processed NWS events to include the event type, area, and the filename of the image generated.  The terminal window on the top-right shows webfsd serving the images generated.  The VSC window shows the update Python code to process the alerts as they come in.
@cdp1337@social.veraciousnetwork.com
2024-05-09 05:11:23

#Python
As I'm working on my #networking diagnostic script which relies on my OS abstraction layer for system information I built a number of years back, I decided it would make more sense to formally port this API up to pypi as a standalone library. (It doesn…

@mgorny@social.treehouse.systems
2024-05-12 13:11:12

These is one of these days when it occurs to you: "hey, packages using #Python and #RustLang, may have *both* Python and Cargo-level tests." And then you spend a lot of time going over all Rust-enabled dev-python/* packages and adding `cargo_src_test` where appropriate.
As it turns out, many of them did. Most of these don't actually link to libpython, so I suppose it's fine to test them once. Pydantic-core does, so I test per-impl (but also can't test on PyPy). Cryptography has Rust-level tests that don't even build (they fail at linking).
#Gentoo

@anders@mastodon.cyborch.com
2024-05-07 06:19:41

The more of these comments that pop up in my feed the more it feels like the internet is conspiring to make me try Julia for my next data science project.
#python #julia
From: @…

@JGraber@mastodon.social
2024-04-05 18:21:34

#Python Friday #221: Refactor the #FastAPI To-Do Application
i…

@mgorny@social.treehouse.systems
2024-06-16 17:26:43

Today's exercise: checking how many #Gentoo packages can be ported to #Python 3.13, while new kernel binary packages are building.
Then I'm going to have a hard exercise in rebasing.

@MrBerard@pilote.me
2024-04-27 09:15:28

If you are learning Python, I'm making a clicker-style game (but that doesn't threaten the lifespan of your mouse) at 1400 BST (1300 UTC).
Live coding: Cookie clicker, but without clicking (or cookies) #python #...

@joe@toot.works
2024-05-02 22:33:46

I'm close to having @… sorted out. With a new API comes slightly different data points. #python

@jamesthebard@social.linux.pizza
2024-06-12 16:33:06

Hrmm, this might be a slight issue...pretty sure the map shouldn't be "generic white box"... #python

A picture of a Discord embed showing a Flash Flood Warning expiration/update.  The map is just a white rectangle which is a slight issue.
@mgorny@social.treehouse.systems
2024-06-16 17:26:43

Today's exercise: checking how many #Gentoo packages can be ported to #Python 3.13, while new kernel binary packages are building.
Then I'm going to have a hard exercise in rebasing.

@frankel@mastodon.top
2024-03-26 09:19:03

Breaking #Packages in #Python: an exposé of the nooks and crannies of Python’s modules and packages
dagster.io/bl…

@JGraber@mastodon.social
2024-05-03 18:00:50

#Python Friday #225: Set a Response Header With #FastAPI
improvean…

@cdp1337@social.veraciousnetwork.com
2024-05-08 03:33:48

#HomeLab #Python #Linux
Making progress on this network diagnostic script.
Thus far it reports:
Interface...
* name
* type
* status

Terminal application listing technical network stats useful for debugging a network connection
Terminal application listing technical wireless network stats useful for debugging a network connection
@tinoeberl@mastodon.online
2024-05-28 22:22:29

Hübscher Kommentar im #Quellcode:
# Erstelle eine schöne XML-Struktur
#python 🤪

@jamesthebard@social.linux.pizza
2024-06-12 20:10:26

Went ahead and posted the code for the NWS weather stuff to GitHub for ya @… however I'm not vouching for its quality. #python #programming

@mgorny@pol.social
2024-05-09 05:41:48

Wczoraj dodałem Pythona 3.13.0b1 do #Gentoo, razem ze wsparciem na poziomie eclass oraz pierwszą partią portów (z PyTestem włącznie).
Na razie tylko dla amd64, bo musimy przetestować mpdecimal.
#Python

@joe@toot.works
2024-05-02 22:33:46

I'm close to having @… sorted out. With a new API comes slightly different data points. #python

@mgorny@social.treehouse.systems
2024-06-14 15:56:27

After another round of #Python 3.13 porting in #Gentoo, I'm imagining that huge crowded highway meme, except it's saying:
Just one more microframework! I promise you, one more microframework and all problems will be solved!

@hynek@mastodon.social
2024-05-27 21:46:39

My final act before vacation is done: structlog 24.2.0! #Python
Enjoy a bunch of bug fixes, better Logfmt support, and some optimizations!
github.com/hynek/structlog/rel

@nobodyinperson@fosstodon.org
2024-05-03 11:36:24

Can one pre-build a buildFHSUserEnv in configuration.nix and then have a command like 'fhs' that yanks you into a shell with all your environment.systemPackages in an FHS layout?
All my tries have given me either infinite recursion errors or other problems.
Seems like a way out of the #Python development misery on

@jamesthebard@social.linux.pizza
2024-06-12 12:33:26

Ran the NWS updates script overnight, didn't see any errors and the image directory has a ton of images in it which makes me happy. Still have a bit more cleanup to do, but a really good sign. #weather #python

The log output for the script that pulls NWS alerts from the API and generates maps with cool red polygons on it.
A picture of the images directory where all of the NWS alert images are served from.
@mgorny@social.treehouse.systems
2024-06-14 01:51:36

When someone reports a crash bug and the release fixing it only mentions "improving performance".
Well, I guess unaligned writes may degrade performance. Having #RustLang extension crash #Python ain't important after all.
#Gentoo

@JGraber@mastodon.social
2024-03-29 19:00:36

#Python Friday #220: Manage To-Dos With #FastAPI
improveandrepeat.com/2024…

@jamesthebard@social.linux.pizza
2024-06-11 19:16:52

Alright, time to see if all the changes worked. Of course, to test it I'll need nature to provide some severe storms which seems kinda wrong... #python #weather

A picture of the desktop showing two terminal windows, one polling and processing NWS API messages, the other serving generated map images.  Beside those is Visual Studio Code showing part of the map generation code.
@nobodyinperson@fosstodon.org
2024-05-03 11:36:24

Can one pre-build a buildFHSUserEnv in configuration.nix and then have a command like 'fhs' that yanks you into a shell with all your environment.systemPackages in an FHS layout?
All my tries have given me either infinite recursion errors or other problems.
Seems like a way out of the #Python development misery on

@mgorny@social.treehouse.systems
2024-05-14 19:13:45

#CPython 3.13 has some new fun flags for #Gentoo ricers.
USE=jit − enable to get Just-in-Time compiler and make stuff faster. Note that you're also going to see random segfaults, etc.
USE=gil − disable to get rid of Global Interpreter Lock and get a freethreading #Python. Expect some random breakage, race conditions, etc.

@jamesthebard@social.linux.pizza
2024-06-11 17:50:10

Started cleaning up the code a bit and documenting everything before I post it. There are still a few issues, but the app runs solidly enough to process the NWS API messages at a regular interval. #python #weather

A screenshot of Visual Studio Code showing the `Bounds` class with everything documented using docstrings.
@mgorny@pol.social
2024-03-22 19:03:58

Cytując siebie (i tłumacząc):
"""
Szczerze mówiąc, uważam, że największym problemem jest to, że dystrybucja oprogramowania w Pythonie jest nieskończenie skomplikowana i nieintuicyjna, co oznacza, że każda osoba, która chce się tym zająć z którejkolwiek strony, ku swojemu zaskoczeniu odkryje bardzo wysoki próg wejścia. #Gentoo

@JGraber@mastodon.social
2024-04-26 18:00:49

#Python Friday #224: Better HTTP Status Codes for #FastAPI
impro…

@mgorny@social.treehouse.systems
2024-04-19 18:48:42

#PEP517 provides a single interface to all #Python build systems, so people wouldn't have to implement special code to use every one of them.
That's why #Gentoo Python eclasses now carry special logic and hacks for 5 different PEP517 build systems. And I'm only counting detailed stuff, not baseline code like detecting the build backend, handling dependencies and deprecated build backends.
gitweb.gentoo.org/repo/gentoo.

@nobodyinperson@fosstodon.org
2024-05-02 13:51:11

What would cause :git: #git to shell out at 'git -C repo fetch --all'?
I call git via #Python's subprocess module (no, not with shell=True) and it apparently shells out to my default :fish_shell: #fishShell

@mgorny@social.treehouse.systems
2024-05-18 06:53:52

Well, we know that some upstreams are hostile to downstream testing.
However, how about they actually encrypt tests, so that only their CI can run them?
#Gentoo #Python

@jamesthebard@social.linux.pizza
2024-06-05 19:43:27

Alright, I've got the maps being generated and shared via a quick `python -m http.server` command and being fronted by my `nginx` server. Everything looks good from outside the network. Now we wait for the next watch/warning to pop. #programming #python

The output of the script showing new watches/warnings being processed from the NWS API.
@JGraber@mastodon.social
2024-05-17 18:00:34

#Python Friday #227: Hash a Password With #Bcrypt #security #FastAPI

@mgorny@social.treehouse.systems
2024-05-12 18:35:17

By the way, if you find my #Python 3.13 porting or other #Gentoo work helpful, please consider donating to my cat food fund.
#donation

@mgorny@social.treehouse.systems
2024-06-06 15:31:54

For a project that's supposed to avoid the vices of C, #CPython sure crashes a lot.
This time I was bisecting a regression in 3.13.0b2 that causes the interpreter crash when `freezegun` is imported. And no, not because freezegun was doing something hacky. Just some crazy internal extension state thingy.
#Gentoo #Python

@JGraber@mastodon.social
2024-03-22 19:01:04

#Python Friday #219: Structure your #FastAPI Application
improvean…

@mgorny@social.treehouse.systems
2024-05-12 16:45:48

How about tests that fail in a completely nondescript way if your hostname is 12 characters long? I mean, the bash prompt gets into output and breaks matching in one environment, and doesn't in an environment with a shorter hostname.
As it turns out, it was caused by putting a wrong path to bashrc override while adding zsh support to #ArgComplete. I guess most people didn't get a long enough bash prompt to hit the failure.
#Gentoo #Python

@mgorny@social.treehouse.systems
2024-05-09 05:39:34

I've added #Python 3.13.0b1 to #Gentoo yesterday, along with the initial eclass support and a few baseline ports (up to PyTest).
It's amd64-only for the time being, since we need to keyword mpdecimal.

@mgorny@social.treehouse.systems
2024-04-06 08:05:04

On 2024-03-19, two vulnerabilities were announced on #Python #security mailing list: "quoted zip-bomb" and "TemporaryDirectory symlink dereference during cleanup". Both were announced to affect all current #CPython releases.
The same day, security releases were made for Python 3.10, 3.9 and 3.8 branches. So far, so good. However, I found it surprising that there were no releases being made for 3.11 or 3.12.
On 2024-04-02, Python 3.11.9 was tagged. Initially, the signature on source tarball didn't verify. Today, it does verify, but the release still doesn't seem to have been announced. However, what I found the most surprising is the lack of fixes for the security issues announced before! Was the release borked?
So I've checked in more detail… and it turned out that both issues were already fixed in 3.11.8 (and 3.12.2), so the security announcement was wrong. Sigh.
That said, #PyPy is still affected.
mail.python.org/archives/list/
mail.python.org/archives/list/
discuss.python.org/t/python-3-
bugs.gentoo.org/927299

@jamesthebard@social.linux.pizza
2024-06-02 16:49:26

Making progress on the push notifications. Targeting Discord at the moment, but I think that the maps really help out with the information. Not satisfied with the formatting, but I'm not sure how much I want to dedicate to it. #programming #python

A Discord embed that shows a Severe Thunderstorm Warning issued by Norman OK.  It contains the Affected Areas, Description, and a map with the warning polygon.
@JGraber@mastodon.social
2024-04-12 18:01:03

#Python Friday #222: Filter the Tasks in the #FastAPI Application #DependencyInjection

@mgorny@social.treehouse.systems
2024-04-08 16:21:15

Did you notice that the word "backslashes" includes "lashes"? That's precisely how I feel about people using unnecessary backslashes all over the place in #Python or #Bash code.
#Gentoo

@mgorny@social.treehouse.systems
2024-05-14 12:40:54

Here's my newest optimization idea for #Gentoo #Python: for pure Python packages and packages using the stable #CPython API, let's reuse previously built wheels if they're compatible instead of building them separately for each Python implementation.
This is mostly a major gain for the lot of packages using #setuptools when you're using multiple PYTHON_TARGETS, since calling into that build system has a significant cost. However, it also saves some actual compiling in the packages using the stable API (particularly, Rust packages).
github.com/gentoo/gentoo/pull/
bugs.gentoo.org/931689

@mgorny@social.treehouse.systems
2024-06-07 16:09:54

In the past, many NumPy-based projects built their wheels against `oldest-supported-numpy` package to ensure the best ABI compatibility between multiple #NumPy versions.
Then NumPy 2 came and reversed that — now you need to build against NumPy 2 rather than 1.x, to gain ABI compatibility with both versions.
That said, if you want to maintain support for #Python 3.8, then you have to hack even more:
#Gentoo

@mgorny@social.treehouse.systems
2024-06-07 15:41:11

Please don't use #Mercurial. It's not well-maintained software.
People like to point out that Mercurial works great for a few BigTech corporations. That's great for them. The side effect is that the development is focused on these corporations, and if you find a bug that doesn't affect them, you better be ready to provide a fix yourself.
#Python 3. The first release with Python 3 was made *two months* before Python 2 went EOL.
#RustLang. Funny thing is, Mercurial with Rust extensions enabled still doesn't work on Python 3.12. Apparently, they've chosen to use some NIH Python/Rust bridge rather than PyO3.
#Gentoo

@mgorny@social.treehouse.systems
2024-06-04 15:46:57

It took me almost 3 hours but #PipX 1.6.0 is now in #Gentoo, with an updated test shim that makes it possible to test using fake wheels and is only 70 KiB (vs. upstream that uses ~160 MiB for every single implementation).
What's more important, this time it isn't a handmade proof-of-concept anymore but a proper script with instructions that can be used to easily deal with future releases.
#Python

@mgorny@social.treehouse.systems
2024-04-04 18:19:10

It's a miracle! I've managed to make #SciKit Image tests work offline in #Gentoo!
That said:
1. Upstream includes most of the test data in sdist. Except they don't use it, and instead fetch it all from the GitHub repository. Sigh. (If you're upstream, please pretend you didn't see this and do not remove the data from sdist. Thanks.)
2. On top of that, they fetch more test data from an additional GitLab repository, and move and rename it around.
3. Yes, you've read right. They keep code on GitHub, but test data on GitLab.com (not self-hosted).
#Python