Samuel Colvin

Results 324 issues of Samuel Colvin

WIP. Moving to pydantic_core for `BaseModel` validation. We won't get all tests to pass on this PR, but we can get further than this. Eventually I want to rename `main.py`...

See #4378. This makes type checking PEP 484 compliant (as of 2018). mypy will change its defaults soon. See: https://github.com/python/mypy/issues/9091 https://github.com/python/mypy/pull/13401

Change

Needs: * [x] `core_schema.py` * [x] tests

Might be useful in a number of scenarios. E.g. parsing custom data types.

good first issue

Like we have in pydantic V1 but with JSON parsing implemented in rust using existing functionality. `Json[Foobar]` should also work, e.g. `JsonSchema` should have a `schema` property.

Should be fairly easy since speedate [gives `offset` as optional](https://docs.rs/speedate/latest/speedate/struct.DateTime.html#structfield.offset). @antonagestam said he might be able to work on this, see https://github.com/pydantic/pydantic/discussions/3477#discussioncomment-3771452

See #247. Current error: ``` Found maturin version requirement maturin>=0.13,

We should allow an extra no-op `description` key on all schemas which can be anything and should be stored along-side the validator somehow, useful for reviewing schemas and understanding bugs....

Since `float('nan') != float('nan')` we need a custom `FloatNan` type.

See https://gist.github.com/samuelcolvin/625a1655c2a73e02469fc3c27285ca42 ## To use now: install: ```bash pip install git+https://github.com/samuelcolvin/dirty-equals.git@insert_assert ``` With that you should be able to add `insert_assert()` into your tests and it should "just work ™",...