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

SPEC 0: Set minimum supported versions to pandas>=2.0 and xarray>=2023.04 #3460

Merged
merged 4 commits into from
Sep 28, 2024

Conversation

seisman
Copy link
Member

@seisman seisman commented Sep 27, 2024

Description of proposed changes

Following SPEC0, we should drop pandas 1.5 and xarray 2022.09 support in 2024 Q3, but now we have dependency conflicts.

  error    libmamba Could not solve for environment specs
      The following packages are incompatible
      ├─ pandas =2.0 is requested and can be installed;
      └─ xarray =2022.11 is not installable because it requires
         └─ pandas >=1.3,<2a0, which conflicts with any installable versions previously reported.
  critical libmamba Could not solve for environment specs

Following pydata/xarray#7716 (comment), xarray 2023.04 works with pandas 2.0. Then we must decide whether to merge this PR now (violating the SPEC0 policy) or wait until April 2025.

I prefer to wait until April 2025, so adding this PR to milestone v0.16.0.

Previous pandas version bump at #3043.

@seisman seisman added deprecation Deprecating a feature needs review This PR has higher priority and needs review. labels Sep 27, 2024
@seisman seisman added this to the 0.14.0 milestone Sep 27, 2024
@seisman seisman changed the title SPEC 0: Bump minimum supported versions to pandas 2.0 SPEC 0: Bump minimum supported versions to pandas 2.0 and xarray 2022.11 Sep 27, 2024
@seisman seisman removed the needs review This PR has higher priority and needs review. label Sep 27, 2024
@seisman seisman marked this pull request as draft September 27, 2024 06:15
@seisman seisman removed this from the 0.14.0 milestone Sep 27, 2024
@seisman seisman changed the title SPEC 0: Bump minimum supported versions to pandas 2.0 and xarray 2022.11 SPEC 0: Bump minimum supported versions to pandas 2.0 and xarray 2023.03 Sep 27, 2024
@seisman seisman added this to the 0.16.0 milestone Sep 27, 2024
@weiji14
Copy link
Member

weiji14 commented Sep 28, 2024

Following pydata/xarray#7716 (comment), xarray 2023.04 works with pandas 2.0. Then we must decide whether to merge this PR now (violating the SPEC0 policy) or wait until April 2025

Yeah, I think we'll need to bump the minimum required xarray version more than needed this time (to 2023.03) to work with pandas=2.0, considering that conda-forge did a repodata-patch for this at conda-forge/conda-forge-repodata-patches-feedstock#426 (comment). Note that SPEC 0 does say the following:

... projects may occasionally want to drop support for core package dependencies earlier than recommended by this SPEC. For instance, if a newer minimum version of a core package is needed by a project due to a critical bug fix, which is not backported to older versions.

I would consider that xarray 2023.03 supporting pandas 2.0 is a critical bug fix 🙂, so would prefer to get this into PyGMT v0.14.0.

@seisman seisman modified the milestones: 0.16.0, 0.14.0 Sep 28, 2024
@seisman
Copy link
Member Author

seisman commented Sep 28, 2024

I'm OK with making it to v0.14.0

@seisman seisman marked this pull request as ready for review September 28, 2024 05:55
@seisman seisman changed the title SPEC 0: Bump minimum supported versions to pandas 2.0 and xarray 2023.03 SPEC 0: Bump minimum supported versions to pandas 2.0 and xarray 2023.04 Sep 28, 2024
Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

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

Need to update doc/minversions.rst too.

Can we also agree on a consistent title for SPEC 0 updates? We've been inconsistent in https://www.pygmt.org/v0.13.0/changes.html:

  • SPEC 0: Bump minimum supported version to xarray 2022.09
  • SPEC 0: Set minimum supported versions to Python>=3.10, pandas>=1.5 and xarray>=2022.06
  • NEP29: Set minimum required version to NumPy 1.23+

I like the middle one using pandas>=1.5, but no strong opinions.

@seisman seisman changed the title SPEC 0: Bump minimum supported versions to pandas 2.0 and xarray 2023.04 SPEC 0: Set minimum supported versions to pandas>=2.0 and xarray>=2023.04 Sep 28, 2024
@seisman
Copy link
Member Author

seisman commented Sep 28, 2024

Need to update doc/minversions.rst too.

No need to update this file after #3380.

Can we also agree on a consistent title for SPEC 0 updates? We've been inconsistent in https://www.pygmt.org/v0.13.0/changes.html:

  • SPEC 0: Bump minimum supported version to xarray 2022.09
  • SPEC 0: Set minimum supported versions to Python>=3.10, pandas>=1.5 and xarray>=2022.06
  • NEP29: Set minimum required version to NumPy 1.23+

I like the middle one using pandas>=1.5, but no strong opinions.

Sounds good

Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

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

Need to update doc/minversions.rst too.

No need to update this file after #3380.

Oh yes, old habits die hard. LGTM!

@seisman seisman merged commit ac10158 into main Sep 28, 2024
19 checks passed
@seisman seisman deleted the spec0/pandas branch September 28, 2024 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation Deprecating a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants