workflows: drop requests dependency from p2pool hash verification

857f0bc6 moved the p2pool-hashes job to the ubuntu-slim runner, which
does not ship the requests module, so the check fails with
ModuleNotFoundError for every pull request touching P2PoolManager.cpp.
Use urllib from the standard library for the single API call instead.
This commit is contained in:
Thomas committed 2026-07-15 10:50:40 +02:00
1 parent fc2ac55fff
commit 0575b7d609
1 file changed
+4 -3
+4 -3
View File
@@ -1,6 +1,6 @@
import requests
import json
import subprocess
from urllib.request import urlretrieve
from urllib.request import urlopen, urlretrieve
import difflib
sech_key = "https://p2pool.io/SChernykh.asc"
@@ -32,7 +32,8 @@ def get_hash(fname):
def main():
global p2pool_files, sech_key, sech_key_backup, sech_key_fp
p2pool_tag_api = "https://api.github.com/repos/SChernykh/p2pool/releases/latest"
data = requests.get(p2pool_tag_api).json()
with urlopen(p2pool_tag_api) as response:
data = json.load(response)
tag = data["tag_name"]
head = f"p2pool-{tag}-"
url = f"https://github.com/SChernykh/p2pool/releases/download/{tag}/"