Skip to content

fix: suppress SyntaxWarning flood from period-containing table names in snowflaky()#16

Merged
lpillmann merged 2 commits intomainfrom
fix/suppress-snowflaky-syntax-warnings
Apr 21, 2026
Merged

fix: suppress SyntaxWarning flood from period-containing table names in snowflaky()#16
lpillmann merged 2 commits intomainfrom
fix/suppress-snowflaky-syntax-warnings

Conversation

@lpillmann
Copy link
Copy Markdown
Collaborator

Summary

  • Replaces warnings.warn(..., SyntaxWarning) with logger.debug(...) in snowflaky() for identifiers with more than 3 dot-separated parts
  • Airbyte staging tables (e.g. AIRBYTE_SFTP_raw__stream_2025-03-23.csv) have periods in their names; each unique table name produced a distinct warning that bypassed Python's deduplication, flooding the interface with hundreds of lines per run
  • Behaviour is unchanged — the function still returns a value for these identifiers; the information is now available at DEBUG log level instead of as a console warning

Test Plan

  • uv run pytest -x --disable-pytest-warnings — 240 tests pass
  • test_snowflaky now uses warnings.catch_warnings() + simplefilter("error") to assert no SyntaxWarning fires for db16/db17
  • import warnings retained in source (null-identifier branch at line ~389 still uses it)

Airbyte staging tables (e.g. AIRBYTE_SFTP_raw__stream_2025-03-23.csv)
have periods in their names, causing warnings.warn to fire once per
unique identifier. Switch to logger.debug so the messages are only
visible at DEBUG log level. Behaviour is unchanged — the function
still returns a value for these identifiers.
…wflaky()

Regression guard: verifies the logger.debug branch is actually reached
when an identifier has >3 dot-separated parts (e.g. Airbyte staging
tables). Without this, a future change back to warnings.warn would
go undetected.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@lpillmann lpillmann merged commit fd847d6 into main Apr 21, 2026
2 checks passed
@lpillmann lpillmann deleted the fix/suppress-snowflaky-syntax-warnings branch April 21, 2026 14:08
lpillmann added a commit that referenced this pull request Apr 21, 2026
…in snowflaky() (#16)

* fix: replace SyntaxWarning flood in snowflaky() with logger.debug

Airbyte staging tables (e.g. AIRBYTE_SFTP_raw__stream_2025-03-23.csv)
have periods in their names, causing warnings.warn to fire once per
unique identifier. Switch to logger.debug so the messages are only
visible at DEBUG log level. Behaviour is unchanged — the function
still returns a value for these identifiers.

* test: assert debug log fires for period-containing identifiers in snowflaky()

Regression guard: verifies the logger.debug branch is actually reached
when an identifier has >3 dot-separated parts (e.g. Airbyte staging
tables). Without this, a future change back to warnings.warn would
go undetected.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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