--
Ticket URL: <https://code.djangoproject.com/ticket/20036>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Is similar to #17212
--
Ticket URL: <https://code.djangoproject.com/ticket/20036#comment:1>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"747f7d25490abc3d7fdb119f0ce3708d450eb4c2"]:
{{{
#!CommitTicketReference repository=""
revision="747f7d25490abc3d7fdb119f0ce3708d450eb4c2"
Fixed #20036 -- Improved GEOS version string parsing
Thanks chikiro.spam at gmail.com for the report.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20036#comment:2>
Comment (by Claude Paroz <claude@…>):
In [changeset:"101ec4bf8aaf577c27ac9f11e52f4e604bc66c5a"]:
{{{
#!CommitTicketReference repository=""
revision="101ec4bf8aaf577c27ac9f11e52f4e604bc66c5a"
[1.5.x] Fixed #20036 -- Improved GEOS version string parsing
Thanks chikiro.spam at gmail.com for the report.
Backport of 747f7d254 from master.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20036#comment:3>
* component: Uncategorized => GIS
* type: Uncategorized => Bug
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/20036#comment:4>
Comment (by anonymous):
Replying to [comment:3 Claude Paroz <claude@…>]:
> In [changeset:"101ec4bf8aaf577c27ac9f11e52f4e604bc66c5a"]:
> {{{
> #!CommitTicketReference repository=""
revision="101ec4bf8aaf577c27ac9f11e52f4e604bc66c5a"
> [1.5.x] Fixed #20036 -- Improved GEOS version string parsing
can this be merged into 1.4 please?
--
Ticket URL: <https://code.djangoproject.com/ticket/20036#comment:5>
Comment (by claudep):
Sorry, but 1.4 is in security-fix only mode, no other fixes can go in.
--
Ticket URL: <https://code.djangoproject.com/ticket/20036#comment:6>
Comment (by pawciobiel@…):
Replying to [comment:6 claudep]:
> Sorry, but 1.4 is in security-fix only mode, no other fixes can go in.
AFAIK GEOS/GDAL has been updated due to vulnerability in one of their
libs. Not fixing this will force 1.4 users to:
a) patch it manually (forces keeping 1.4 fork)
b) upgrade to 1.5 (forces gis upgrade)
c) use older and buggy GEOS/GDAL which leave them open to security issues
Also this supposed to be fixed in 1.3 #17212
Leaving 1.4 intentionally not fixed just doesn't sound right to me.
--
Ticket URL: <https://code.djangoproject.com/ticket/20036#comment:7>
Comment (by claudep):
#21244 has ben marked as a duplicate.
--
Ticket URL: <https://code.djangoproject.com/ticket/20036#comment:8>
Comment (by anonymous):
I preferred not to patch django so i "patched" geos lib. If you want to
take this route, before doing brew install gdal, install geos using this
recipe
https://gist.github.com/fission6/7619954
--
Ticket URL: <https://code.djangoproject.com/ticket/20036#comment:9>
* cc: mmitar@… (added)
Comment:
+1 for 1.4.
--
Ticket URL: <https://code.djangoproject.com/ticket/20036#comment:10>
Comment (by anonymous):
Django 1.4.10
{{{
File "/Users/mau/.virtualenvs/newrunners/lib/python2.7/site-
packages/django/contrib/gis/geos/libgeos.py", line 115, in
geos_version_info
if not m: raise GEOSException('Could not parse version info string
"%s"' % ver)
django.contrib.gis.geos.error.GEOSException: Could not parse version info
string "3.4.2-CAPI-1.8.2 r3921"
}}}
Patched by change lingoes.py
from
{{{
# Regular expression should be able to parse version strings such as
# '3.0.0rc4-CAPI-1.3.3', '3.0.0-CAPI-1.4.1' or '3.4.0dev-CAPI-1.8.0'
version_regex =
re.compile(r'^(?P<version>(?P<major>\d+)\.(?P<minor>\d+)\.(?P<subminor>\d+))((rc(?P<release_candidate>\d+))|dev)?-CAPI-(?P<capi_version>\d+\.\d+\.\d+)$')
def geos_version_info():
}}}
to
{{{
# Regular expression should be able to parse version strings such as
# '3.0.0rc4-CAPI-1.3.3', '3.0.0-CAPI-1.4.1' or '3.4.0dev-CAPI-1.8.0'
version_regex =
re.compile(r'^(?P<version>(?P<major>\d+)\.(?P<minor>\d+)\.(?P<subminor>\d+))((rc(?P<release_candidate>\d+))|dev)?-CAPI-(?P<capi_version>\d+\.\d+\.\d+).*$')
def geos_version_info():
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20036#comment:11>
Comment (by JordanReiter):
Considering that Django 1.5 is now unsupported while 1.4.x is an LTS
version, would it make sense to look into adding this relatively minor
fix? Otherwise we are essentially requiring them to update not just one
version number but (at least) 2.
--
Ticket URL: <https://code.djangoproject.com/ticket/20036#comment:12>
Comment (by claudep):
I've changed my mind about this, and agree it is a big annoyance, I'll
backport the fix.
--
Ticket URL: <https://code.djangoproject.com/ticket/20036#comment:13>
Comment (by Claude Paroz <claude@…>):
In [changeset:"ba2be2761341a6b3d8d578f16c92fa278c0a42bc"]:
{{{
#!CommitTicketReference repository=""
revision="ba2be2761341a6b3d8d578f16c92fa278c0a42bc"
[1.4.x] Fixed #20036 -- Improved GEOS version string parsing
Thanks chikiro.spam at gmail.com for the report.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20036#comment:14>
Comment (by artscoop):
Still happens in probably every single version of Django from 1.6 at least
up to 1.11.4, in Arch where the version is `3.6.2-CAPI-1.10.2 4d2925d6`
The failure looks like this:
{{{
File "/run/media/artscoop/.../lib/python3.6/site-
packages/django/contrib/gis/geos/__init__.py", line 18, in <module>
HAS_GEOS = geos_version_info()['version'] >= '3.3.0'
File "/run/media/artscoop/.../lib/python3.6/site-
packages/django/contrib/gis/geos/libgeos.py", line 196, in
geos_version_info
raise GEOSException('Could not parse version info string "%s"' % ver)
django.contrib.gis.geos.error.GEOSException: Could not parse version info
string "3.6.2-CAPI-1.10.2 4d2925d6"
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20036#comment:15>
* status: closed => new
* resolution: fixed =>
--
Ticket URL: <https://code.djangoproject.com/ticket/20036#comment:16>
* status: new => closed
* resolution: => fixed
Comment:
Please avoid re-opening bugs closed for years.
This will be fixed in 1.11.5 which should be released this week. See
#28441.
--
Ticket URL: <https://code.djangoproject.com/ticket/20036#comment:17>