Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Upcoming (TBD)
==============

Breaking Changes
---------
* `ssl` is no longer supported as a DSN parameter. Use `ssl_mode` instead.


Features
---------
* Add `--ssh-options` CLI argument to pass extra options with `--ssh-jump`.
Expand Down
13 changes: 1 addition & 12 deletions mycli/cli_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import click

from mycli.config import str_to_bool
from mycli.constants import EMPTY_PASSWORD_FLAG_SENTINEL, ISSUES_URL
from mycli.constants import EMPTY_PASSWORD_FLAG_SENTINEL
from mycli.main_modes.batch import main_batch_from_stdin, main_batch_with_progress_bar, main_batch_without_progress_bar
from mycli.main_modes.checkup import main_checkup
from mycli.main_modes.execute import main_execute_from_cli
Expand All @@ -26,7 +26,6 @@
'keepalive_ticks',
'socket',
'ssh_jump',
'ssl',
'ssl_ca',
'ssl_capath',
'ssl_cert',
Expand Down Expand Up @@ -239,16 +238,6 @@ def run_from_cli_args(cli_args: 'CliArgs', client_factory: ClientFactory) -> Non
fg='yellow',
)

if params := dsn_params.get('ssl'):
click.secho(
'Warning: The "ssl" DSN URI parameter is deprecated and will be removed in a future release. '
'Please use the "ssl_mode" parameter instead. '
f'See issue {ISSUES_URL}/1507',
err=True,
fg='yellow',
)
if params[0].lower() == 'true':
cli_args.ssl_mode = 'on'
if params := dsn_params.get('ssl_mode'):
cli_args.ssl_mode = cli_args.ssl_mode or params[0]
if params := dsn_params.get('ssl_ca'):
Expand Down
3 changes: 1 addition & 2 deletions test/pytests/test_cli_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ def test_run_from_cli_args_prefers_cli_ssh_jump_over_dsn_parameter(
def test_run_from_cli_args_maps_dsn_ssl_parameters(monkeypatch: pytest.MonkeyPatch) -> None:
cli_args = make_cli_args()
cli_args.dsn = (
'mysql://user:pass@host:3306/db?ssl=true&ssl_ca=~/ca.pem&ssl_capath=/capath'
'mysql://user:pass@host:3306/db?ssl_mode=on&ssl_ca=~/ca.pem&ssl_capath=/capath'
'&ssl_cert=~/cert.pem&ssl_key=~/key.pem&ssl_cipher=AES256&tls_version=TLSv1.3'
'&ssl_verify_server_cert=true'
)
Expand All @@ -496,7 +496,6 @@ def test_run_from_cli_args_maps_dsn_ssl_parameters(monkeypatch: pytest.MonkeyPat
'tls_version': 'TLSv1.3',
'check_hostname': True,
}
assert any('"ssl" DSN URI parameter is deprecated' in call for call in secho_calls)


def test_run_from_cli_args_merges_global_list_and_alias_scalar_init_commands(
Expand Down
Loading