Mercurial > p > roundup > code
diff roundup/configuration.py @ 6152:546763f4ce44
Make the charset configurable for mysql
We now have an option to configure the mysql charset used when opening
the database. The default is now utf8 for both, python2 and python3.
No charset argument is passed if this is configured to 'default'.
Previously we were passing 'utf8' for python3 and no charset option for
python2 which made regression tests fail depending on the mysql
configuration.
| author | Ralf Schlatterbeck <rsc@runtux.com> |
|---|---|
| date | Fri, 01 May 2020 17:13:15 +0200 |
| parents | 15c68580578f |
| children | 50960479f627 |
line wrap: on
line diff
--- a/roundup/configuration.py Fri May 01 16:34:35 2020 +0200 +++ b/roundup/configuration.py Fri May 01 17:13:15 2020 +0200 @@ -1047,6 +1047,12 @@ (NullableOption, 'read_default_group', 'roundup', "Name of the group to use in the MySQL defaults file (.my.cnf).\n" "Only used in MySQL connections."), + (Option, 'mysql_charset', 'utf8', + "Charset to use for mysql connection,\n" + "use 'default' for the mysql default, no charset option\n" + "is used when creating the connection in that case.\n" + "Otherwise any permissible mysql charset is allowed here.\n" + "Only used in MySQL connections."), (IntegerNumberGeqZeroOption, 'sqlite_timeout', '30', "Number of seconds to wait when the SQLite database is locked\n" "Default: use a 30 second timeout (extraordinarily generous)\n"
