From 89daa71f939769ce77876f84fd6e08824808d55d Mon Sep 17 00:00:00 2001 From: snowman2 Date: Sat, 23 Apr 2022 14:41:16 -0500 Subject: [PATCH] DEP: Minimum PROJ version 8.1 --- .github/workflows/tests.yaml | 13 ++++++------- docs/history.rst | 2 +- docs/index.rst | 2 +- docs/installation.rst | 1 + pyproj/_datadir.pyx | 15 --------------- setup.py | 2 +- 6 files changed, 10 insertions(+), 25 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 469442377..414844371 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -41,16 +41,15 @@ jobs: - os: ubuntu-latest python-version: 3.8 python-implementation: python - proj-version: 8.0 + proj-version: 8.1 - os: ubuntu-latest python-version: 3.8 python-implementation: python - proj-version: 8.1 - # disabled until pypy has 3.8+ version - # - os: ubuntu-latest - # python-version: '*' - # python-implementation: pypy - # proj-version: '*' + proj-version: 8.2 + - os: ubuntu-latest + python-version: '*' + python-implementation: pypy + proj-version: '*' steps: - uses: actions/checkout@v2 diff --git a/docs/history.rst b/docs/history.rst index c7a8441b9..b8510b09e 100644 --- a/docs/history.rst +++ b/docs/history.rst @@ -3,7 +3,7 @@ Change Log Latest ------- - +- DEP: Minimum PROJ version 8.1 (issue #1011) 3.3.1 ------- diff --git a/docs/index.rst b/docs/index.rst index 411c4a878..d815eb144 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -5,7 +5,7 @@ Python interface to `PROJ `_ (cartographic projections and c GitHub Repository: https://github.com/pyproj4/pyproj -.. note:: Minimum supported PROJ version is 8.0 +.. note:: Minimum supported PROJ version is 8.1 .. note:: Minimum supported Python version is 3.8 diff --git a/docs/installation.rst b/docs/installation.rst index 20ac37116..eb15e76ca 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -74,6 +74,7 @@ pyproj PROJ 3.0.0 7.2 3.0.1+ 7.2+ 3.3.0+ 8.0+ +3.4.0+ 8.1+ ============ ============ Setup PROJ diff --git a/pyproj/_datadir.pyx b/pyproj/_datadir.pyx index 0f379ec5a..c0c15eb35 100644 --- a/pyproj/_datadir.pyx +++ b/pyproj/_datadir.pyx @@ -21,19 +21,6 @@ _USE_GLOBAL_CONTEXT = strtobool(os.environ.get("PYPROJ_GLOBAL_CONTEXT", "OFF")) cdef const char* _USER_DATA_DIR = proj_context_get_user_writable_directory(NULL, False) -IF (CTE_PROJ_VERSION_MAJOR, CTE_PROJ_VERSION_MINOR) >= (8, 1): - cdef void proj_context_set_autoclose_database(PJ_CONTEXT *ctx, - int autoclose): - # THIS METHOD IS DEPRECATED IN PROJ 8.1 - # https://github.com/OSGeo/PROJ/pull/2738 - pass - -ELSE: - cdef extern from "proj.h": - void proj_context_set_autoclose_database(PJ_CONTEXT *ctx, - int autoclose) - - def set_use_global_context(active=None): """ .. versionadded:: 3.0.0 @@ -61,7 +48,6 @@ def set_use_global_context(active=None): if active is None: active = strtobool(os.environ.get("PYPROJ_GLOBAL_CONTEXT", "OFF")) _USE_GLOBAL_CONTEXT = bool(active) - proj_context_set_autoclose_database(PYPROJ_GLOBAL_CONTEXT, not _USE_GLOBAL_CONTEXT) def get_user_data_dir(create=False): @@ -142,7 +128,6 @@ cdef void pyproj_context_initialize(PJ_CONTEXT* context) except *: """ proj_log_func(context, NULL, pyproj_log_function) proj_context_use_proj4_init_rules(context, 1) - proj_context_set_autoclose_database(context, not _USE_GLOBAL_CONTEXT) set_context_data_dir(context) diff --git a/setup.py b/setup.py index 35f8fc0e0..d8c1872aa 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ from pkg_resources import parse_version from setuptools import Extension, setup -PROJ_MIN_VERSION = parse_version("8.0.0") +PROJ_MIN_VERSION = parse_version("8.1.0") CURRENT_FILE_PATH = Path(__file__).absolute().parent BASE_INTERNAL_PROJ_DIR = Path("proj_dir") INTERNAL_PROJ_DIR = CURRENT_FILE_PATH / "pyproj" / BASE_INTERNAL_PROJ_DIR