Skip to content

Commit b732869

Browse files
authored
Remove testing on MyISAM (#1180)
MyISAM testing was added back in 2012 (#78) because it would have detected one bug in relation to transactional ordering. MyISAM was not recommended back then and even less so now. It’s non-transactional nature has many implications and [Django’s database documentation](https://docs.djangoproject.com/en/stable/ref/databases/) caveats against using it. I think we can remove the testing now and reduce the maintenance burden. As far as I can tell, it was only added retroactively to guard against that one bug, 13 years ago.
1 parent e362f4c commit b732869

File tree

6 files changed

+8
-70
lines changed

6 files changed

+8
-70
lines changed

.github/workflows/main.yml

+3-7
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,15 @@ jobs:
103103
python: '3.10'
104104
allow_failure: false
105105

106-
- name: py311-dj51-mysql_innodb-coverage
106+
- name: py311-dj51-mysql-coverage
107107
python: '3.11'
108108
allow_failure: false
109109

110-
- name: py310-dj42-mysql_innodb-coverage
110+
- name: py310-dj42-mysql-coverage
111111
python: '3.10'
112112
allow_failure: false
113113

114-
- name: py39-dj42-mysql_innodb-xdist-coverage
114+
- name: py39-dj42-mysql-xdist-coverage
115115
python: '3.9'
116116
allow_failure: false
117117

@@ -135,10 +135,6 @@ jobs:
135135
python: '3.8'
136136
allow_failure: false
137137

138-
- name: py311-dj42-mysql_myisam-coverage
139-
python: '3.11'
140-
allow_failure: false
141-
142138
# Explicitly test min pytest.
143139
- name: py38-dj42-sqlite-pytestmin-coverage
144140
python: '3.8'

docs/changelog.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ v4.11.0 (Not released yet)
77
Compatibility
88
^^^^^^^^^^^^^
99

10-
* Added official support for Django 5.2.
11-
10+
* Added official support for Django 5.2 (`PR #1179 <https://github.com/pytest-dev/pytest-django/pull/1179>`__).
11+
* Dropped testing on MySQL’s MyISAM storage engine (`PR #1180 <https://github.com/pytest-dev/pytest-django/pull/1180>`__).
1212

1313
v4.10.0 (2025-02-10)
1414
--------------------

docs/contributing.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ writing), running them all will take a long time. All valid configurations can
140140
be found in `tox.ini`. To test against a few of them, invoke tox with the `-e`
141141
flag::
142142

143-
$ tox -e py38-dj32-postgres,py310-dj41-mysql_innodb
143+
$ tox -e py38-dj32-postgres,py310-dj41-mysql
144144

145145
This will run the tests on Python 3.8/Django 3.2/PostgeSQL and Python
146146
3.10/Django 4.1/MySQL.

pytest_django_test/settings_mysql_innodb.py pytest_django_test/settings_mysql.py

-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"PASSWORD": environ.get("TEST_DB_PASSWORD", ""),
1212
"HOST": environ.get("TEST_DB_HOST", "localhost"),
1313
"OPTIONS": {
14-
"init_command": "SET default_storage_engine=InnoDB",
1514
"charset": "utf8mb4",
1615
},
1716
"TEST": {
@@ -26,7 +25,6 @@
2625
"PASSWORD": environ.get("TEST_DB_PASSWORD", ""),
2726
"HOST": environ.get("TEST_DB_HOST", "localhost"),
2827
"OPTIONS": {
29-
"init_command": "SET default_storage_engine=InnoDB",
3028
"charset": "utf8mb4",
3129
},
3230
"TEST": {
@@ -42,7 +40,6 @@
4240
"PASSWORD": environ.get("TEST_DB_PASSWORD", ""),
4341
"HOST": environ.get("TEST_DB_HOST", "localhost"),
4442
"OPTIONS": {
45-
"init_command": "SET default_storage_engine=InnoDB",
4643
"charset": "utf8mb4",
4744
},
4845
"TEST": {

pytest_django_test/settings_mysql_myisam.py

-53
This file was deleted.

tox.ini

+2-4
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ deps =
1717
dj50: Django>=5.0,<5.1
1818
dj42: Django>=4.2,<4.3
1919

20-
mysql_myisam: mysqlclient==2.1.0
21-
mysql_innodb: mysqlclient==2.1.0
20+
mysql: mysqlclient==2.1.0
2221

2322
postgres: psycopg[binary]
2423
coverage: coverage[toml]
@@ -28,8 +27,7 @@ deps =
2827
xdist: pytest-xdist>=1.15
2928

3029
setenv =
31-
mysql_innodb: DJANGO_SETTINGS_MODULE=pytest_django_test.settings_mysql_innodb
32-
mysql_myisam: DJANGO_SETTINGS_MODULE=pytest_django_test.settings_mysql_myisam
30+
mysql: DJANGO_SETTINGS_MODULE=pytest_django_test.settings_mysql
3331
postgres: DJANGO_SETTINGS_MODULE=pytest_django_test.settings_postgres
3432
sqlite: DJANGO_SETTINGS_MODULE=pytest_django_test.settings_sqlite
3533
sqlite_file: DJANGO_SETTINGS_MODULE=pytest_django_test.settings_sqlite_file

0 commit comments

Comments
 (0)