Skip to content

chore(catalog): dispose in-memory catalog engines and clear Python 3.13 deprecation warnings#16

Open
abnobdoss wants to merge 5 commits into
mainfrom
fix/py313-warnings
Open

chore(catalog): dispose in-memory catalog engines and clear Python 3.13 deprecation warnings#16
abnobdoss wants to merge 5 commits into
mainfrom
fix/py313-warnings

Conversation

@abnobdoss

Copy link
Copy Markdown
Owner

No description provided.

Abanoub Doss and others added 5 commits June 23, 2026 18:05
…ines in tests

The 'unclosed database in <sqlite3.Connection>' ResourceWarning under
Python 3.13 was suppressed via a pytest filterwarnings ignore (apache#2863).
Root cause: test fixtures and tests created SqlCatalog instances (each
opening a SQLAlchemy engine / sqlite connection pool) without ever
calling the existing SqlCatalog.close() (added in apache#2390), so the pooled
sqlite connections leaked and emitted ResourceWarning during GC.

Wire close()/engine.dispose() into the relevant fixtures and tests and
remove the now-unnecessary sqlite ResourceWarning filter. The ray and
google (api_core / crc32c) filters remain, as those originate in those
dependencies, not pyiceberg.
InMemoryCatalog is a SqlCatalog backed by sqlite:///:memory:, so its
local test fixtures and load_catalog(type=in-memory) usages leaked
sqlite connections (ResourceWarning under Python 3.13). Convert the
local 'catalog' fixtures to yield+close and close the catalog created
by test_load_catalog_in_memory.
@abnobdoss abnobdoss closed this Jun 25, 2026
@abnobdoss abnobdoss reopened this Jun 25, 2026
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