Implementing database context in peewee 3.0
The [API documentation](http://docs.peewee-orm.com/en/latest/peewee/api.html) is **much** more thorough than the 2.x documentation, have you taken a look there?

Similarly the [changes documentation](http://docs.peewee-orm.com/en/latest/peewee/changes.html) describes that, in place of `execution_context()`, you can:

* Simply use the database instance as a context manager, in which case the wrapped code is also wrapped in a transaction
* Use `database.connection_context()`, which has similar semantics to `execution_context()`.

Does this solve your problem? Hi. Tanks for the hint regarding the changes page. I actually did not notice that.
`database.connection_context()` looks promising. I'll re-open if it'll turn out to not work.
Unfortunately I have been to hasty migrating to peewee 3.0.

I was using an [extension](https://github.com/HOMEINFO/peeweeplus/blob/27aef530f3a871593aa06b9b940057a033afa0ce/peeweeplus/database.py) of the MySQLDatabase class that handles connections well (if invoked with `closing=True`).
This hack was/is supposed to compensate for peewee < 3.0 's bad behaviour regarding connection handling.

Do you have any suggestions, how I may migrate this to the new API of peewee 3.0 (which unfortunately still has no useful docstrings documenting the respective classes, functions and parameters)?

My goal is the following:
I do not want peewee to raise `Error 2006` after a certain runtime as described [here](http://peewee.readthedocs.io/en/latest/peewee/database.html#error-2006-mysql-server-has-gone-away).
Unfortunately, `MySQLDatabase.execution_context ` does no longer exist.

Thanks for any hint.