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

Add Python 3.12 Support / Remove Python 3.8 Support #1066

Closed
wants to merge 6 commits into from

Conversation

plypaul
Copy link
Contributor

@plypaul plypaul commented Mar 7, 2024

Resolves #1065

Description

This PR updates the code and Github workflows to support Python 3.12.

@cla-bot cla-bot bot added the cla:yes label Mar 7, 2024
@plypaul plypaul added the Run Tests With Other SQL Engines Runs the test suite against the SQL engines in our target environment label Mar 7, 2024
@plypaul plypaul had a problem deploying to DW_INTEGRATION_TESTS March 7, 2024 18:06 — with GitHub Actions Failure
@plypaul plypaul temporarily deployed to DW_INTEGRATION_TESTS March 7, 2024 18:06 — with GitHub Actions Inactive
@plypaul plypaul temporarily deployed to DW_INTEGRATION_TESTS March 7, 2024 18:06 — with GitHub Actions Inactive
@plypaul plypaul temporarily deployed to DW_INTEGRATION_TESTS March 7, 2024 18:06 — with GitHub Actions Inactive
@plypaul plypaul changed the title dd Python 3.12 Support / Remove Python 3.8 Support Add Python 3.12 Support / Remove Python 3.8 Support Mar 7, 2024
@plypaul plypaul added Run Tests With Other SQL Engines Runs the test suite against the SQL engines in our target environment and removed Run Tests With Other SQL Engines Runs the test suite against the SQL engines in our target environment labels Mar 7, 2024
@plypaul plypaul temporarily deployed to DW_INTEGRATION_TESTS March 7, 2024 18:46 — with GitHub Actions Inactive
@plypaul plypaul temporarily deployed to DW_INTEGRATION_TESTS March 7, 2024 18:46 — with GitHub Actions Inactive
@plypaul plypaul temporarily deployed to DW_INTEGRATION_TESTS March 7, 2024 18:47 — with GitHub Actions Inactive
@plypaul plypaul temporarily deployed to DW_INTEGRATION_TESTS March 7, 2024 18:47 — with GitHub Actions Inactive
@github-actions github-actions bot removed the Run Tests With Other SQL Engines Runs the test suite against the SQL engines in our target environment label Mar 7, 2024
@plypaul plypaul marked this pull request as ready for review March 7, 2024 19:23
Copy link
Contributor

@tlento tlento left a comment

Choose a reason for hiding this comment

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

Per discussion, we probably need to do a bunch of annoying stuff to keep 3.8 through 3.12 here. Sigh.

@@ -7,7 +7,7 @@ name = "metricflow"
version = "0.205.0"
description = "Translates a simple metric definition into reusable SQL and executes it against the SQL engine of your choice."
readme = "README.md"
requires-python = ">=3.8,<3.12"
requires-python = ">=3.9,<=3.12"
Copy link
Contributor

Choose a reason for hiding this comment

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

Python 3.8 is supported through October, so we need to to support 3.8 through the dbt-core release following official EOL.

@@ -33,9 +33,10 @@ dependencies = [
"graphviz>=0.18.2, <0.21",
"halo>=0.0.31, <0.1.0",
"more-itertools>=8.10.0, <10.2.0",
"pandas>=1.5.0, <1.6.0",
# pandas 2.2 has a bug https://github.com/databricks/databricks-sql-python/issues/334, so using 2.1.
"pandas>=2.1, <2.2",
Copy link
Contributor

Choose a reason for hiding this comment

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

This is super restrictive, I don't think we can block 1.x installs.

Medium term I'd like to just remove pandas as a production dependency altogether, we don't need it for anything.

"pydantic>=1.10.0, <1.11.0",
"python-dateutil>=2.8.2, <2.9.0",
"python-dateutil~=2.9.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Please don't use ~= syntax, it breaks PIP resolvers in certain edge cases.

Comment on lines +60 to +62
"pytest-mock~=3.12",
"pytest-xdist~=3.5",
"pytest~=8.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

No ~= please.

@plypaul plypaul changed the title Add Python 3.12 Support / Remove Python 3.8 Support Add Python 3.12 Support May 8, 2024
@plypaul plypaul changed the title Add Python 3.12 Support Add Python 3.12 Support / Remove Python 3.8 Support May 8, 2024
@plypaul plypaul mentioned this pull request May 8, 2024
@plypaul
Copy link
Contributor Author

plypaul commented May 30, 2024

Closing this out as this was significantly revised, and related changes will be in a another PR.

@plypaul plypaul closed this May 30, 2024
@plypaul plypaul deleted the plypaul--05--python-3.12 branch May 31, 2024 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SL-1831] [Feature] Add Python 3.12 Support
2 participants