dotenv-org / python-dotenv-vault

Load environment variables from encrypted .env.vault files
https://www.dotenv.org/docs/languages/python
MIT License
28 stars 9 forks source link

Type exception in Python3 `TypeError: 'type' object is not subscriptable` #5

Closed jesuscast closed 1 year ago

jesuscast commented 1 year ago

The following exception happens when running on Python 3.8.12

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/jesuscastanedasosa/dev/notopensource/env3/lib/python3.8/site-packages/dotenv_vault/__init__.py", line 1, in <module>
    from .main import load_dotenv
  File "/Users/jesuscastanedasosa/dev/notopensource/env3/lib/python3.8/site-packages/dotenv_vault/main.py", line 6, in <module>
    from .vault import DotEnvVault
  File "/Users/jesuscastanedasosa/dev/notopensource/env3/lib/python3.8/site-packages/dotenv_vault/vault.py", line 16, in <module>
    class DotEnvVault(): #vault stuff
  File "/Users/jesuscastanedasosa/dev/notopensource/env3/lib/python3.8/site-packages/dotenv_vault/vault.py", line 89, in DotEnvVault
    def _key_rotation(self, keys: list[dict]) -> str:
TypeError: 'type' object is not subscriptable

list[dict] is only available in Python 3.9+

It's not clear anywhere that you expect users to use Python 3.9. This is a very bleeding edge requirement and most existing codebases cannot support it.

Please make the library backwards compatible with at least 3.8+

nsnguyen commented 1 year ago

This is merged and bumped version to 0.3.0