Serge Matveenko

Results 92 comments of Serge Matveenko

@spockNinja sounds like a great idea. Moreover, it opens a way for some other things regarding images like dimensions or mime-type for any file.

@sloria I've tried this as a format for `fields.DateTime` and it is not quite right. DateTime field produces the value of type `str`. However, a timestamp has to have type...

@vgavro my concern regarding the type of serialization result `fields.DateTime` provides is a result of a common practice for plugins and third party libraries to determine a type of field...

@vgavro another case to mention is about possible value ranges. The thing is DateTime could be whatever in the past. However, only values from 1970-01-01 are possible to serialize as...

Well, I've just noticed once more callable defaults and see `default=lambda: datetime.utcnow()` variant. But may be it will be useful to have this out of the box. And yes, I...

Thank you very much! Now I may try to contribute some code on this task. Not promising that I will though.

@mvanderlee Could you please provide a minimal reproducible example?

Well, this is about saving a call to `core_schema.any_schema()` in case you need it as a default value. See the original case https://github.com/pydantic/pydantic/pull/6715#discussion_r1265881851 Having such a constant allows using it...

@gatagat what do you think about this one?