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

fix python version check for typing import #210

Merged
merged 3 commits into from
Feb 3, 2025
Merged

Conversation

baudsimVD
Copy link
Contributor

@baudsimVD baudsimVD commented Feb 3, 2025

Running dbt-osmosis on python 3.9 results in the following error :
AttributeError: module 'typing' has no attribute 'ParamSpec'

Also switching to typing.Union in osmosis.py, it was throwing :

python3.9/site-packages/dbt_osmosis/core/osmosis.py", line 1096, in _get_yaml_path_template
    path_template = _find_first(t.cast(list[str | None], conf), lambda v: v is not None)
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

I tested the refactor command and it works fine after those modifications

@z3z1ma
Copy link
Owner

z3z1ma commented Feb 3, 2025

Ah good catch. Thanks! I see we don't test on 3.9 in the test suite. Not entirely sure why. Can probably add it.

@z3z1ma z3z1ma merged commit 0ce0e71 into z3z1ma:main Feb 3, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants