From b37be072a27f3d4aaf22342a17afd0c24518ff8b Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Fri, 27 Nov 2020 18:58:28 +0100 Subject: Fixed #32230 -- Made DataSource support pathlib.Path. --- docs/ref/contrib/gis/gdal.txt | 4 ++++ docs/ref/contrib/gis/tutorial.txt | 2 +- docs/releases/3.2.txt | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/ref/contrib/gis/gdal.txt b/docs/ref/contrib/gis/gdal.txt index aa7e2a7eb8..35abec1168 100644 --- a/docs/ref/contrib/gis/gdal.txt +++ b/docs/ref/contrib/gis/gdal.txt @@ -92,6 +92,10 @@ each feature in that layer. Returns the name of the data source. + .. versionchanged:: 3.2 + + Support for :class:`pathlib.Path` ``ds_input`` was added. + __ https://gdal.org/drivers/vector/ ``Layer`` diff --git a/docs/ref/contrib/gis/tutorial.txt b/docs/ref/contrib/gis/tutorial.txt index 2f80a18e47..c585dd9248 100644 --- a/docs/ref/contrib/gis/tutorial.txt +++ b/docs/ref/contrib/gis/tutorial.txt @@ -331,7 +331,7 @@ Now, open the world borders shapefile using GeoDjango's :class:`~django.contrib.gis.gdal.DataSource` interface:: >>> from django.contrib.gis.gdal import DataSource - >>> ds = DataSource(str(world_shp)) + >>> ds = DataSource(world_shp) >>> print(ds) / ... /geodjango/world/data/TM_WORLD_BORDERS-0.3.shp (ESRI Shapefile) diff --git a/docs/releases/3.2.txt b/docs/releases/3.2.txt index 1209b357e2..206609422d 100644 --- a/docs/releases/3.2.txt +++ b/docs/releases/3.2.txt @@ -114,6 +114,9 @@ Minor features * The :meth:`.GDALRaster.transform` method now supports :class:`~django.contrib.gis.gdal.SpatialReference`. +* The :class:`~django.contrib.gis.gdal.DataSource` class now supports + :class:`pathlib.Path`. + :mod:`django.contrib.messages` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.3