A replacement for playhouse.shortcuts.RetryOperationalError?
The code should work with a few modifications...the signature for `execute_sql()` is slightly different. `exception_wrapper` is now `__exception_wrapper__`. `get_cursor()` is just `cursor()`...

You'll have to experiment, but look at the way `execute_sql()` is implemented and I'm sure you can sort it out. Can you tell us why RetryOperationalError is removed? @coleifer  Removed as I have no intention of continuing to maintain it...also, it's my opinion that it's a gross hack. This should work if you have legacy code.

```python
from peewee import MySQLDatabase
from peewee import OperationalError


class RetryOperationalError(object):

    def execute_sql(self, sql, params=None, commit=True):
        try:
            cursor = super(RetryOperationalError, self).execute_sql(
                sql, params, commit)
        except OperationalError:
            if not self.is_closed():
                self.close()
            with __exception_wrapper__:
                cursor = self.cursor()
                cursor.execute(sql, params or ())
                if commit and not self.in_transaction():
                    self.commit()
        return cursor


class MyRetryDB(RetryOperationalError, MySQLDatabase):
    pass

``` Small note:

``__exception_wrapper__`` should not have parentheses afterwards -- you don't need to call it. I went ahead and edited your code snippet to make the change. The work around seems to have broken. Was `self.__exception_wrapper__` renamed to something else, or removed entirely?
 Sorry, ``__exception_wrapper__`` is just at module scope.

So,

```python
import peewee

with peewee.__exception_wrapper__:
    ...
```
Commit 54a672547f549eb381cd9578a2b19310bcf5ef1d removed the class `playhouse.shortcuts.RetryOperationalError`. Is there a new recommended way to automatically reconnect and retry on failed queries?