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

Extend support to Python 3.12 #484

Merged
merged 16 commits into from
Jun 18, 2024
Merged

Extend support to Python 3.12 #484

merged 16 commits into from
Jun 18, 2024

Conversation

santisoler
Copy link
Member

@santisoler santisoler commented Mar 22, 2024

Bump minimum required Python version in CI. Bump Python version in environment.yml. Bump minimum version for some dependencies in pyproject.toml, requiring at minimum the ones that work on Python 3.12. Add classifier in pyproject.toml for Python 3.12.

Bump Python version in CI to check if all tests pass and documentation
builds properly in the latest version of Python.
@santisoler santisoler marked this pull request as draft March 22, 2024 23:26
@santisoler
Copy link
Member Author

Test fails because there's an issue with Verde and pkg_resources in Python 3.12. After that issue is fixed upstream in Verde, do we need to constrain Verde's version to that release?

@santisoler
Copy link
Member Author

santisoler commented Apr 18, 2024

Haha, apparently after closing fatiando/verde#448, this PR was automatically closed. I'm reopening it since we do want to apply these changes despite the ones introduced in Verde.

Reminder to be careful about using the words "resolve", "fix", "closes" in comments 😁

@santisoler santisoler reopened this Apr 18, 2024
@leouieda
Copy link
Member

Oops

@@ -35,7 +36,7 @@ dependencies = [
"scikit-learn >= 0.24",
"numba >= 0.52",
"xarray >= 0.16",
"verde >= 1.7",
"verde >= 1.8.1",
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure this is required here? It's an issue with Verde only in Python 3.12 and Verde 1.7 should still work with previous Pythons.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure what to do here. If you're running Python 3.12 you need Verde >= v1.8.1.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, you're right. I guess we should just bump the requirement here. It doesn't really have a huge impact and Verde 1.8 didn't break anything.

Use the same minimum versions as Verde
We can fix the issues with Numpy 2.0.0 in a separate PR.
Convert Numpy scalars to Python numbers so the outputs of examples that
are being compared when running doctests support Numpy>=2.0.
@santisoler santisoler marked this pull request as ready for review June 18, 2024 19:32
@santisoler santisoler merged commit 5375826 into main Jun 18, 2024
19 checks passed
@santisoler santisoler deleted the extend-py-3.12 branch June 18, 2024 20:45
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