diff --git a/roles/copy-wheels/files/wheel-indexer.py b/roles/copy-wheels/files/wheel-indexer.py index 75ceeda8bb..c3c27044b3 100644 --- a/roles/copy-wheels/files/wheel-indexer.py +++ b/roles/copy-wheels/files/wheel-indexer.py @@ -91,7 +91,7 @@ def get_sha256(filename): with open(filename, "rb") as f: for b in iter(lambda: f.read(4096), b''): sha256.update(b) - return(sha256.hexdigest()) + return sha256.hexdigest() def create_index(path, files): diff --git a/tools/check_irc_access.py b/tools/check_irc_access.py index 7d90b89129..1431ae9576 100755 --- a/tools/check_irc_access.py +++ b/tools/check_irc_access.py @@ -142,7 +142,13 @@ def main(): for x in range(16)) port = int(args.port) if port == 6697: - factory = irc.connection.Factory(wrapper=ssl.wrap_socket) + context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + # Set to false as the irc connection factory doesn't pass the + # server hostname into the wrapper which is required for hostname + # checking. Since this is just for testing risk is low. + context.check_hostname = False + context.verify_mode = ssl.CERT_NONE + factory = irc.connection.Factory(wrapper=context.wrap_socket) a.connect(args.server, int(args.port), mynick, connect_factory=factory) else: diff --git a/tox.ini b/tox.ini index ad6fca00d4..7716c27336 100644 --- a/tox.ini +++ b/tox.ini @@ -37,7 +37,7 @@ deps = # pin these two until someone has time to update all our skips to >=6.16 ansible-lint>=6.0.0,<6.5.0 ansible-compat<4 - hacking>=4.0.0,<5.0.0 + hacking>=7.0.0,<8.0.0 bashate>=0.2 commands = {toxinidir}/tools/ansible-lint-roles-cache.sh