Skip to content
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

v1.8.4 release breaking compatibility with python 3.8 #450

Open
1 task
nguyenann13 opened this issue Nov 22, 2024 · 0 comments · May be fixed by #452
Open
1 task

v1.8.4 release breaking compatibility with python 3.8 #450

nguyenann13 opened this issue Nov 22, 2024 · 0 comments · May be fixed by #452
Labels
bug Something isn't working

Comments

@nguyenann13
Copy link

nguyenann13 commented Nov 22, 2024

Expected behavior

dbt-trino should be compatible with python 3.8

Actual behavior

dbt debug erroring out due to type hint list[BehaviorFlag], generic types was introduced in python 3.9

Steps To Reproduce

Run dbt debug using python 3.8

Log output/Screenshots

  File "/home/vznadmin/agent/_work/_tool/Python/3.8.18/x64/lib/python3.8/site-packages/dbt/cli/requires.py", line 138, in wrapper
    result, success = func(*args, **kwargs)
  File "/home/vznadmin/agent/_work/_tool/Python/3.8.18/x64/lib/python3.8/site-packages/dbt/cli/requires.py", line 101, in wrapper
    return func(*args, **kwargs)
  File "/home/vznadmin/agent/_work/_tool/Python/3.8.18/x64/lib/python3.8/site-packages/dbt/cli/main.py", line 406, in debug
    results = task.run()
  File "/home/vznadmin/agent/_work/_tool/Python/3.8.18/x64/lib/python3.8/site-packages/dbt/task/debug.py", line 120, in run
    load_profile_status: SubtaskStatus = self._load_profile()
  File "/home/vznadmin/agent/_work/_tool/Python/3.8.18/x64/lib/python3.8/site-packages/dbt/task/debug.py", line 211, in _load_profile
    profile: Profile = Profile.render(
  File "/home/vznadmin/agent/_work/_tool/Python/3.8.18/x64/lib/python3.8/site-packages/dbt/config/profile.py", line 403, in render
    return cls.from_raw_profiles(
  File "/home/vznadmin/agent/_work/_tool/Python/3.8.18/x64/lib/python3.8/site-packages/dbt/config/profile.py", line 369, in from_raw_profiles
    return cls.from_raw_profile_info(
  File "/home/vznadmin/agent/_work/_tool/Python/3.8.18/x64/lib/python3.8/site-packages/dbt/config/profile.py", line 325, in from_raw_profile_info
    credentials: Credentials = cls._credentials_from_profile(
  File "/home/vznadmin/agent/_work/_tool/Python/3.8.18/x64/lib/python3.8/site-packages/dbt/config/profile.py", line 149, in _credentials_from_profile
    cls = load_plugin(typename)
  File "/home/vznadmin/agent/_work/_tool/Python/3.8.18/x64/lib/python3.8/site-packages/dbt/adapters/factory.py", line 239, in load_plugin
    return FACTORY.load_plugin(name)
  File "/home/vznadmin/agent/_work/_tool/Python/3.8.18/x64/lib/python3.8/site-packages/dbt/adapters/factory.py", line 68, in load_plugin
    mod: Any = import_module("." + name, "dbt.adapters")
  File "/home/vznadmin/agent/_work/_tool/Python/3.8.18/x64/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/vznadmin/agent/_work/_tool/Python/3.8.18/x64/lib/python3.8/site-packages/dbt/adapters/trino/__init__.py", line 8, in <module>
    from dbt.adapters.trino.impl import TrinoAdapter  # isort: split
  File "/home/vznadmin/agent/_work/_tool/Python/3.8.18/x64/lib/python3.8/site-packages/dbt/adapters/trino/impl.py", line 26, in <module>
    class TrinoAdapter(SQLAdapter):
  File "/home/vznadmin/agent/_work/_tool/Python/3.8.18/x64/lib/python3.8/site-packages/dbt/adapters/trino/impl.py", line 56, in TrinoAdapter
    def _behavior_flags(self) -> list[BehaviorFlag]:
TypeError: 'type' object is not subscriptable


##[error]PowerShell exited with code '1'.
Finishing: Run dbt debug: Test connection

Operating System

Microsoft Windows [Version 10.0.19045.5131]

dbt version

1.8.7

Trino Server version

449

Python version

3.8.18

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@nguyenann13 nguyenann13 added the bug Something isn't working label Nov 22, 2024
@damian3031 damian3031 linked a pull request Nov 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant