chore: upgrade all Python packages and fix linting issues

- Update all dependencies to latest versions (fastmcp, httpx, packaging, etc.)
- Downgrade click from yanked 8.2.2 to stable 8.1.7
- Fix code formatting and linting issues with ruff
- Most tests passing (2 test failures in dependency resolver need investigation)
This commit is contained in:
Ryan Malloy 2025-08-15 20:23:14 -06:00
parent 503ea589f1
commit 8b43927493
34 changed files with 2276 additions and 1593 deletions

View file

@ -2,8 +2,9 @@
"""Quick test to verify fallback mechanism works."""
import asyncio
import sys
import os
import sys
sys.path.insert(0, os.path.abspath("."))
from pypi_query_mcp.tools.download_stats import get_package_download_stats
@ -12,23 +13,23 @@ from pypi_query_mcp.tools.download_stats import get_package_download_stats
async def quick_test():
"""Quick test with a single package."""
print("Testing fallback mechanism with requests package...")
try:
stats = await get_package_download_stats("requests", period="month")
print(f"✅ Success!")
print("✅ Success!")
print(f"Package: {stats.get('package')}")
print(f"Data Source: {stats.get('data_source')}")
print(f"Reliability: {stats.get('reliability')}")
if stats.get('warning'):
if stats.get("warning"):
print(f"⚠️ Warning: {stats['warning']}")
downloads = stats.get("downloads", {})
print(f"Downloads - Month: {downloads.get('last_month', 0):,}")
return True
except Exception as e:
print(f"❌ Error: {e}")
return False
@ -36,4 +37,4 @@ async def quick_test():
if __name__ == "__main__":
success = asyncio.run(quick_test())
sys.exit(0 if success else 1)
sys.exit(0 if success else 1)