[Django] #25580: GEOSGeometry.srid cannot be set to None

7 views
Skip to first unread message

Django

unread,
Oct 21, 2015, 1:20:30 AM10/21/15
to django-...@googlegroups.com
#25580: GEOSGeometry.srid cannot be set to None
----------------------------+--------------------
Reporter: sir-sigurd | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------
{{{
In [1]: from django.contrib.gis.geos import Point

In [2]: p = Point(1, 1)

In [3]: p.srid is None
Out[3]: True

In [4]: p.srid = p.srid
---------------------------------------------------------------------------
ArgumentError Traceback (most recent call
last)
<ipython-input-4-3612b78cc827> in <module>()
----> 1 p.srid = p.srid

/home/sergey/dev/django/django/contrib/gis/geos/geometry.py in
set_srid(self, srid)
367 def set_srid(self, srid):
368 "Sets the SRID for the geometry."
--> 369 capi.geos_set_srid(self.ptr, srid)
370 srid = property(get_srid, set_srid)
371

/home/sergey/dev/django/django/contrib/gis/geos/libgeos.pyc in
__call__(self, *args, **kwargs)
155 if self.func is None:
156 self.func = self.get_func(*self.args, **self.kwargs)
--> 157 return self.func(*args, **kwargs)
158
159 def get_func(self, *args, **kwargs):

/home/sergey/dev/django/django/contrib/gis/geos/prototypes/threadsafe.pyc
in __call__(self, *args)
54 # Call the threaded GEOS routine with pointer of the
context handle
55 # as the first argument.
---> 56 return self.cfunc(self.thread_context.handle.ptr,
*args)
57 else:
58 return self.cfunc(*args)

ArgumentError: argument 3: <type 'exceptions.TypeError'>: wrong type
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25580>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 21, 2015, 1:24:41 AM10/21/15
to django-...@googlegroups.com
#25580: GEOSGeometry.srid cannot be set to None
----------------------------+--------------------------------------

Reporter: sir-sigurd | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------------------------
Changes (by sir-sigurd):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

added PR https://github.com/django/django/pull/5455

--
Ticket URL: <https://code.djangoproject.com/ticket/25580#comment:1>

Django

unread,
Oct 21, 2015, 3:37:11 AM10/21/15
to django-...@googlegroups.com
#25580: GEOSGeometry.srid cannot be set to None
----------------------------+--------------------------------------
Reporter: sir-sigurd | Owner: nobody
Type: Bug | Status: closed
Component: GIS | Version: 1.8
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Unreviewed

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------------------------
Changes (by Claude Paroz <claude@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"a272db70085887209946f28c9407409bfc0c7ee1" a272db7]:
{{{
#!CommitTicketReference repository=""
revision="a272db70085887209946f28c9407409bfc0c7ee1"
Fixed #25580 -- Allowed `None` to be set as SRID value.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25580#comment:2>

Reply all
Reply to author
Forward
0 new messages