Open ashb opened 1 week ago
@jcrist PTAL. I've put in a place for making it installed or not, but didn't do anything in this PR to run it with or without this.
Let me know if you'd like the structure something else too. Or I'm more than happy for you to push changes to my fork too.
(I thought about adding the test for this in test_common with a decoder, but this seemed to be more directly testing the code)
This uses the same module that pydantic does, and it allows people to use the new pipe syntax if they have to support Python3.9 too -- very useful for libraries.
(Also it works better with many type checkers which seem to mistakenly think that with
from __future__ import annotations
meansint| None
will work, but it doesn't out of the box.)Fixes #771