Skip to content

Fix inherited kwargs rendering for MySQL CHAR collation#464

Merged
sheinbergon merged 3 commits intoagronholm:masterfrom
hyoj0942:fix-285-char-collation
Feb 23, 2026
Merged

Fix inherited kwargs rendering for MySQL CHAR collation#464
sheinbergon merged 3 commits intoagronholm:masterfrom
hyoj0942:fix-285-char-collation

Conversation

@hyoj0942
Copy link
Contributor

@hyoj0942 hyoj0942 commented Feb 20, 2026

Summary

  • render inherited initializer kwargs for types whose initializer uses only **kwargs
  • preserve MySQL CHAR(..., collation=...) when using keep_dialect_types
  • keep behavior bounded to avoid varargs regressions (e.g. SET)

Tests

  • PYTHONPATH=src pytest -q tests/test_generator_tables.py -k 'mysql'
  • PYTHONPATH=src pytest -q tests/test_generator_declarative.py -k 'keep_dialect_types'

Closes #285.

@coveralls
Copy link

coveralls commented Feb 20, 2026

Coverage Status

coverage: 97.668% (-0.05%) from 97.718%
when pulling 951bf9a on hyoj0942:fix-285-char-collation
into de5adcc on agronholm:master.

Copy link
Collaborator

@sheinbergon sheinbergon left a comment

Choose a reason for hiding this comment

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

Thank you very much for your contribution. Left some cosmetric comments. Don't forget updating CHANGES.rst

@sheinbergon
Copy link
Collaborator

@hyoj0942 also notice pre-commit is failing. Be sure to fix linting/formatting/typing issues

@sheinbergon sheinbergon added this to the 4.0.x milestone Feb 20, 2026
- extract helper methods from render_column_type() for readability\n- split inherited init kwargs collection into a dedicated helper\n- add CHANGES.rst Unreleased entry for agronholm#285 fix\n- ensure pre-commit hooks pass
@hyoj0942
Copy link
Contributor Author

hyoj0942 commented Feb 23, 2026

@sheinbergon heads-up: I fixed the pre-commit issues and pushed an update (6ef1761). It now passes locally with pre-commit run --all-files.

Added contributor information for a fix regarding inherited keyword arguments in dialect-specific types.
@sheinbergon
Copy link
Collaborator

@sheinbergon heads-up: I fixed the pre-commit issues and pushed an update (6ef1761). It now passes locally with pre-commit run --all-files.

Great. Will be released as part of the next patch version

@sheinbergon sheinbergon merged commit 94878f9 into agronholm:master Feb 23, 2026
8 checks passed
@sheinbergon sheinbergon modified the milestones: 4.0.x, 4.0.2 Feb 23, 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.

Error in Generated SQLAlchemy Model for CHAR Column

3 participants