-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Python 3.9 (and earlier I guess), and non PEP-484 type definitions with injector #298
Comments
The problem is reproduced in this repository: https://github.com/Guibod/pydantic-settings-bug-298 The problem occurs with python 3.8 and 3.9, and only under the influence of It’s ok to close the bug if you consider that it is not bound to your code. Nonetheless, the PEP-484 trick worked, but PEP-604 seems not to work. |
From my discoveries, the issue is bound to the
Everything runs smoothly. |
Thanks @Guibod for reporting this and preparing the test project. As you mentioned this is not a problem of |
ok, then i’ll push this to |
I’ve stumbled on an issue on my tox tests will running my tests today.
My project relies on injector which relies on typing to infer variables to be injected.
There was also another instance of error about Generics, this was the improper Unions.
I managed to make everything to pass when I updated all occurences of piped type definitions to proper
Optional
andUnion
The bug was detected on 3.9.16, then reproduced in 3.9.19
The stackstrace
I’ve cut everything related to my own project. But it seems that
injector
requeststyping
(installed via brew on my mac) to explore theBaseSettings
class, and fail.I’ll try to run a minimal project to demonstrate the issue using only
get_type_hints
onBaseSettings
class.The text was updated successfully, but these errors were encountered: