diff --git a/README.md b/README.md index 0844202..a149c53 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,8 @@ We rely on different `django` and `mypy` versions: | django-stubs | mypy version | django version | python version | ------------ | ---- | ---- | ---- | -| 1.8.0 | 0.812 | 2.2.x \|\| 3.x | ^3.6 +| 1.9.0-dev | 0.812 | 3.2.x | ^3.6 +| 1.8.0 | 0.812 | 3.1.x | ^3.6 | 1.7.0 | 0.790 | 2.2.x \|\| 3.x | ^3.6 | 1.6.0 | 0.780 | 2.2.x \|\| 3.x | ^3.6 | 1.5.0 | 0.770 | 2.2.x \|\| 3.x | ^3.6 diff --git a/django-stubs/db/transaction.pyi b/django-stubs/db/transaction.pyi index 959479b..567bcae 100644 --- a/django-stubs/db/transaction.pyi +++ b/django-stubs/db/transaction.pyi @@ -26,7 +26,7 @@ _C = TypeVar("_C", bound=Callable) # Any callable class Atomic: using: Optional[str] = ... savepoint: bool = ... - def __init__(self, using: Optional[str], savepoint: bool) -> None: ... + def __init__(self, using: Optional[str], savepoint: bool, durable: bool) -> None: ... # When decorating, return the decorated function as-is, rather than clobbering it as ContextDecorator does. def __call__(self, func: _C) -> _C: ... def __enter__(self) -> None: ... @@ -38,7 +38,7 @@ def atomic(using: _C) -> _C: ... # Decorator or context-manager with parameters @overload -def atomic(using: Optional[str] = ..., savepoint: bool = ...) -> Atomic: ... +def atomic(using: Optional[str] = ..., savepoint: bool = ..., durable: bool = ...) -> Atomic: ... # Bare decorator @overload diff --git a/tests/typecheck/test_helpers.yml b/tests/typecheck/test_helpers.yml index f82ceea..11d6ca8 100644 --- a/tests/typecheck/test_helpers.yml +++ b/tests/typecheck/test_helpers.yml @@ -7,6 +7,8 @@ pass with transaction.atomic(using="mydb", savepoint=False): pass + with transaction.atomic(using="mydb", savepoint=False, durable=True): + pass - case: transaction_atomic_decorator main: |