Release v4.21.3 - Current Filings Module Bug Fixes
Release v4.21.3 - Current Filings Module Bug Fixes
This point release includes critical bug fixes and code quality improvements in the current_filings module.
Fixed
Current Filings Module: Multiple bug fixes and improvements - Fixed critical bugs and improved error handling
Bug 1 - Regex Greedy Matching
- Problem: Company names containing " - " (dash) were incorrectly split
- Example: "Greenbird Intelligence Fund, LLC Series U - Shield Ai" parsed as Form="D - Greenbird..." and Company="Shield Ai"
- Root Cause: Greedy regex pattern
(.*)matched to last dash instead of first - Fix: Changed to non-greedy
(.*?)inedgar/current_filings.py:31
Bug 2 - Missing Owner Filter in Pagination (CRITICAL)
- Problem:
next()andprevious()methods lost theownerfilter when paginating - Impact: Filtering by owner ('include', 'exclude', 'only') broke after first page
- Root Cause: Missing
owner=self.ownerparameter inget_current_entries_on_page()calls - Fix: Added
owner=self.ownerparameter in lines 154 and 166
Bug 3 - AssertionError in Production
- Problem:
parse_title()usedassertwhich can be disabled with-Oflag - Fix: Changed to
raise ValueError()with descriptive message (line 68)
Bug 4 - Missing Error Handling in parse_summary()
- Problem: Empty or missing 'Filed' date or 'AccNo' caused crash with unclear error
- Fix: Added explicit validation and descriptive ValueError messages (lines 87-98)
Bug 5 - Crash in Accession Number Search
- Problem:
_get_current_filing_by_accession_number()crashed when accession not found - Root Cause:
mask.index(True)raises ValueError if True not in mask - Fix: Wrapped in try/except to gracefully return None (lines 244-256)
Tests: Added comprehensive test suite with 10 tests covering all fixes in tests/test_current_filings_parsing.py
Impact: Current filings pagination now works correctly, better error messages, no production crashes
Code Quality
Current Filings Display: Eliminated pandas dependency - Refactored to use PyArrow direct access
- Before:
self.data.to_pandas()created unnecessary pandas DataFrame conversion - After: Direct PyArrow table access using zero-copy column operations
- Benefits:
- Cleaner code - eliminated unnecessary pandas dependency in display method
- More consistent - uses PyArrow throughout CurrentFilings class
- Simpler logic - direct index calculations instead of pandas index manipulation
- Performance maintained - benchmarks show identical performance (9.6ms avg, 210KB for 40-100 items)
- Benchmark tool: Added
tests/manual/bench_current_filings_display.pyfor performance validation - Impact: Code quality improvement with no performance regression
Installation
pip install edgartools==4.21.3What's Changed
- Fix: Current filings parser - Handle company names with dashes (17a0048)
- Refactor: Current filings module - Bug fixes & PyArrow optimization (f8e2475)
- Chore: Release v4.21.3 - Current filings module bug fixes (74430e1)
Full Changelog: v4.21.2...v4.21.3
Generated with Claude Code