From 7007c56ef0dcbcf330c232d2dcb5b6d56b426808 Mon Sep 17 00:00:00 2001 From: Henri Drake Date: Wed, 29 Jul 2026 22:45:33 -0700 Subject: [PATCH 1/3] Require regionmask >=0.13 `grid_conform.py` calls `regionmask.mask_geopandas`, added in regionmask 0.6. The dependency was unbounded in both `pyproject.toml` and `conda/meta.yaml`, so a resolver was free to select a pre-0.6 regionmask. conda-forge's solver did exactly that when building the feedstock: it picked regionmask 0.4.0 (2019), which ships no `mask_geopandas` at all, producing an environment that imports cleanly and then fails at mask time. Pin the floor at 0.13, the version the test suite is run against, rather than at the bare API minimum of 0.6. No upper bound -- a ceiling here would recreate the kind of stale cap that forces resolvers backwards. Co-Authored-By: Claude Opus 5 (1M context) --- conda/meta.yaml | 4 +++- pyproject.toml | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/conda/meta.yaml b/conda/meta.yaml index a8e3901..f1bd28c 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -29,7 +29,9 @@ requirements: - python >={{ python_min }} - pyproj - geopandas - - regionmask + # See the note in pyproject.toml: `mask_geopandas` requires regionmask 0.6+, + # and conda-forge still carries a 0.4.0 that an unpinned spec can select. + - regionmask >=0.13 - contourpy - sectionate >=0.3.3 diff --git a/pyproject.toml b/pyproject.toml index 4349bba..1154c7d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,12 @@ classifiers = [ dependencies = [ "pyproj", "geopandas", - "regionmask", + # `grid_conform.py` calls `regionmask.mask_geopandas`, which does not exist + # before regionmask 0.6. Left unbounded, a resolver under backtracking + # pressure can pick a pre-0.6 regionmask and the failure surfaces as an + # AttributeError at mask time rather than as a resolver error. 0.13 is the + # floor the test suite is actually run against. + "regionmask >= 0.13", "contourpy", "sectionate >= 0.3.4, < 0.4" ] From b6a5207d41de5851dbef03993a10a2088aed4f38 Mon Sep 17 00:00:00 2001 From: Henri Drake Date: Wed, 29 Jul 2026 22:59:32 -0700 Subject: [PATCH 2/3] Delete conda/meta.yaml --- conda/meta.yaml | 55 ------------------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 conda/meta.yaml diff --git a/conda/meta.yaml b/conda/meta.yaml deleted file mode 100644 index f1bd28c..0000000 --- a/conda/meta.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{% set name = "regionate" %} -{% set version = "0.5.5" %} -{% set python_min = "3.11" %} - -package: - name: {{ name|lower }} - version: {{ version }} - -source: - url: https://pypi.org/packages/source/r/regionate/regionate-{{ version }}.tar.gz - sha256: 1e7db126ee20b207a027bcd8c2e493cebe312f2b6202de7a1fb4a3d82c81a942 - -build: - noarch: python - number: 0 - script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation - -requirements: - host: - - python {{ python_min }} - - pip - - hatchling - # The build backend resolves the version through hatch-vcs. The build above - # is `--no-build-isolation`, so it has to be installed here or the wheel - # build fails outright; the sdist carries the generated `_version.py`, so - # git itself is not needed. - - hatch-vcs - run: - - python >={{ python_min }} - - pyproj - - geopandas - # See the note in pyproject.toml: `mask_geopandas` requires regionmask 0.6+, - # and conda-forge still carries a 0.4.0 that an unpinned spec can select. - - regionmask >=0.13 - - contourpy - - sectionate >=0.3.3 - -test: - requires: - - python {{ python_min }} - - pip - imports: - - regionate - commands: - - pip check - -about: - home: https://github.com/hdrake/regionate - summary: A package for creating xgcm-grid consistent regional masks and boundaries - license: GPL-3.0-only - license_file: LICENSE - -extra: - recipe-maintainers: - - hdrake From fcd2272e7c86038e241f3dbb6d02cdfbe221aa80 Mon Sep 17 00:00:00 2001 From: Henri Drake Date: Wed, 29 Jul 2026 23:00:11 -0700 Subject: [PATCH 3/3] Update pyproject.toml --- pyproject.toml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1154c7d..601d481 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,11 +15,6 @@ classifiers = [ dependencies = [ "pyproj", "geopandas", - # `grid_conform.py` calls `regionmask.mask_geopandas`, which does not exist - # before regionmask 0.6. Left unbounded, a resolver under backtracking - # pressure can pick a pre-0.6 regionmask and the failure surfaces as an - # AttributeError at mask time rather than as a resolver error. 0.13 is the - # floor the test suite is actually run against. "regionmask >= 0.13", "contourpy", "sectionate >= 0.3.4, < 0.4"