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

patch both xarray and erddapy for pandas 2.0 #426

Merged
merged 4 commits into from
Apr 5, 2023

Conversation

ocefpaf
Copy link
Member

@ocefpaf ocefpaf commented Apr 4, 2023

Checklist

  • Ran python show_diff.py and posted the output as part of the PR.
  • Modifications won't affect packages built in the future.
noarch::erddapy-0.6.0-py_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2",
noarch::erddapy-0.7.0-py_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2",
noarch::erddapy-0.7.1-py_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2",
noarch::erddapy-0.7.2-py_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2",
noarch::erddapy-0.8.0-pyhd8ed1ab_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2",
noarch::erddapy-0.9.0-pyhd8ed1ab_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2",
noarch::erddapy-1.0.0-pyhd8ed1ab_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2",
noarch::erddapy-1.1.0-pyhd8ed1ab_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2",
noarch::erddapy-1.1.1-pyhd8ed1ab_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2",
noarch::erddapy-1.2.0-pyhd8ed1ab_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2",
noarch::erddapy-1.2.1-pyhd8ed1ab_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2",
noarch::xarray-2022.10.0-pyhd8ed1ab_0.tar.bz2
-    "pandas >=1.3",
+    "pandas >=1.3,<2",
noarch::xarray-2022.11.0-pyhd8ed1ab_0.tar.bz2
-    "pandas >=1.3",
+    "pandas >=1.3,<2",
noarch::pmgr-2.1.2-pyhd8ed1ab_0.conda
-    "mysqlclient =1.3.12|>=2.0.3",
+    "mysqlclient ==1.3.12.*|>=2.0.3",
noarch::xarray-2022.12.0-pyhd8ed1ab_0.conda
-    "pandas >=1.3",
+    "pandas >=1.3,<2",
noarch::xarray-2023.1.0-pyhd8ed1ab_0.conda
-    "pandas >=1.3",
+    "pandas >=1.3,<2",

@ocefpaf ocefpaf requested a review from a team as a code owner April 4, 2023 15:29
@conda-forge-webservices
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@ocefpaf
Copy link
Member Author

ocefpaf commented Apr 4, 2023

@conda-forge/core this is ready for review! I'm not sure what is causing the diff in

noarch::pmgr-2.1.2-pyhd8ed1ab_0.conda
-    "mysqlclient =1.3.12|>=2.0.3",
+    "mysqlclient ==1.3.12.*|>=2.0.3",

Looks like some library used in the diff got updated and is "fixing/updating" the comparison there.

recipe/gen_patch_json.py Outdated Show resolved Hide resolved
@ocefpaf
Copy link
Member Author

ocefpaf commented Apr 4, 2023

Latest diff:

noarch::erddapy-0.6.0-py_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2",
noarch::erddapy-0.7.0-py_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2",
noarch::erddapy-0.7.1-py_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2",
noarch::erddapy-0.7.2-py_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2",
noarch::erddapy-0.8.0-pyhd8ed1ab_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2",
noarch::erddapy-0.9.0-pyhd8ed1ab_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2",
noarch::erddapy-1.0.0-pyhd8ed1ab_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2",
noarch::erddapy-1.1.0-pyhd8ed1ab_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2",
noarch::erddapy-1.1.1-pyhd8ed1ab_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2",
noarch::erddapy-1.2.0-pyhd8ed1ab_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2",
noarch::erddapy-1.2.1-pyhd8ed1ab_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2",
noarch::xarray-2022.10.0-pyhd8ed1ab_0.tar.bz2
-    "pandas >=1.3",
+    "pandas >=1.3,<2",
noarch::xarray-2022.11.0-pyhd8ed1ab_0.tar.bz2
-    "pandas >=1.3",
+    "pandas >=1.3,<2",
noarch::pmgr-2.1.2-pyhd8ed1ab_0.conda
-    "mysqlclient =1.3.12|>=2.0.3",
+    "mysqlclient ==1.3.12.*|>=2.0.3",
noarch::xarray-2022.12.0-pyhd8ed1ab_0.conda
-    "pandas >=1.3",
+    "pandas >=1.3,<2",
noarch::xarray-2023.1.0-pyhd8ed1ab_0.conda
-    "pandas >=1.3",
+    "pandas >=1.3,<2",
noarch::xarray-2023.2.0-pyhd8ed1ab_0.conda
-    "pandas >=1.4",
+    "pandas >=1.4,<2",

@dcherian
Copy link

dcherian commented Apr 4, 2023

LGTM. How do we decide how far back to go?

@ocefpaf
Copy link
Member Author

