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

drop python 3.8, enable python 3.13, and enable full linting for 3.12 #2194

Open
wants to merge 14 commits into
base: devel
Choose a base branch
from

Conversation

sh-rp
Copy link
Collaborator

@sh-rp sh-rp commented Jan 7, 2025

Description

This PR does the following:

  • Drop support for python3.8, also removes all special code and dependencies we added for pyhton3.8
  • Enable linting for python3.12, all extras are now supported on python3.12
  • Enable python3.13 and run common tests there. Use dlt-pendulum for now.

Based on #2047

ToDo:

  • Should dlt-pendulum be on our private pypi?

Copy link

netlify bot commented Jan 7, 2025

Deploy Preview for dlt-hub-docs canceled.

Name Link
🔨 Latest commit 391785c
🔍 Latest deploy log https://app.netlify.com/sites/dlt-hub-docs/deploys/6780d84de6fb5c00083d028e

@sh-rp sh-rp force-pushed the tmp/test_py_versions branch 3 times, most recently from 368e04d to d0de684 Compare January 8, 2025 10:16
@sh-rp sh-rp changed the title [do not merge] test python versions [do not merge] pin poetry 1.8.5 and enable linting for python 3.12 Jan 8, 2025
@sh-rp sh-rp changed the title [do not merge] pin poetry 1.8.5 and enable linting for python 3.12 pin poetry 1.8.5 and enable linting for python 3.12 Jan 8, 2025
@sh-rp sh-rp force-pushed the tmp/test_py_versions branch from d0de684 to 8cc3b7a Compare January 8, 2025 10:27
@sh-rp sh-rp changed the title pin poetry 1.8.5 and enable linting for python 3.12 drop python 3.8, enable python 3.13 and enable linting and common tests for 3.12 3.13 Jan 8, 2025
@sh-rp sh-rp changed the title drop python 3.8, enable python 3.13 and enable linting and common tests for 3.12 3.13 drop python 3.8, enable python 3.13 and enable linting and common tests for 3.12, 3.13 Jan 8, 2025
@sh-rp sh-rp force-pushed the tmp/test_py_versions branch 2 times, most recently from 5e4f829 to fc4006c Compare January 8, 2025 16:20
requests = ">=2.26.0"
pendulum = ">=2.1.2"
# TODO: pin to tag on dlt-pendulum repo
dlt-pendulum = [
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE: this still requires cargo at this point

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rudolfix I have another question about this: should we not have a different package name for our pendulum? The way it is currently set up, dlt-pendulum is always used, also for python versions before 3.13, this means there will be package name collissions if users also have the regular pendulum in their dependencies already in a project. I'm not sure what happens in this case.

Also you mentioned that you made some changes they will not like and there is a change in the code where you removed the casting of pendulum.now() to a string, are the libraries now incompatible?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are now using a properly build dlt-pendulum for python 3.13, so that part is solved. The tests will verify wether this string removal still works or not.

@sh-rp sh-rp force-pushed the tmp/test_py_versions branch 2 times, most recently from 7f22437 to e46f21c Compare January 8, 2025 18:15
@sh-rp sh-rp changed the title drop python 3.8, enable python 3.13 and enable linting and common tests for 3.12, 3.13 drop python 3.8, enable python 3.13, and enable full linting for 3.12 Jan 9, 2025
@sh-rp sh-rp marked this pull request as ready for review January 9, 2025 11:15
@@ -26,7 +26,7 @@ jobs:
matrix:
os:
- ubuntu-latest
python-version: ["3.8.x", "3.9.x", "3.10.x", "3.11.x"]
python-version: ["3.9.x", "3.10.x", "3.11.x", "3.12.x"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make dev works for 3.12 now!

rudolfix
rudolfix previously approved these changes Jan 9, 2025
Copy link
Collaborator

@rudolfix rudolfix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! just resolve all the conflicts...

@@ -1,4 +1,4 @@
FROM alpine:3.15
FROM python:3.11.11-alpine
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: switched to a python image, I can probably revert this if we want to use a vanilla alpine here.


# install arrow 17.0.0, usually we would need apache-arrow-dev=17.0.0 but it is not available in alpine 3.20
# adapt this version to the arrow version you need
RUN git clone --no-checkout https://github.com/apache/arrow.git /arrow \
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as noted in the comment, alpine always seems to come with one version of each package, i remember something like this from our last company, so I need to build arrow 17 here if I want to use it..

# poetry export -f requirements.txt --output _gen_requirements.txt --without-hashes --extras gcp --extras redshift
# grep `cat compiled_packages.txt` _gen_requirements.txt > compiled_requirements.txt
poetry install --no-interaction -E gcp -E redshift -E duckdb
poetry run pip freeze > _gen_requirements.txt
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this works well, poetry export was failing on several dependencies..

@sh-rp sh-rp mentioned this pull request Jan 10, 2025
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