On Thu, Sep 26, 2024 at 01:02:14PM -0700, Soren Stoutner wrote:
> 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.
pybuild prohibits network access to all programs that honor http(s)_proxy
envvars. That's why the error mentions a proxy.
> 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?
In this case - just skip the whole file via appropriate PYBUILD_TEST_ARGS.
--
WBR, wRAR
Attachment:
signature.asc
Description: PGP signature