Skip to content

v4.35.1 - Emergency Fix: HTTP 304 Handling

Choose a tag to compare

@dgunning dgunning released this 07 Dec 18:57
· 1756 commits to main since this release

v4.35.1 - Emergency Point Release

Critical Bug Fix

This is an emergency point release fixing a critical bug that broke the primary API entry point.

Issue #519: HTTP 304 Not Modified Breaking Company(ticker) Lookup

Priority: P0 (Emergency)
Beads Issue: edgartools-4e1
GitHub Issue: #519

Problem

Company("MSFT") and all ticker-based company lookups were failing with the error:

Both data sources are unavailable

This occurred when the SEC returned HTTP 304 "Not Modified" responses (standard caching behavior).

Root Cause

The inspect_response() function in edgar/httprequests.py only accepted HTTP 200 status codes, treating HTTP 304 "Not Modified" responses as errors. HTTP 304 is a valid success response indicating that cached content is still valid.

Fix

  • Updated inspect_response() to accept both 200 and 304 status codes
  • Added comprehensive regression tests (7 new tests)
  • All existing tests pass (42 httprequests and ticker tests)

Impact

✅ Fixes core functionality: Company(ticker) now works correctly with cached responses
✅ Restores beginner-friendly API: Primary documented entry point works as expected
✅ No breaking changes: All existing functionality preserved

Files Changed

  • edgar/__about__.py - Version bumped to 4.35.1
  • edgar/httprequests.py - Updated inspect_response() to accept 304
  • tests/issues/regression/test_issue_519_http_304.py - New regression tests

Installation

Now available on PyPI! 🚀

pip install --upgrade edgartools

Verify the version:

import edgar
print(edgar.__version__)  # Should show 4.35.1

Testing

All tests pass:

  • ✅ 7 new HTTP 304 regression tests
  • ✅ 42 existing httprequests and ticker tests
  • ✅ No breaking changes detected

Timeline

  • Reported: 2025-12-05 (Issue #519)
  • Triaged: 2025-12-07 (Classified P0)
  • Fixed: 2025-12-07 (Same day - emergency response)
  • Released to GitHub: 2025-12-07
  • Published to PyPI: 2025-12-07

Total time from triage to PyPI: ~2 hours ⚡

Credits

Special thanks to @happydebugcow for the detailed bug report with reproduction steps!


Full Changelog: v4.35.0...v4.35.1