Skip to content

Fix string enum serialization with tomlkit 0.15.3 (#842) - #843

Open
Ho3pLi wants to merge 1 commit into
python-attrs:mainfrom
Ho3pLi:842-tomlkit-string-enums
Open

Ho3pLi wants to merge 1 commit into
python-attrs:mainfrom
Ho3pLi:842-tomlkit-string-enums

Conversation

@Ho3pLi

@Ho3pLi Ho3pLi commented Nov 26, 2026 •

Copy link
Copy Markdown

Fixes #842

Unstructure string enum members to their values in the tomlkit converter. With tomlkit 0.15.3, passing them through can serialize a member as "Kind.A" instead of "a", breaking deserialization. Ordinary strings and tomlkit string items remain unchanged.

Includes a regression test covering enum fields, literals, lists, and dictionary keys/values. The tests reported in the issue and the new regression test fail before the fix and pass afterward.

AI assistance: AI assisted with investigation and tests.

This branch has not been deployed

No deployments
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.

tomlkit 0.15.3 breaks test_tomlkit and test_tomlkit_converter

1 participant