Commit 5f0fe3c
chore(fix-2530): document duck typing pattern in catalog fixtures
Add inline comments to catalog and catalog_with_warehouse fixtures explaining
the hasattr(cat, 'close') pattern. This clarifies that:
- Not all catalog implementations provide close() (REST, Glue catalogs don't)
- SQLCatalog does provide close() for proper connection cleanup
- The pattern prevents AttributeError while supporting resource cleanup
- This is essential for Python 3.13+ ResourceWarning prevention (issue #2530)
This helps future contributors understand why the pattern is necessary
and when they should update it if new catalog types are added.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>1 parent c8db549 commit 5f0fe3c
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3149 | 3149 | | |
3150 | 3150 | | |
3151 | 3151 | | |
| 3152 | + | |
| 3153 | + | |
| 3154 | + | |
| 3155 | + | |
3152 | 3156 | | |
3153 | 3157 | | |
3154 | 3158 | | |
| |||
3163 | 3167 | | |
3164 | 3168 | | |
3165 | 3169 | | |
| 3170 | + | |
| 3171 | + | |
| 3172 | + | |
| 3173 | + | |
3166 | 3174 | | |
3167 | 3175 | | |
3168 | 3176 | | |
| |||
0 commit comments