youtype / mypy_boto3_builder

Type annotations builder for boto3 compatible with VSCode, PyCharm, Emacs, Sublime Text, pyright and mypy.
https://youtype.github.io/mypy_boto3_builder/
MIT License
544 stars 36 forks source link

`InstanceTypeDef` gone in `mypy-boto3-ec2==1.28.3.post1` #206

Closed kmurphy4 closed 1 year ago

kmurphy4 commented 1 year ago

Describe the bug In the latest release of mypy-boto3-ec2, the type_defs.InstanceTypeDef symbol is gone, though it existed in previous releases.

To Reproduce

$ python3.8 -m pip install 'mypy-boto3-ec2==1.28.3.post1'  # same for `boto3-stubs[ec2]`
$ python3.8 -c 'from mypy_boto3_ec2.type_defs import InstanceTypeDef'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: cannot import name 'InstanceTypeDef' from 'mypy_boto3_ec2.type_defs' (/tmp/freshvenv/lib/python3.8/site-packages/mypy_boto3_ec2/type_defs.py)

but it exists in 1.28.3:

$ python3.8 -m pip install 'mypy-boto3-ec2==1.28.3'  # same for `boto3-stubs[ec2]`
$ python3.8 -c 'from mypy_boto3_ec2.type_defs import InstanceTypeDef'

Additional context

$ lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.6 LTS
Release:    18.04
Codename:   bionic

$ python3.8 --version
Python 3.8.0

$ python3.8 -m pip --version
pip 23.1.2 from /tmp/freshvenv/lib/python3.8/site-packages/pip (python 3.8)

$ python3.8 -m pip freeze | grep boto3
boto3==1.28.3
boto3-stubs==1.28.3.post1
mypy-boto3-ec2==1.28.3.post1
vemel commented 1 year ago

Thank you for the report.

This hotfix will be released in two hours.

vemel commented 1 year ago

And, it is here!

Just released mypy-boto3-ec2 1.28.3.post2 with the fix included. Please test it and let me know if it works as it should.

Also, many other packages were updated, check 7.15.0 release notes.

mbalc commented 1 year ago

well, this is the second time this package breaks my hourly cron job

now that I adapted my codebase to use the Output thingy, now they're gone again :v

should I revert? or are you going to make the Output TypeDefs a thing in the future?

vemel commented 1 year ago

@mbalc yes, please revert. Sorry for the inconvenience.

OutputTypeDefs are only created if there are corresponding incompatible input TypeDefs.

kmurphy4 commented 1 year ago

Thanks! This is working for me :)