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

CI fails when using Python 3.13 #176

Closed
andrablaj opened this issue Oct 10, 2024 · 2 comments · Fixed by #177
Closed

CI fails when using Python 3.13 #176

andrablaj opened this issue Oct 10, 2024 · 2 comments · Fixed by #177
Assignees
Labels
released Type: Bug Fix something that isn't working as intended

Comments

@andrablaj
Copy link
Member

andrablaj commented Oct 10, 2024

Describe the bug

The latest version of dbt core (1.8.7) doesn't support the latest version of Python (3.13, released October 7th).

To Reproduce

  1. Run the e2e tests in CI, or locally with the latest version of Python (>=3.13).

Expected behavior

E2e tests should pass locally and in the CI.

Logs

dbt-1  | 11:39:06  Running with dbt=1.8.7
dbt-1  | 11:39:06  Encountered an error:
dbt-1  | /usr/local/lib/python3.13/site-packages/psycopg2/_psycopg.cpython-313-x86_64-linux-gnu.so: undefined symbol: _PyInterpreterState_Get
dbt-1  | 11:39:06  Traceback (most recent call last):
dbt-1  |   File "/usr/local/lib/python3.13/site-packages/dbt/cli/requires.py", line 138, in wrapper
dbt-1  |     result, success = func(*args, **kwargs)
dbt-1  |                       ~~~~^^^^^^^^^^^^^^^^^
dbt-1  |   File "/usr/local/lib/python3.13/site-packages/dbt/cli/requires.py", line 101, in wrapper
dbt-1  |     return func(*args, **kwargs)
dbt-1  |   File "/usr/local/lib/python3.13/site-packages/dbt/cli/requires.py", line 215, in wrapper
dbt-1  |     profile = load_profile(flags.PROJECT_DIR, flags.VARS, flags.PROFILE, flags.TARGET, threads)
dbt-1  |   File "/usr/local/lib/python3.13/site-packages/dbt/config/runtime.py", line 71, in load_profile
dbt-1  |     profile = Profile.render(
dbt-1  |         profile_renderer, profile_name, profile_name_override, target_override, threads_override
dbt-1  |     )
dbt-1  |   File "/usr/local/lib/python3.13/site-packages/dbt/config/profile.py", line 403, in render
dbt-1  |     return cls.from_raw_profiles(
dbt-1  |            ~~~~~~~~~~~~~~~~~~~~~^
dbt-1  |         raw_profiles=raw_profiles,
dbt-1  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
dbt-1  |     ...<3 lines>...
dbt-1  |         threads_override=threads_override,
dbt-1  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dbt-1  |     )
dbt-1  |     ^
dbt-1  |   File "/usr/local/lib/python3.13/site-packages/dbt/config/profile.py", line 369, in from_raw_profiles
dbt-1  |     return cls.from_raw_profile_info(
dbt-1  |            ~~~~~~~~~~~~~~~~~~~~~~~~~^
dbt-1  |         raw_profile=raw_profile,
dbt-1  |         ^^^^^^^^^^^^^^^^^^^^^^^^
dbt-1  |     ...<3 lines>...
dbt-1  |         threads_override=threads_override,
dbt-1  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dbt-1  |     )
dbt-1  |     ^
dbt-1  |   File "/usr/local/lib/python3.13/site-packages/dbt/config/profile.py", line 325, in from_raw_profile_info
dbt-1  |     credentials: Credentials = cls._credentials_from_profile(
dbt-1  |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
dbt-1  |         profile_data, profile_name, target_name
dbt-1  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dbt-1  |     )
dbt-1  |     ^
dbt-1  |   File "/usr/local/lib/python3.13/site-packages/dbt/config/profile.py", line 149, in _credentials_from_profile
dbt-1  |     cls = load_plugin(typename)
dbt-1  |   File "/usr/local/lib/python3.13/site-packages/dbt/adapters/factory.py", line 239, in load_plugin
dbt-1  |     return FACTORY.load_plugin(name)
dbt-1  |            ~~~~~~~~~~~~~~~~~~~^^^^^^
dbt-1  |   File "/usr/local/lib/python3.13/site-packages/dbt/adapters/factory.py", line 68, in load_plugin
dbt-1  |     mod: Any = import_module("." + name, "dbt.adapters")
dbt-1  |                ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dbt-1  |   File "/usr/local/lib/python3.13/importlib/__init__.py", line 88, in import_module
dbt-1  |     return _bootstrap._gcd_import(name[level:], package, level)
dbt-1  |            ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dbt-1  |   File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
dbt-1  |   File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
dbt-1  |   File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
dbt-1  |   File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
dbt-1  |   File "<frozen importlib._bootstrap_external>", line 1022, in exec_module
dbt-1  |   File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
dbt-1  |   File "/usr/local/lib/python3.13/site-packages/dbt/adapters/postgres/__init__.py", line 4, in <module>
dbt-1  |     from dbt.adapters.postgres.connections import PostgresConnectionManager, PostgresCredentials
dbt-1  |   File "/usr/local/lib/python3.13/site-packages/dbt/adapters/postgres/connections.py", line 13, in <module>
dbt-1  |     import psycopg2
dbt-1  |   File "/usr/local/lib/python3.13/site-packages/psycopg2/__init__.py", line 51, in <module>
dbt-1  |     from psycopg2._psycopg import (                     # noqa
dbt-1  |     ...<10 lines>...
dbt-1  |     )
dbt-1  | ImportError: /usr/local/lib/python3.13/site-packages/psycopg2/_psycopg.cpython-313-x86_64-linux-gnu.so: undefined symbol: _PyInterpreterState_Get
dbt-1  | 
dbt-1  | DBT run failed

Additional context

Related PR where the issue was first encountered.

@andrablaj andrablaj added the Type: Bug Fix something that isn't working as intended label Oct 10, 2024
@andrablaj
Copy link
Member Author

This trial commit confirmed that using Python 3.12 solves this issue.

andrablaj added a commit that referenced this issue Oct 10, 2024
@andrablaj andrablaj self-assigned this Oct 10, 2024
@andrablaj andrablaj moved this from Todo to In Progress in Product Team Activities Oct 10, 2024
andrablaj added a commit that referenced this issue Oct 10, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Product Team Activities Oct 10, 2024
medic-ci pushed a commit that referenced this issue Oct 10, 2024
## [1.3.1](v1.3.0...v1.3.1) (2024-10-10)

### Bug Fixes

* **#176:** use python 3.12 ([#177](#177)) ([d542e3c](d542e3c)), closes [#176](#176)
@medic-ci
Copy link

🎉 This issue has been resolved in version 1.3.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Type: Bug Fix something that isn't working as intended
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants