5 Commits

Author SHA1 Message Date
feea60c00e support server_public_key_path option. (#744)
fix #682
2024-11-12 20:52:23 +09:00
a7e3887c8a Support ssl=True (#700)
MySQL use ssl by default but MariaDB don't.

Until mysqlclient<=2.2.1, `ssl=True` unintentionally allowed and it
called `mysql_ssl_set(mysql, NULL, NULL, NULL, NULL, NULL)`. Although it
is no-op in MySQL Connector, MariaDB Connector silently set
MYSQL_OPT_SSL_ENFORCE when the API is called. (See #698)

In case of PyMySQL, ssl is not used by default but `ssl=True` behave
like `sslmode="PREFERRED"`.

For better backward compatibility and compatibility with PyMySQL and
security, I decided to allow ssl=True and it means sslmode="REQUIRED" on
MySQL Connector and
set MYSQL_OPT_SSL_ENFORCE on MariaDB Connector.

Fix #699
2024-02-09 00:21:36 +09:00
2570ad48b8 use ruff for formatter (#691) 2024-02-04 12:31:52 +09:00
0d0fff7662 Do not use MYSQL_OPT_RECONNECT as possible. (#664)
MySQL 8.0.33+ shows deprecation warning to stderr.
So we avoid using it as possible.

In the future, we will deprecate `reconnect` option of the
`Connection.ping()`.
2023-11-13 17:36:09 +09:00
0220f427a9 Use src-layout. (#600) 2023-05-15 23:50:10 +09:00