#5026·manim

`redirections` parameter of `deprecated_params` decorator not working

Author: GniLudioCreated Sep 22, 2026Updated Sep 23, 2026

Description of bug / unexpected behavior

When using the redirections parameter of the deprecated_params decorator, a lot of function usages aren't allowed even though I would expect them to.

Here for example, I renamed the a,b,c parameters to x,y,z.

python
from manim.utils.deprecation import deprecated_params

@deprecated_params(redirections=[("a", "x"), ("b", "y"), ("c", "z")])
def foo(x: int, /, y: int, *, z: int) -> None:
    print(x, y, z)

So I would expect all the following calls to be valid, albeit some should issue a warnings:

python
foo(1, 2, z=3)  # no warning
foo(1, y=2, z=3)  # no warning
foo(1, b=2, z=3)  # warning for 'b'
foo(1, 2, c=3)  # warning for 'c'
foo(1, y=2, c=3)  # warning for 'c'
foo(1, b=2, c=3)  # warning for 'b' and 'c'

But here are the actual results:

python
foo(1, 2, z=3)
foo(1, y=2, z=3)
foo(1, b=2, z=3)  # TypeError: missing a required argument: 'y'
foo(1, 2, c=3)  # TypeError: missing a required keyword-only argument: 'z'
foo(1, y=2, c=3)  # TypeError: missing a required argument: 'z'
foo(1, b=2, c=3)  # TypeError: missing a required argument: 'y'