From 0dbcfd91a59aefb2c40f7ebe8925e1bc29ab1ef0 Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Mon, 9 Sep 2019 17:45:46 -0600 Subject: [PATCH] Warning in compat that support for Python 2 is ending Resolves #1613 --- CHANGES.txt | 13 +++++++++++++ rasterio/__init__.py | 2 +- rasterio/compat.py | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 3789b56d..0eba945b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,19 @@ Changes ======= +1.1dev (TBD) +------------ + +Deprecations: + +- Support for Python 2 is deprecated and a warning is raised from the + rasterio.compat module. This module will be deleted in a future version. + +New features: + +- A new ``rasterio.transform.from_gcps()`` returns the Affine matrix that is a + best fit to given ground control points (#1749). + 1.0.28 (2019-09-09) ------------------- diff --git a/rasterio/__init__.py b/rasterio/__init__.py index 00ef99ba..1dabee08 100644 --- a/rasterio/__init__.py +++ b/rasterio/__init__.py @@ -42,7 +42,7 @@ import rasterio.path __all__ = ['band', 'open', 'pad', 'Env'] -__version__ = "1.0.28" +__version__ = "1.1dev" __gdal_version__ = gdal_version() # Rasterio attaches NullHandler to the 'rasterio' logger and its diff --git a/rasterio/compat.py b/rasterio/compat.py index 307366a1..8b89e31f 100644 --- a/rasterio/compat.py +++ b/rasterio/compat.py @@ -2,6 +2,7 @@ import itertools import sys +import warnings if sys.version_info[0] >= 3: # pragma: no cover @@ -15,6 +16,7 @@ if sys.version_info[0] >= 3: # pragma: no cover from collections.abc import Iterable, Mapping from inspect import getfullargspec as getargspec else: # pragma: no cover + warnings.warn("Python 2 compatibility will be removed after version 1.1", DeprecationWarning) string_types = basestring, text_type = unicode integer_types = int, long