﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
37455	Remove support for contrib.gis on 32-bit Windows.	David Smith	David Smith	"I propose to remove support for Windows 32-bit for GIS. In particular, the GDAL bindings for Win32 are more difficult to get correct than for Win64 and other OS's, GDAL 32-bit isn't readily available in 2026 and the Win32 bindings have not worked for some time. Let's remove them rather than try to fix them. The following gives my reasoning for this proposal specifically with regard to GDAL. If agreed, an audit should be conducted for other geospatial libraries and remove any Win32 support there as well.

Let's start with a bit of code – GeoDjango has specialised ctype bindings for GDAL on Win32. [1.]

{{{
def std_call(func):
   """"""
   Return the correct STDCALL function for certain OSR routines on Win32
   platforms.
   """"""
   if os.name == ""nt"":
       return lwingdal[func]
   else:
       return lgdal[func]

}}}

This is useful as GDAL sometimes declares functions with `CPL_STDCALL`. This helper function eases using those functions across different opearting systems. However, not all of GDAL's functions use `CPL_STDCALL`  [2.] and therefore to support Win32 we need to be careful about which function calls use the helper. Unfortunately, some of the bindings have not used the correct calling convention for some time. Currently, the test suite crashes with an issue introduced in 2023 in 08306bad57761b5eb176894649ac7d4e735c52dd. I have not checked if it worked before that change. 

How so, you may ask? Well, GDAL isn't widely built for 32-bit, and hasn't been for some time. osgeo4w is what the GIS tutorial recommends for Windows. The last release for GDAL in their archive for ‘x86’ is 3.1.4 fom Dec-2020 [3.]. Conda-forge is also useful for accessing pre-built binaries; from what I can see, Win32 was removed from there back in 2018 [4.]. 

On the Python side, Win32 is making up a smaller proportion of overall downloads, with less than 2% of Windows downloads being 32-bit as at the end of last year [5.]. The Django docs have been written assuming Python 64-bit since 2020 [6.]. Finally, other Python packages have started to drop Win32 support, e.g cryptography[7.].


[1.] https://github.com/django/django/blob/0e128d524d0a7c55a955570d6e5da983ac6ce6c7/django/contrib/gis/gdal/libgdal.py#L81-L89
[2.] https://github.com/OSGeo/gdal/blob/v3.9.0/ogr/ogr_srs_api.h#L577
[3.]https://download.osgeo.org/osgeo4w/v1/x86/release/gdal/
[4.] https://anaconda.org/channels/conda-forge/packages/gdal/files?file_q=win-32
[5.] https://discuss.python.org/t/consider-downgrading-windows-32-bit-from-tier-1-to-tier-2-or-tier-3-in-python-3-13/33719/69
[6.] https://github.com/django/django/pull/13045
[7.] https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst#4900---2026-06-12"	Uncategorized	assigned	GIS	6.1	Normal				Unreviewed	0	0	0	0	0	0
