Closed tobni closed 1 year ago
Hello,
Thank you for the feature request. It makes sense. However, env variables are not supported in *.pyi
files, so it will not work. The solution could be to use typing_extensions
if available, and fallback to typing
. Another solution would be always to use typing_extensions
and make it a mandatory dependency.
I will check pydantic
docs.
https://docs.pydantic.dev/2.3/errors/usage_errors/#typed-dict-version is the cause for my request.
I just released mypy_boto3_builder 7.18.0
with new import logic. I am going to generate all packages later today.
@tobni I released all boto3-stubs
packages built with the new builder version. Please test and let me know if it works as it should.
Describe your idea I would like to enforce the library to use
typing_extensions
, regardless of my interpreter version. The top levelif
clause in the stub files could maybe support some type of configuration, like an environment variable? Code sampleAdditional context
pydantic
v2 requiresTypedDict
to betyping_extensions.TypedDict
unless python is version 3.12 or higher. I cannot upgrade to this version of python, but I do want pydanticsTypedDict
support for parsing your generatedTypedDict
s.