Skip to content
New issue

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

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

Already on GitHub? # to your account

Type validator is broken on python3.9.0-1 #114

Closed
RobertCraigie opened this issue Nov 12, 2021 · 0 comments · Fixed by #117
Closed

Type validator is broken on python3.9.0-1 #114

RobertCraigie opened this issue Nov 12, 2021 · 0 comments · Fixed by #117
Labels
bug/2-confirmed We have confirmed that this is a bug. kind/bug A reported bug.
Milestone

Comments

@RobertCraigie
Copy link
Owner

RobertCraigie commented Nov 12, 2021

Bug description

tests/test_validator.py::test_valid and tests/test_validator.py::test_recursive fail on python3.9.1

test_valid output:

―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― test_valid ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

    def test_valid() -> None:
        """Basic usage with correct data"""
>       validated = validate(types.IntFilter, {'equals': 1})

tests/test_validator.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/private/tmp/tox/prisma-client-py/py39/lib/python3.9/site-packages/prisma/validator.py:81: in validate
    instance = model.parse_obj(data)
pydantic/main.py:578: in pydantic.main.BaseModel.parse_obj
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   pydantic.error_wrappers.ValidationError: 7 validation errors for IntFilter
E   not_in
E     field required (type=value_error.missing)
E   lt
E     field required (type=value_error.missing)
E   lte
E     field required (type=value_error.missing)
E   gt
E     field required (type=value_error.missing)
E   gte
E     field required (type=value_error.missing)
E   in
E     field required (type=value_error.missing)
E   not
E     field required (type=value_error.missing)

pydantic/main.py:406: ValidationError

How to reproduce

tox -e py39 -- tests/test_validator.py

Expected behavior

Tests should pass

Environment & setup

  • OS: Mac OS
  • Database: SQLite
  • Python version: Python 3.9.1
@RobertCraigie RobertCraigie added bug/2-confirmed We have confirmed that this is a bug. kind/bug A reported bug. process/candidate Candidate for the next release labels Nov 12, 2021
@RobertCraigie RobertCraigie added this to the v0.3.1 milestone Nov 12, 2021
@RobertCraigie RobertCraigie removed the process/candidate Candidate for the next release label Nov 18, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug/2-confirmed We have confirmed that this is a bug. kind/bug A reported bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant