Skip to content

[bug] Remove deprecated code for unsupported data types #565

@ShreyaR

Description

@ShreyaR

Describe the bug
Executing some guardrails code results in the following deprecation warning. Since we're beyond 0.3.x, we should remove the deprecated code (and switch the warning over).

guardrails/datatypes.py:170
  /Users/shreyarajpal/guardrails/guardrails/datatypes.py:170: DeprecationWarning: The 'Email' type  is deprecated and will be removed in versions 0.3.0 and beyond. Use the pydantic 'str' primitive instead.
    warnings.warn(

guardrails/datatypes.py:170
  /Users/shreyarajpal/guardrails/guardrails/datatypes.py:170: DeprecationWarning: The 'URL' type  is deprecated and will be removed in versions 0.3.0 and beyond. Use the pydantic 'str' primitive instead.
    warnings.warn(

guardrails/datatypes.py:170
  /Users/shreyarajpal/guardrails/guardrails/datatypes.py:170: DeprecationWarning: The 'PythonCode' type  is deprecated and will be removed in versions 0.3.0 and beyond. Use the pydantic 'str' primitive instead.
    warnings.warn(

guardrails/datatypes.py:170
  /Users/shreyarajpal/guardrails/guardrails/datatypes.py:170: DeprecationWarning: The 'SQLCode' type  is deprecated and will be removed in versions 0.3.0 and beyond. Use the pydantic 'str' primitive instead.
    warnings.warn(

To Reproduce
Run pytest tests/unit_tests/validators/test_two_words.py

Library version:
Latest main, commit hash 5d653b9

Metadata

Metadata

Assignees

No one assigned

    Labels

    StalebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions