Release Notes:
This release focuses on code quality improvements, better error handling, and enhanced diagnostics. It consolidates duplicate code, standardizes patterns across the codebase, and adds URL validation to catch malformed input early.
There are no breaking changes in this release.
What's New
-
URL Validation: URLs are now validated before archiving. Invalid URLs (missing scheme, non-HTTP protocols, malformed structure) are filtered out with a warning rather than being sent to the API where they would fail.
-
Improved Exception Handling: Exception handling has been narrowed to catch specific error types (
RequestException,ValueError,OSError) rather than broadExceptioncatches. This prevents masking unexpected errors while still handling known failure modes gracefully—including malformed API responses that return HTML instead of JSON. -
Debug Logging for API Troubleshooting: Added debug-level logging for status API responses and skipped job entries. Run with
--log DEBUGto see raw API responses when diagnosing issues. -
Code Consolidation: Removed duplicate code and standardized patterns:
- Consolidated
LOCAL_PREFIXconstant intositemaps.pywith proper export - Extracted
_create_session_with_retries()helper for HTTP session setup - Removed unused
check_status()method fromSPN2Client - Standardized all string formatting to f-strings
- Consolidated
-
Test Improvements: Expanded test coverage from 39 to 64 tests. Standardized test fixtures to use
monkeypatchfor proper isolation and added tests for URL validation, sitemap processing, and workflow error handling.