Skip to content
Snippets Groups Projects

Fix mutable-default bug in codegen.config with Python 3.11 and newer

Merged Frederik Hennig requested to merge fhennig/config-fix into v2.0-dev

Since Python 3.11, dataclasses check if default field values are hashable, and if they are not, reject them as mutable. For this reason, the config API using the Category descriptor was broken with Python 3.11, which we didn't see since the CI did not test against 3.11.

This MR

  • Fixes this behavior by circumventing the dataclass mechanism
  • Adds a CI testsuite task using Python 3.13 to detect such errors in the future

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
Please register or sign in to reply