Closed antecrescent closed 4 months ago
The dependency installation for the previous macOS build failed, because there's no arm64 wheel available on PyPI for >=tree-sitter-bash-0.21.0.
The dependency installation for the previous macOS build failed, because there's no arm64 wheel available on PyPI for >=tree-sitter-bash-0.21.0.
let's ignore that. I'll make it not failing issue. The next release by tree-sitter-bash
will have sdist + macos wheels (link) so it will fix itself in future.
My pleasure!
Problem
Pkgcheck's underlying ftplib raises an unintended
ValueError
, before establishing a connection to a ftp site, when--timeout
is set to 0.Fix
Instead of 0, pkgcheck should pass
None
here. Legal timeout values are described here: https://docs.python.org/3/library/socket.html#socket.socket.settimeout Since we now want to passNone
regardless of the protocol iftimeout
is 0, I moved the value-handling part toNetAddon
, which serves it both to theSession
constructor, as well as toNetworkCheck
and thus to_ftp_check
.I also modified
test_custom_timeout
to assert thatNetAddon
handles all non-negative inputs correctly.I'm looking forward to hearing your feedback!
How to Reproduce
With ::gentoo at checkout
127160ac611d39cc6bb2ca21fcf99a086fe2b176
:pkgcheck scan --net -c HomepageUrlCheck --timeout 0 app-admin/chrootuid
should not fail but it does: