Skip to content

Fix _metadata AttributeError in CODObject.__init__#94

Merged
CalNightingale merged 2 commits intomainfrom
fix/metadata-init
Feb 19, 2026
Merged

Fix _metadata AttributeError in CODObject.__init__#94
CalNightingale merged 2 commits intomainfrom
fix/metadata-init

Conversation

@CalNightingale
Copy link
Collaborator

Summary

  • Initialize self._metadata = None before locker.acquire(), which calls get_metadata()_get_metadata() that accesses self._metadata
  • Without this, all CODObject construction in write/append/read modes crashes with AttributeError: 'CODObject' object has no attribute '_metadata'
  • Caused 36 errors and 4 failures across the test suite (masked by the CI bug fixed in Fix CI passing despite test failures #93)

Test plan

🤖 Generated with Claude Code

CalNightingale and others added 2 commits February 19, 2026 10:02
Initialize self._metadata = None before locker.acquire(), which calls
get_metadata() -> _get_metadata() that accesses self._metadata. Without
this, all write/append/read mode CODObject construction crashes with
AttributeError: 'CODObject' object has no attribute '_metadata'.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@CalNightingale CalNightingale merged commit 284dc8d into main Feb 19, 2026
2 checks passed
@CalNightingale CalNightingale deleted the fix/metadata-init branch February 19, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant