[Django] #28383: NumPoints should return None for any non-LINESTRING geometry on MySQL as documented

23 views
Skip to first unread message

Django

unread,
Jul 11, 2017, 1:37:34 AM7/11/17
to django-...@googlegroups.com
#28383: NumPoints should return None for any non-LINESTRING geometry on MySQL as
documented
------------------------------------------------+------------------------
Reporter: Sergey Fedoseev | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
[https://docs.djangoproject.com/en/dev/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.NumPoints
Documetation] says
> On MySQL, returns None for any non-LINESTRING geometry.

, but instead of that `TypeError` is raised. IMO we should not check input
type here because we can't do it reliably if the input is the output of
another GIS function and because wrong input type doesn't lead to some DB
level error.

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

Django

unread,
Jul 11, 2017, 1:37:57 AM7/11/17
to django-...@googlegroups.com
#28383: NumPoints should return None for any non-LINESTRING geometry on MySQL as
documented
-------------------------------------+-------------------------------------
Reporter: Sergey Fedoseev | Owner: Sergey
Type: | Fedoseev
Cleanup/optimization | Status: assigned
Component: GIS | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sergey Fedoseev):

* status: new => assigned
* owner: nobody => Sergey Fedoseev


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

Django

unread,
Jul 11, 2017, 1:47:37 AM7/11/17
to django-...@googlegroups.com
#28383: NumPoints should return None for any non-LINESTRING geometry on MySQL as
documented
-------------------------------------+-------------------------------------
Reporter: Sergey Fedoseev | Owner: Sergey
Type: | Fedoseev
Cleanup/optimization | Status: assigned
Component: GIS | Version: master
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 Sergey Fedoseev):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/8730 PR]

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

Django

unread,
Jul 11, 2017, 8:21:31 AM7/11/17
to django-...@googlegroups.com
#28383: NumPoints should return None for any non-LINESTRING geometry on MySQL as
documented
-------------------------------------+-------------------------------------
Reporter: Sergey Fedoseev | Owner: Sergey
Type: | Fedoseev
Cleanup/optimization | Status: closed
Component: GIS | Version: master
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 Tim Graham <timograham@…>):

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


Comment:

In [changeset:"306b961a4dc1fd308c6f298b406fb41906ebaf2d" 306b961]:
{{{
#!CommitTicketReference repository=""
revision="306b961a4dc1fd308c6f298b406fb41906ebaf2d"
Fixed #28383 -- Made NumPoints GIS function return None for non-LINESTRING
geometries on MySQL.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28383#comment:3>

Reply all
Reply to author
Forward
0 new messages