diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 02da624f..d56f905e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -103,15 +103,15 @@ jobs: python: '3.10' allow_failure: false - - name: py311-dj51-mysql_innodb-coverage + - name: py311-dj51-mysql-coverage python: '3.11' allow_failure: false - - name: py310-dj42-mysql_innodb-coverage + - name: py310-dj42-mysql-coverage python: '3.10' allow_failure: false - - name: py39-dj42-mysql_innodb-xdist-coverage + - name: py39-dj42-mysql-xdist-coverage python: '3.9' allow_failure: false @@ -135,10 +135,6 @@ jobs: python: '3.8' allow_failure: false - - name: py311-dj42-mysql_myisam-coverage - python: '3.11' - allow_failure: false - # Explicitly test min pytest. - name: py38-dj42-sqlite-pytestmin-coverage python: '3.8' diff --git a/docs/changelog.rst b/docs/changelog.rst index 51395c74..0f181dde 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -7,8 +7,8 @@ v4.11.0 (Not released yet) Compatibility ^^^^^^^^^^^^^ -* Added official support for Django 5.2. - +* Added official support for Django 5.2 (`PR #1179 `__). +* Dropped testing on MySQL’s MyISAM storage engine (`PR #1180 `__). v4.10.0 (2025-02-10) -------------------- diff --git a/docs/contributing.rst b/docs/contributing.rst index 3914da38..d5003fc7 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -140,7 +140,7 @@ writing), running them all will take a long time. All valid configurations can be found in `tox.ini`. To test against a few of them, invoke tox with the `-e` flag:: - $ tox -e py38-dj32-postgres,py310-dj41-mysql_innodb + $ tox -e py38-dj32-postgres,py310-dj41-mysql This will run the tests on Python 3.8/Django 3.2/PostgeSQL and Python 3.10/Django 4.1/MySQL. diff --git a/pytest_django_test/settings_mysql_innodb.py b/pytest_django_test/settings_mysql.py similarity index 88% rename from pytest_django_test/settings_mysql_innodb.py rename to pytest_django_test/settings_mysql.py index e744c9f3..cb53559f 100644 --- a/pytest_django_test/settings_mysql_innodb.py +++ b/pytest_django_test/settings_mysql.py @@ -11,7 +11,6 @@ "PASSWORD": environ.get("TEST_DB_PASSWORD", ""), "HOST": environ.get("TEST_DB_HOST", "localhost"), "OPTIONS": { - "init_command": "SET default_storage_engine=InnoDB", "charset": "utf8mb4", }, "TEST": { @@ -26,7 +25,6 @@ "PASSWORD": environ.get("TEST_DB_PASSWORD", ""), "HOST": environ.get("TEST_DB_HOST", "localhost"), "OPTIONS": { - "init_command": "SET default_storage_engine=InnoDB", "charset": "utf8mb4", }, "TEST": { @@ -42,7 +40,6 @@ "PASSWORD": environ.get("TEST_DB_PASSWORD", ""), "HOST": environ.get("TEST_DB_HOST", "localhost"), "OPTIONS": { - "init_command": "SET default_storage_engine=InnoDB", "charset": "utf8mb4", }, "TEST": { diff --git a/pytest_django_test/settings_mysql_myisam.py b/pytest_django_test/settings_mysql_myisam.py deleted file mode 100644 index 54ec8c93..00000000 --- a/pytest_django_test/settings_mysql_myisam.py +++ /dev/null @@ -1,53 +0,0 @@ -from os import environ - -from .settings_base import * # noqa: F403 - - -DATABASES = { - "default": { - "ENGINE": "django.db.backends.mysql", - "NAME": "pytest_django_tests_default", - "USER": environ.get("TEST_DB_USER", "root"), - "PASSWORD": environ.get("TEST_DB_PASSWORD", ""), - "HOST": environ.get("TEST_DB_HOST", "localhost"), - "OPTIONS": { - "init_command": "SET default_storage_engine=MyISAM", - "charset": "utf8mb4", - }, - "TEST": { - "CHARSET": "utf8mb4", - "COLLATION": "utf8mb4_unicode_ci", - }, - }, - "replica": { - "ENGINE": "django.db.backends.mysql", - "NAME": "pytest_django_tests_replica", - "USER": environ.get("TEST_DB_USER", "root"), - "PASSWORD": environ.get("TEST_DB_PASSWORD", ""), - "HOST": environ.get("TEST_DB_HOST", "localhost"), - "OPTIONS": { - "init_command": "SET default_storage_engine=MyISAM", - "charset": "utf8mb4", - }, - "TEST": { - "MIRROR": "default", - "CHARSET": "utf8mb4", - "COLLATION": "utf8mb4_unicode_ci", - }, - }, - "second": { - "ENGINE": "django.db.backends.mysql", - "NAME": "pytest_django_tests_second", - "USER": environ.get("TEST_DB_USER", "root"), - "PASSWORD": environ.get("TEST_DB_PASSWORD", ""), - "HOST": environ.get("TEST_DB_HOST", "localhost"), - "OPTIONS": { - "init_command": "SET default_storage_engine=MyISAM", - "charset": "utf8mb4", - }, - "TEST": { - "CHARSET": "utf8mb4", - "COLLATION": "utf8mb4_unicode_ci", - }, - }, -} diff --git a/tox.ini b/tox.ini index 6e7472c5..aed0b8a3 100644 --- a/tox.ini +++ b/tox.ini @@ -17,8 +17,7 @@ deps = dj50: Django>=5.0,<5.1 dj42: Django>=4.2,<4.3 - mysql_myisam: mysqlclient==2.1.0 - mysql_innodb: mysqlclient==2.1.0 + mysql: mysqlclient==2.1.0 postgres: psycopg[binary] coverage: coverage[toml] @@ -28,8 +27,7 @@ deps = xdist: pytest-xdist>=1.15 setenv = - mysql_innodb: DJANGO_SETTINGS_MODULE=pytest_django_test.settings_mysql_innodb - mysql_myisam: DJANGO_SETTINGS_MODULE=pytest_django_test.settings_mysql_myisam + mysql: DJANGO_SETTINGS_MODULE=pytest_django_test.settings_mysql postgres: DJANGO_SETTINGS_MODULE=pytest_django_test.settings_postgres sqlite: DJANGO_SETTINGS_MODULE=pytest_django_test.settings_sqlite sqlite_file: DJANGO_SETTINGS_MODULE=pytest_django_test.settings_sqlite_file