dbt-core
dbt-core copied to clipboard
fix: support python 3.12
resolves #9007
Problem
distutils.util.strtobool
was removed in Python 3.12, see https://peps.python.org/pep-0632
Solution
Copying the distutils.util.strtobool
implementation from python 3.10.
Checklist
- [x] I have read the contributing guide and understand what's expected of me
- [x] I have run this code in development and it appears to resolve the stated issue
- [ ] This PR includes tests, or tests are not required/relevant for this PR
- [x] This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX
- [x] This PR includes type annotations for new and modified functions
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.
In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.
CLA has not been signed by users: @l1xnan
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.
In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.
CLA has not been signed by users: @l1xnan
Codecov Report
Attention: Patch coverage is 75.00000%
with 2 lines
in your changes are missing coverage. Please review.
Project coverage is 87.99%. Comparing base (
1ec5e22
) to head (714569c
). Report is 3 commits behind head on main.
:exclamation: Current head 714569c differs from pull request most recent head 721cb38. Consider uploading reports for the commit 721cb38 to get more accurate results
Files | Patch % | Lines |
---|---|---|
core/dbt/utils.py | 71.42% | 2 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #9601 +/- ##
==========================================
- Coverage 88.00% 87.99% -0.01%
==========================================
Files 168 176 +8
Lines 22210 22317 +107
==========================================
+ Hits 19546 19638 +92
- Misses 2664 2679 +15
Flag | Coverage Δ | |
---|---|---|
integration | 85.59% <75.00%> (-0.08%) |
:arrow_down: |
unit | 62.08% <25.00%> (+0.16%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hey @l1xnan,
Thanks for the PR, it looks good to me!
Can you please sign the CLA and add a changelog entry so we can merge this in? Instructions on creating a changelog entry are here: https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md#adding-or-modifying-a-changelog-entry
Thank you!
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.
In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.
CLA has not been signed by users: @l1xnan
Run pip install -e dbt-core
in python 3.11, it is installed by running setup.py develop
:
# lib/site-packages
dbt/
dbt-core.egg-link
easy-install.pth # The content is `<project-root>/dbt-core/core`
As a comparison, run pip install -e dbt-core
in python 3.12, dbt-core
is installed by building it as a temp wheel file:
# lib/site-packages
dbt/
dbt_core-1.8.0a1.dist-info/
__editable___dbt_core_1_8_0a1_finder.py
__editable__.dbt_core-1.8.0a1
The easy-install.pth
file is missing, dbt.include.starter_project
is only found in the site-packages/dbt
, so the dbt.include.starter_project
cannot be imported.
It can also be resolved with the following command:
pip install -e ./core --config-settings editable_mode=compat
see to https://setuptools.pypa.io/en/latest/userguide/development_mode.html#legacy-behavior
Official resolves