Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove usage of deprecated validate_arguments #1664

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pandera/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import pandas as pd
import wrapt
from pydantic import validate_arguments
from pydantic import validate_call

from pandera import errors
from pandera.api.base.error_handler import ErrorHandler
Expand Down Expand Up @@ -566,7 +566,7 @@ def check_types(
See the :ref:`User Guide <dataframe-models>` for more.

:param wrapped: the function to decorate.
:param with_pydantic: use ``pydantic.validate_arguments`` to validate
:param with_pydantic: use ``pydantic.validate_call`` to validate
inputs. This function is still needed to validate function outputs.
:param head: validate the first n rows. Rows overlapping with `tail` or
`sample` are de-duplicated.
Expand Down Expand Up @@ -832,7 +832,7 @@ async def _wrapper(
kwargs: Dict[str, Any],
):
if with_pydantic:
out = await validate_arguments(wrapped_)(*args, **kwargs)
out = await validate_call(wrapped_)(*args, **kwargs)
else:
validated_pos, validated_kwd = validate_inputs(
instance, args, kwargs
Expand All @@ -850,7 +850,7 @@ def _wrapper(
kwargs: Dict[str, Any],
):
if with_pydantic:
out = validate_arguments(wrapped_)(*args, **kwargs)
out = validate_call(wrapped_)(*args, **kwargs)
else:
validated_pos, validated_kwd = validate_inputs(
instance, args, kwargs
Expand Down
Loading