Created
December 2, 2019 14:53
-
-
Save jams2/11a60020a1ada897d79fc4c77fb587eb to your computer and use it in GitHub Desktop.
Revisions
-
jams2 created this gist
Dec 2, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ """The version regex in django/contrib/gis/geos/libgeos.py fails on the latest homebrew geos install at time of writing, with message: django.contrib.gis.geos.error.GEOSException: Could not parse version info string "3.8.0-CAPI-1.13.1 " The trailing whitespace is the culprit. Add a r'\s?$' to the end of the pattern. """ version_regex = re.compile( 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+)?( \w+)?\s?$' )