Fix deb822 decoding and CI
This is a two parts MR that fixes an importer crash on some binary input and the broken CI we've had since a couple of months due to an external bug.
Importer crash
Following an upload on the 15th April, the importer crashed and stop processing uploads. Upon further investigation, the changes file uploaded was actually a copy of the origin tarball, which meant the debian.deb822 was processing binary data.
While we already have tests to do error handling for that module, this upload revealed another possible way for the module to raise an exception that we weren't handling.
In detail, the module would raise an exception on instantiation (instead of in the parsing method) if the input data fails to decode twice in two different encodings.
The uploaded binary data was detected by the chardet module as TIS-620, causing debian.deb822 to try to decode it as UTF-8 and then TIS-620. The data being invalid in both encoding, it triggers the exception.
I've managed to strip down the data to a 5 bytes seed, holding the same properties. This seed has been used in the unit test to trigger the bug.
The code has been updated to catch that exception and now works for any input.
The fix is available for Changes, Dsc and Control files.
Fixing the CI
Since a couple of months, the CI on debexpo has been failing, with a rather cryptic exception about redis. I managed to track down the bug to fakeredis, failing to import lupa correctly.
A bug has been filed against fakeredis as #1106749 - python3-fakeredis: lua support not working, breaking django-redis cache locking.
As it is late in trixie developement cycle, and fakeredis being a key package would require an unblock, I'm not sure it will be fixed by release time. Therefor, I've added a temporary workaround in the test settings to bypass the bug. It boils down to aliasing lupa.lua51 as lupa.lua to allow fakeredis to succeed its import.
Using that method, the CI is passing again.