Skip to content

Commit

Permalink
DEP: Minimum PROJ version 8.1 (#1065)
Browse files Browse the repository at this point in the history
  • Loading branch information
snowman2 committed Apr 23, 2022
1 parent dfb140d commit 54ad878
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 25 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Change Log

Latest
-------

- DEP: Minimum PROJ version 8.1 (issue #1011)

3.3.1
-------
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Python interface to `PROJ <https://proj.org/>`_ (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

Expand Down
1 change: 1 addition & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 0 additions & 15 deletions pyproj/_datadir.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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)


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 54ad878

Please sign in to comment.