Removing use_enum & use_datetime from from_dict() in favor of auto detection?
See original GitHub issueHi,
why does the from_dict() function has use_enum
& use_datetime
as options, instead of an automatic isinstance({value_name}, {type_name(origin_type)})
check?
I think an instance check right at the beginning near the value is None
check would also be useful for other special types like UUID, IPv4Address or Path where otherwise the current from_dict function would fail if it already contains a valid instance of the origin type.
Are you open for a pull request which removes the two options? Do you think it would even be possible? Or is it not inline with your design goals.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m closing this issue since
use_enum
anduse_datetime
were removed in version 3.0.Hi @ydylla
JFYI, since I recently implemented the dialects feature, I’m planning to remove
use_bytes
,use_enum
,use_datetime
parameters. These three parameters were added due to differences in third-party libraries and can now be replaced by dialects.