Skip to content

fix: treat set/frozenset as JSON-storable types in types_for_column_types - #868

Closed
KooshaPari wants to merge 1 commit into
simonw:mainfrom
KooshaPari:fix-10-sql-statement-parsing
Closed

KooshaPari wants to merge 1 commit into
simonw:mainfrom
KooshaPari:fix-10-sql-statement-parsing

Conversation

@KooshaPari

@KooshaPari KooshaPari commented Sep 13, 2026

Copy link
Copy Markdown

Bug

types_for_column_types() mapped list, tuple, and dict to str for JSON storage, but not set or frozenset. This meant columns containing only set values would be detected as type set instead of str, which is not a valid SQLite type.

Fix

Added set and frozenset to the superclass check in types_for_column_types() so they are mapped to str, consistent with how other collection types are handled.

Testing

  • Added test_types_for_column_types_set_maps_to_str to verify both set and frozenset map to str
  • All 20 tests in test_utils.py pass

📚 Documentation preview 📚: https://sqlite-utils--868.org.readthedocs.build/en/868/

Copilot AI lite review requested due to automatic review settings September 13, 2026 06:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@KooshaPari KooshaPari closed this by deleting the head repository Sep 13, 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.

2 participants