After further investigations into the gzip issue in python 3.12, it turns out there was an undocumented change: it is now a buffered writer. So the fire&forget pattern used in the snippet above doesn't work anymore, we now need to use it as a proper IO object instead.
I still think this should be reported upstream because of the documentation issue, but I'll work on changing the apport code to Do The Right Thing.
After further investigations into the gzip issue in python 3.12, it turns out there was an undocumented change: it is now a buffered writer. So the fire&forget pattern used in the snippet above doesn't work anymore, we now need to use it as a proper IO object instead.
I still think this should be reported upstream because of the documentation issue, but I'll work on changing the apport code to Do The Right Thing.