I am in the process of adopting and updating python-trezor.  Upstream now 
contains a test that involves downloading a binary firmware package from the 
internet [1].

This test causes the build to fail with the following error message, both on 
my local sbuild and on Salsa [2]:

requests.exceptions.ProxyError: HTTPSConnectionPool(host='data.trezor.io', 
port=443): Max retries exceeded with url: /firmware/2/trezor-2.4.2.bin (Caused 
by ProxyError('Unable to connect to proxy', 
NewConnectionError('<urllib3.connection.HTTPSConnection object at 
0x7f6d1440d040>: Failed to establish a new connection: [Errno 111] Connection 
refused’)))

Loading the URL [3] in a browser allows downloading of the file.  I do not know 
why the test fails in my local sbuild as I don’t believe it prohibits network 
access.  But it should fail on the buildds, so it needs to be addressed.

I would appreciate some guidance from more experienced Python packagers on the 
best way to proceed.

1.  What is the best (idomatic) way to disable this test during build?

2.  I would still like to run this test as an autopkgtest.  My guess is it 
will fail there for the same reasons are that it is failing here (probably 
because it is looking for a proxy that doesn’t exist).  Does anyone know the 
best way to approach that?  Does it cause a DFSG problem if it downloads a 
binary firmware image?  A cursory investigation would indicate the firmware 
source code is available under DFSG-free licenses [4].

[1] https://salsa.debian.org/python-team/packages/python-trezor/-/blob/debian/
master/tests/test_firmware.py?ref_type=heads

[2] https://salsa.debian.org/python-team/packages/python-trezor/-/jobs/
6341154#L6882

[3] https://data.trezor.io/firmware/2/trezor-2.4.2.bin

[4] https://github.com/trezor/trezor-firmware/blob/main/LICENSE.md

-- 
Soren Stoutner
so...@debian.org

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to