Fix a crash during patching when MySQL support isn't available.

Review Request #12070 — Created Feb. 21, 2022 and submitted — Latest diff uploaded

Information

Django Evolution
release-2.x

Reviewers

Django Evolution 2.1.3 introduced a patch for modern versions of
mysqlclient on Django < 2.0. The patch tried to handle the situation
where mysqlclient wasn't installed, but it didn't catch the right
exception.

This change adds a more broad exception handler, and also exception
handlers in the patch loader, one wrapping needs_patch() and one
wrapping apply_patch(). This will help us avoid other unforeseen
issues in the future.

Ran all unit tests without mysqlclient installed.

Diff Revision 2 (Latest)

orig
1
2

Commits

First Last Summary ID Author
Fix a crash during patching when MySQL support isn't available.
Django Evolution 2.1.3 introduced a patch for modern versions of `mysqlclient` on Django < 2.0. The patch tried to handle the situation where `mysqlclient` wasn't installed, but it didn't catch the right exception. This change adds a more broad exception handler, and also exception handlers in the patch loader, one wrapping `needs_patch()` and one wrapping `apply_patch()`. This will help us avoid other unforeseen issues in the future.
3c49925398b8dd2b0fc376018f30bc67de8cc36d Christian Hammond
django_evolution/compat/patches/__init__.py
django_evolution/compat/patches/mysqlclient_django_pre_2_encoder_bytes.py
docs/releasenotes/2.1.4.rst
docs/releasenotes/index.rst
Loading...