Migration¶
Version 0.1.0 is a ground-up refactor with a smaller, unified API. There is no backward compatibility with 0.0.1. This page maps the old names to the new ones.
Functions and decorators¶
Old |
New |
|---|---|
|
|
|
|
|
|
|
|
Classes¶
The eight base classes are replaced by four executor-configurable mixins, and the string-list override method is gone.
Old |
New |
|---|---|
|
|
|
|
|
|
|
|
Before:
from unblock import AsyncBase
class MyClassAsync(MyClass, AsyncBase):
@staticmethod
def _unblock_methods_to_asynchify():
return ["sync_method1", "sync_method2"]
After:
from unblock import AsyncMixin
class MyClassAsync(MyClass, AsyncMixin):
pass # all public methods; use include=/exclude= to narrow
Configuration¶
Old |
New |
|---|---|
|
removed – the running loop is always used |
|
|
|
|
|
removed – internal; use the configuration helpers and |
The new shutdown() helper releases the default pools (also registered via
atexit).