From d903879844bdb4a52bae4fb5758ffa352305463a Mon Sep 17 00:00:00 2001 From: snowman2 Date: Sun, 22 Aug 2021 19:30:14 -0500 Subject: [PATCH] BUG: Handle inheritable CRS changes in pyproj 3.2 --- lib/cartopy/crs.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/cartopy/crs.py b/lib/cartopy/crs.py index 40793827b..c5db4dbf3 100644 --- a/lib/cartopy/crs.py +++ b/lib/cartopy/crs.py @@ -25,6 +25,12 @@ import cartopy.trace +try: + # https://github.com/pyproj4/pyproj/pull/902 + from pyproj.crs.crs import _MakerCRS +except ImportError: + _MakerCRS = _CRS + __document_these__ = ['CRS', 'Geocentric', 'Geodetic', 'Globe'] @@ -143,7 +149,7 @@ def to_proj4_params(self): return OrderedDict((k, v) for k, v in proj4_params if v is not None) -class CRS(_CRS): +class CRS(_MakerCRS): """ Define a Coordinate Reference System using proj. """