mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
[1.11.x] Fixed #28441 -- Fixed GEOS version parsing with a commit hash at the end.
A less invasive backport of 78c155cf2e5a27fd2db18c2d46953b1b0fdba829 from master
This commit is contained in:
parent
2ec74bfcac
commit
a49764dd9d
@ -179,7 +179,7 @@ geos_version = GEOSFuncFactory('GEOSversion', restype=c_char_p)
|
|||||||
# '3.0.0rc4-CAPI-1.3.3', '3.0.0-CAPI-1.4.1', '3.4.0dev-CAPI-1.8.0' or '3.4.0dev-CAPI-1.8.0 r0'
|
# '3.0.0rc4-CAPI-1.3.3', '3.0.0-CAPI-1.4.1', '3.4.0dev-CAPI-1.8.0' or '3.4.0dev-CAPI-1.8.0 r0'
|
||||||
version_regex = re.compile(
|
version_regex = re.compile(
|
||||||
r'^(?P<version>(?P<major>\d+)\.(?P<minor>\d+)\.(?P<subminor>\d+))'
|
r'^(?P<version>(?P<major>\d+)\.(?P<minor>\d+)\.(?P<subminor>\d+))'
|
||||||
r'((rc(?P<release_candidate>\d+))|dev)?-CAPI-(?P<capi_version>\d+\.\d+\.\d+)( r\d+)?$'
|
r'((rc(?P<release_candidate>\d+))|dev)?-CAPI-(?P<capi_version>\d+\.\d+\.\d+)( r\d+)?( \w+)?$'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,4 +9,5 @@ Django 1.11.5 fixes several bugs in 1.11.4.
|
|||||||
Bugfixes
|
Bugfixes
|
||||||
========
|
========
|
||||||
|
|
||||||
* ...
|
* Fixed GEOS version parsing if the version has a commit hash at the end (new
|
||||||
|
in GEOS 3.6.2) (:ticket:`28441`).
|
||||||
|
@ -1278,7 +1278,8 @@ class GEOSTest(SimpleTestCase, TestDataMixin):
|
|||||||
versions = [('3.0.0rc4-CAPI-1.3.3', '3.0.0', '1.3.3'),
|
versions = [('3.0.0rc4-CAPI-1.3.3', '3.0.0', '1.3.3'),
|
||||||
('3.0.0-CAPI-1.4.1', '3.0.0', '1.4.1'),
|
('3.0.0-CAPI-1.4.1', '3.0.0', '1.4.1'),
|
||||||
('3.4.0dev-CAPI-1.8.0', '3.4.0', '1.8.0'),
|
('3.4.0dev-CAPI-1.8.0', '3.4.0', '1.8.0'),
|
||||||
('3.4.0dev-CAPI-1.8.0 r0', '3.4.0', '1.8.0')]
|
('3.4.0dev-CAPI-1.8.0 r0', '3.4.0', '1.8.0'),
|
||||||
|
('3.6.2-CAPI-1.10.2 4d2925d6', '3.6.2', '1.10.2')]
|
||||||
for v_init, v_geos, v_capi in versions:
|
for v_init, v_geos, v_capi in versions:
|
||||||
m = version_regex.match(v_init)
|
m = version_regex.match(v_init)
|
||||||
self.assertTrue(m, msg="Unable to parse the version string '%s'" % v_init)
|
self.assertTrue(m, msg="Unable to parse the version string '%s'" % v_init)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user