ocefpaf commented Apr 4, 2023

LGTM. How do we decide how far back to go?

This one will patch all that is less-equal 2023.1.0 and pandas is pinned with pandas >=1.3 .

        if record_name == "xarray" and packaging.version.Version(record["version"]) <= packaging.version.Version("2023.1.0"):
            _replace_pin("pandas >=1.3", "pandas >=1.3,<2", deps, record)

That is patching xarray-2022.10.0-pyhd8ed1ab_0, xarray-2022.11.0-pyhd8ed1ab_0, xarray-2022.12.0-pyhd8ed1ab_0, and 2023.1.0-pyhd8ed1ab_0. If we want to patch more we need to modify the pandas version we are matching. IMO, not worth it.

This one only patches xarray 2023.2.0.

        if record_name == "xarray" and packaging.version.Version(record["version"]) == packaging.version.Version("2023.2.0"):
            _replace_pin("pandas >=1.4", "pandas >=1.4,<2", deps, record)

@beckermr
Copy link
Member

beckermr commented Apr 4, 2023

Usually, upper bounds need to exclude prereleases. There are examples in the patches code of what those look like, usually ending in a0.

@ocefpaf
Copy link
Member Author

ocefpaf commented Apr 4, 2023

Usually, upper bounds need to exclude prereleases. There are examples in the patches code of what those look like, usually ending in a0.

@dcherian you don't publish xarray pre-releases, right? Is that something we need to worry about here?

@beckermr
Copy link
Member

beckermr commented Apr 4, 2023

I mean the pandas upper bound at <2, not xarray.

@dcherian
Copy link

dcherian commented Apr 4, 2023

you don't publish xarray pre-releases, right?

Not for the versions discussed here. The last one was 2022.06.0 IIRC

@ocefpaf
Copy link
Member Author

ocefpaf commented Apr 4, 2023

I mean the pandas upper bound at <2, not xarray.

I really hate the treatment pre/dev releases got in PyPI and what that forces us to do :-/

Latest diff:

noarch::erddapy-0.6.0-py_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2a0",
noarch::erddapy-0.7.0-py_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2a0",
noarch::erddapy-0.7.1-py_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2a0",
noarch::erddapy-0.7.2-py_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2a0",
noarch::erddapy-0.8.0-pyhd8ed1ab_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2a0",
noarch::erddapy-0.9.0-pyhd8ed1ab_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2a0",
noarch::erddapy-1.0.0-pyhd8ed1ab_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2a0",
noarch::erddapy-1.1.0-pyhd8ed1ab_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2a0",
noarch::erddapy-1.1.1-pyhd8ed1ab_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2a0",
noarch::erddapy-1.2.0-pyhd8ed1ab_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2a0",
noarch::erddapy-1.2.1-pyhd8ed1ab_0.tar.bz2
-    "pandas >=0.20.3",
+    "pandas >=0.20.3,<2a0",
noarch::xarray-2022.10.0-pyhd8ed1ab_0.tar.bz2
-    "pandas >=1.3",
+    "pandas >=1.3,<2a0",
noarch::xarray-2022.11.0-pyhd8ed1ab_0.tar.bz2
-    "pandas >=1.3",
+    "pandas >=1.3,<2a0",
noarch::pmgr-2.1.2-pyhd8ed1ab_0.conda
-    "mysqlclient =1.3.12|>=2.0.3",
+    "mysqlclient ==1.3.12.*|>=2.0.3",
noarch::xarray-2022.12.0-pyhd8ed1ab_0.conda
-    "pandas >=1.3",
+    "pandas >=1.3,<2a0",
noarch::xarray-2023.1.0-pyhd8ed1ab_0.conda
-    "pandas >=1.3",
+    "pandas >=1.3,<2a0",
noarch::xarray-2023.2.0-pyhd8ed1ab_0.conda
-    "pandas >=1.4",
+    "pandas >=1.4,<2a0",

Copy link
Member

@jaimergp jaimergp left a comment

Choose a reason for hiding this comment

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

LGTM. Maybe we can add timestamp checks too but for now let's fix the issue.

@jaimergp jaimergp merged commit 2f1df76 into conda-forge:main Apr 5, 2023
gmaze added a commit to euroargodev/argopy that referenced this pull request Apr 5, 2023
gmaze added a commit to euroargodev/argopy that referenced this pull request Apr 5, 2023
@ocefpaf ocefpaf deleted the patch_xarray_erddapy_4_pandas_2 branch April 5, 2023 09:17
@dcherian
Copy link

dcherian commented Apr 5, 2023

Thanks all!

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.

4 participants