mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-06 10:40:36 -07:00
* Prepare for distutils.version being removed in Python 3.12 (#267) * Prepare for distutils.version being removed in Python 3.12 * Update plugins/module_utils/version.py Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commitd9e12b85ad
) * Use vendored version of distutils.version (#269) * Use vendored version of distutils.version * Correct fragment * Update plugins/module_utils/version.py Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit9c575b4762
)
16 lines
544 B
Python
16 lines
544 B
Python
from __future__ import (absolute_import, division, print_function)
|
|
__metaclass__ = type
|
|
|
|
from ansible_collections.community.mysql.plugins.module_utils.version import LooseVersion
|
|
from ansible_collections.community.mysql.plugins.module_utils.mysql import get_server_version
|
|
|
|
|
|
def use_old_user_mgmt(cursor):
|
|
version = get_server_version(cursor)
|
|
|
|
return LooseVersion(version) < LooseVersion("5.7")
|
|
|
|
|
|
def supports_identified_by_password(cursor):
|
|
version = get_server_version(cursor)
|
|
return LooseVersion(version) < LooseVersion("8")
|