From 95e43df1be6a0d7f4f33d729cfa65a6fb8cbc3a5 Mon Sep 17 00:00:00 2001 From: salmonik Date: Thu, 21 May 2026 16:15:21 +0200 Subject: reqs and test fix Signed-off-by: salmonik --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'requirements.txt') diff --git a/requirements.txt b/requirements.txt index 81f00ef..d43181f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -33,7 +33,7 @@ numpy==2.4.4 packaging==26.1 pillow==12.2.0 propcache==0.4.1 -py-cord @ file:///home/salmon/Documents/botcode/senator-sperma/pycord +py-cord==2.8.0 pycparser==3.0 pycryptodomex==3.23.0 PyNaCl==1.6.2 -- cgit v1.2.3 From 053e3d959c592f5ddc15a0f0898d9b7e1deb8d6f Mon Sep 17 00:00:00 2001 From: salmonik Date: Thu, 21 May 2026 16:37:49 +0200 Subject: requirements shenanigans Signed-off-by: salmonik --- AGENTS.md | 2 +- README.md | 2 +- requirements-dev.txt | 53 ++++++---------------------------------------------- requirements.txt | 47 +++------------------------------------------- scripts/bump_reqs.py | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 61 insertions(+), 93 deletions(-) create mode 100644 scripts/bump_reqs.py (limited to 'requirements.txt') diff --git a/AGENTS.md b/AGENTS.md index 8d0b743..5f62ec3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,7 +1,7 @@ # Agent Instructions for Senator Sperma ## Required Setup -- Requires **Python 3.13** (3.14 not supported - py-cord incompatibility) +- Requires **Python 3.14** - System dependencies: `ffmpeg`, `zbar` library (installed system-wide) - Bot token in `.env` file (copy from `.env.example`) diff --git a/README.md b/README.md index 8e71dbe..e9cf127 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A Discord bot with music playback, TTS, web search, and utility commands. -Requires Python 3.13 (py-cord doesn't support 3.14 yet). +Requires Python 3.14. ## Setup diff --git a/requirements-dev.txt b/requirements-dev.txt index 6a6279c..ed5f5cc 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,59 +1,18 @@ -pytest==8.3.4 -pytest-asyncio==0.25.2 -pytest-mock==3.14.0 +pytest==9.0.3 +pytest-asyncio==1.3.0 +basedpyright==1.39.5 aiofiles==25.1.0 -aiohappyeyeballs==2.6.1 -aiohttp==3.13.3 -aiosignal==1.4.0 -anyio==4.12.1 -attrs==25.4.0 -basedpyright==1.39.2 +aiohttp==3.13.5 beautifulsoup4==4.14.3 -brotli==1.2.0 -bs4==0.0.2 -certifi==2026.2.25 -cffi==2.0.0 -charset-normalizer==3.4.6 -click==8.1.8 -contourpy==1.3.3 croniter==6.2.2 -cycler==0.12.1 -davey==0.1.4 -dotenv==0.9.9 -fonttools==4.62.1 -frozenlist==1.8.0 gTTS==2.5.4 -h11==0.16.0 -httpcore==1.0.9 httpx==0.28.1 -idna==3.11 -kiwisolver==1.5.0 -matplotlib==3.10.8 -multidict==6.7.1 mutagen==1.47.0 -nodejs-wheel-binaries==24.14.1 -numpy==2.4.4 -packaging==26.1 pillow==12.2.0 -propcache==0.4.1 py-cord==2.8.0 -pycparser==3.0 -pycryptodomex==3.23.0 -PyNaCl==1.6.2 -pyparsing==3.3.2 -python-dateutil==2.9.0.post0 python-dotenv==1.2.2 -pytube==15.0.0 pyzbar==0.1.9 qrcode==8.2 -RapidFuzz==3.14.3 -requests==2.32.5 -six==1.17.0 -soupsieve==2.8.3 -typing_extensions==4.15.0 -urllib3==2.6.3 -websockets==16.0 -yarl==1.23.0 -youtube-search-python==1.6.6 +requests==2.34.2 yt-dlp==2026.3.17 -yt-dlp-ejs==0.8.0 +youtube-search-python==1.6.6 diff --git a/requirements.txt b/requirements.txt index d43181f..5fb918e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,56 +1,15 @@ aiofiles==25.1.0 -aiohappyeyeballs==2.6.1 -aiohttp==3.13.3 -aiosignal==1.4.0 -anyio==4.12.1 -attrs==25.4.0 -basedpyright==1.39.2 +aiohttp==3.13.5 beautifulsoup4==4.14.3 -brotli==1.2.0 -bs4==0.0.2 -certifi==2026.2.25 -cffi==2.0.0 -charset-normalizer==3.4.6 -click==8.1.8 -contourpy==1.3.3 croniter==6.2.2 -cycler==0.12.1 -davey==0.1.4 -dotenv==0.9.9 -fonttools==4.62.1 -frozenlist==1.8.0 gTTS==2.5.4 -h11==0.16.0 -httpcore==1.0.9 httpx==0.28.1 -idna==3.11 -kiwisolver==1.5.0 -matplotlib==3.10.8 -multidict==6.7.1 mutagen==1.47.0 -nodejs-wheel-binaries==24.14.1 -numpy==2.4.4 -packaging==26.1 pillow==12.2.0 -propcache==0.4.1 py-cord==2.8.0 -pycparser==3.0 -pycryptodomex==3.23.0 -PyNaCl==1.6.2 -pyparsing==3.3.2 -python-dateutil==2.9.0.post0 python-dotenv==1.2.2 -pytube==15.0.0 pyzbar==0.1.9 qrcode==8.2 -RapidFuzz==3.14.3 -requests==2.32.5 -six==1.17.0 -soupsieve==2.8.3 -typing_extensions==4.15.0 -urllib3==2.6.3 -websockets==16.0 -yarl==1.23.0 -youtube-search-python==1.6.6 +requests==2.34.2 yt-dlp==2026.3.17 -yt-dlp-ejs==0.8.0 +youtube-search-python==1.6.6 diff --git a/scripts/bump_reqs.py b/scripts/bump_reqs.py new file mode 100644 index 0000000..5d253e7 --- /dev/null +++ b/scripts/bump_reqs.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python3 +"""Bump all pinned versions in requirements*.txt to latest from PyPI.""" + +import json +import re +import urllib.request +from pathlib import Path + +REQS = sorted(Path().glob("requirements*.txt")) +PYPI = "https://pypi.org/pypi/{}/json" + + +def latest_version(package: str) -> str | None: + url = PYPI.format(package) + try: + with urllib.request.urlopen(url, timeout=10) as resp: + data = json.load(resp) + return data["info"]["version"] + except Exception: + return None + + +def bump_file(path: Path): + lines = path.read_text().splitlines() + changed = [] + for line in lines: + m = re.match(r"^([\w-]+(?:\[[\w-]+])?)==[\w.]+$", line) + if m: + pkg = m.group(1) + latest = latest_version(pkg) + if latest: + changed.append(f"{pkg}=={latest}") + if f"{pkg}=={latest}" != line: + print(f" {pkg}: {line.split('==')[1]} -> {latest}") + else: + changed.append(line) + print(f" {pkg}: failed to fetch, keeping current") + else: + changed.append(line) + path.write_text("\n".join(changed) + "\n") + + +def main(): + for req in REQS: + print(f"\n{req}:") + bump_file(req) + + +if __name__ == "__main__": + main() -- cgit v1.2.3