Migrate connection-related settings from myclirc [main]#1963
Merged
Conversation
e7bc88f to
17fd14c
Compare
[main][main]
17fd14c to
a5a14b3
Compare
[main][main]
scottnemes
reviewed
Jun 24, 2026
| del config_without_package_defaults['main']['ssl_mode'] | ||
| config_without_package_defaults.write() | ||
|
|
||
| if ssl_mode is None and 'default_ssl_mode' in config['connection']: |
Contributor
There was a problem hiding this comment.
Think this should be if not ssl_mode, or more checks needed. Previously it used .get for the ssl_mode so it would be None if not set/empty, but with the new code it could end up being an empty string which would pass the ssl_mode is None check.
scottnemes
approved these changes
Jun 24, 2026
scottnemes
left a comment
Contributor
There was a problem hiding this comment.
Left one comment. Good to go after that or if you decide not to change it
* migrate main.default_character_set to the [connection] section if present * migrate main.ssl_mode to connection.default_ssl_mode if present These migrations will affect a modest number of users who installed mycli for the first time during the periods in which the given connection-level settings were in [main] in the default myclirc file. For default_ssl_mode, that is fresh installs between 2026-01-02 and 2026-02-09. For default_character_set, that is fresh installs between 2026-01-22 and 2026-02-02. Users who ran "mycli --checkup" since then were already advised to migrate the settings to the [connection] section. The --checkup instructions for migrating the settings are not removed, though they are somewhat duplicative, to keep the checkup instructions more coherent. Writes to the config file should probably be used sparingly, since some comments and formatting in the user's file can be lost, but this already happens if a favorite query is saved. Motivation: general simplification; bundling all breaking changes into the 2.0 release. The logic for determining whether the user or package configuration controls is too subtle when there are multiple possible locations for the setting. Preparation for release 2.0
a5a14b3 to
1948b26
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
main.default_character_setto the[connection]section if presentmain.ssl_modetoconnection.default_ssl_modeif presentThese migrations will affect a modest number of users who installed mycli for the first time during the periods in which the given connection-level settings were in
[main]in the default myclirc file.For
default_ssl_mode, that is fresh installs between 2026-01-02 and 2026-02-09. Fordefault_character_set, that is fresh installs between 2026-01-22 and 2026-02-02.Users who ran
mycli --checkupsince then were already advised to migrate the settings to the[connection]section.The
--checkupinstructions for migrating the settings are not removed, though they are somewhat duplicative, to keep the checkup instructions more coherent.Writes to the config file should probably be used sparingly, since some comments and formatting in the user's file can be lost, but this already happens if a favorite query is saved.
Motivation: general simplification; bundling all breaking changes into the 2.0 release. The logic for determining whether the user or package configuration controls is too subtle when there are multiple possible locations for the setting.
Preparation for release 2.0
Checklist
changelog.mdfile.AUTHORSfile (or it's already there).