New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AssertionError: Found different types with the same name in the schema: Foo, Foo. #34
Comments
@plopd Can you give us some more detail on how you're running it -- can you paste some code from your application where this is coming up? |
Given the same python environment I ran the code inside |
Your tests don't pass fully with pytest, given
|
@plopd Thank you for finding this! We will have to add a better error message -- unfortunately the forward refs feature requires Python 3.7+ as in upstream Pydantic -- https://pydantic-docs.helpmanual.io/usage/postponed_annotations/ . So that test is not expected to pass on Python 3.6. |
@plopd Yes, ForwardRef isn't available in python 3.6, thanks for catching that. Note that there are other caveats with python 3.6 (Union Types not working specifically, due to 3.6's implementation of them). So of course this code and the messaging can use some improvements, but in the meantime if you're able to use python 3.7 you'll have better results. Thanks again for finding the issue. |
Closing this as it's been >3 months with no further action needed 😄 |
@necaris I get
AssertionError: Found different types with the same name in the schema: Foo, Foo.
if I runtest_query
fromtest_forward_refs.py
twice!The text was updated successfully, but these errors were encountered: