brennerm / aws-quota-checker

Keep an eye on your AWS quotas before you hit their limits
https://pypi.org/project/aws-quota-checker/
MIT License
84 stars 36 forks source link

Compatibility with python3 #12

Closed rishavsharma9802 closed 3 years ago

rishavsharma9802 commented 3 years ago

Getting the following error while running it inside a kubernetes pod or even as a container

Traceback (most recent call last): File "/usr/local/bin/aws-quota-checker", line 7, in from aws_quota.cli import cli File "/usr/local/lib/python3.7/site-packages/aws_quota/cli.py", line 2, in from aws_quota.utils import get_account_id File "/usr/local/lib/python3.7/site-packages/aws_quota/utils.py", line 6, in def get_account_id(session: boto3.Session) -> str: File "/usr/lib64/python3.7/functools.py", line 490, in lru_cache raise TypeError('Expected maxsize to be an integer or None') TypeError: Expected maxsize to be an integer or None

brennerm commented 3 years ago

Hey @kungfupanda792, thanks for reporting. Seems like that's an Python 3.7 issue cause the functools interface changed a bit in Python 3.8.

Will fix it in the next days. Until then you can use Python 3.8 if that's an option for you.

brennerm commented 3 years ago

Issue should be fixed with version 1.4.1.

BTW here are the changes that were necessary. ;)

-@functools.lru_cache                                                                                                                                                                                                            
+@functools.lru_cache()