[Django] #26134: Update MySQL GIS function names to OpenGIS standard.

59 views
Skip to first unread message

Django

unread,
Jan 25, 2016, 7:32:12 AM1/25/16
to django-...@googlegroups.com
#26134: Update MySQL GIS function names to OpenGIS standard.
-------------------------------+--------------------
Reporter: fmalina | Owner: nobody
Type: Uncategorized | Status: new
Component: GIS | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------
Fix MySQL deprecation warnings such as:
.../django/db/backends/mysql/base.py:112:
Warning: 'GEOMFROMTEXT' is deprecated and will be removed in a future
release. Please use ST_GEOMFROMTEXT instead
...
Warning: 'ASTEXT' is deprecated and will be removed in a future release.
Please use ST_ASTEXT instead

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

Django

unread,
Jan 25, 2016, 7:33:46 AM1/25/16
to django-...@googlegroups.com
#26134: Update MySQL GIS function names to OpenGIS standard.
-------------------------------+--------------------------------------

Reporter: fmalina | Owner: nobody
Type: Uncategorized | Status: new
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: 1 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by fmalina):

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


Comment:

PR https://github.com/django/django/pull/6038

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

Django

unread,
Jan 25, 2016, 8:10:49 AM1/25/16
to django-...@googlegroups.com
#26134: Update MySQL GIS function names to OpenGIS standard.
--------------------------------------+------------------------------------
Reporter: fmalina | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):

* has_patch: 0 => 1
* type: Uncategorized => Cleanup/optimization
* easy: 1 => 0
* stage: Unreviewed => Accepted


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

Django

unread,
Jan 25, 2016, 9:22:59 AM1/25/16
to django-...@googlegroups.com
#26134: Update MySQL GIS function names to OpenGIS standard.
--------------------------------------+------------------------------------
Reporter: fmalina | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by timgraham):

As noted on the pull request, "The new GIS aliases exist from MySQL 5.6."
While MySQL 5.5 doesn't reach end-of-life until Dec 2018, it might be okay
to drop GIS support for MySQL 5.5 now -- especially because we're not
testing that combination now. Any other opinions? Should we write to the
[https://groups.google.com/forum/#!forum/geodjango geodjango mailing list]
about it?

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

Django

unread,
Jan 25, 2016, 2:07:56 PM1/25/16
to django-...@googlegroups.com
#26134: Update MySQL GIS function names to OpenGIS standard.
--------------------------------------+------------------------------------
Reporter: fmalina | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

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

* needs_better_patch: 0 => 1


Comment:

A strong -1 from me to drop MySQL GIS for 5.5. Debian stable still has
MySQL 5.5.
It might be possible to define the names as properties and set the value
depending on the MySQL version.

--
Ticket URL: <https://code.djangoproject.com/ticket/26134#comment:4>

Django

unread,
Jan 25, 2016, 4:13:48 PM1/25/16
to django-...@googlegroups.com
#26134: Update MySQL GIS function names to OpenGIS standard.
--------------------------------------+------------------------------------
Reporter: fmalina | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by fmalina):

That's backwards.

--
Ticket URL: <https://code.djangoproject.com/ticket/26134#comment:5>

Django

unread,
Jan 25, 2016, 6:44:29 PM1/25/16
to django-...@googlegroups.com
#26134: Update MySQL GIS function names to OpenGIS standard.
--------------------------------------+------------------------------------
Reporter: fmalina | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by timgraham):

I don't understand that last comment. Claude's proposal makes sense to me.

Alternatively, we wait until we can drop support for MySQL 5.5 -- as long
as we don't have to support any new versions of MySQL that drop support
for the old aliases -- and live with those warnings for now.

--
Ticket URL: <https://code.djangoproject.com/ticket/26134#comment:6>

Django

unread,
Jan 28, 2016, 6:11:11 AM1/28/16
to django-...@googlegroups.com
#26134: Update MySQL GIS function names to OpenGIS standard.
--------------------------------------+------------------------------------
Reporter: fmalina | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by fmalina):

Linking the file in question:
https://github.com/django/django/blob/master/django/contrib/gis/db/backends/mysql/operations.py

There is already code checking self.connection.mysql_version. I see how
@cached_property could be used to set value depending on MySQL version,
but I don't have any need to support MySQL 5.5 myself and wouldn't want to
encrust the code in barnacles.

--
Ticket URL: <https://code.djangoproject.com/ticket/26134#comment:7>

Django

unread,
Jan 29, 2016, 5:56:21 PM1/29/16
to django-...@googlegroups.com
#26134: Update MySQL GIS function names to OpenGIS standard.
-------------------------------------+-------------------------------------
Reporter: fmalina | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin


Comment:

[https://github.com/django/django/pull/6065 PR] from Claude looks good.

--
Ticket URL: <https://code.djangoproject.com/ticket/26134#comment:8>

Django

unread,
Jan 29, 2016, 5:58:49 PM1/29/16
to django-...@googlegroups.com
#26134: Update MySQL GIS function names to OpenGIS standard.
-------------------------------------+-------------------------------------
Reporter: fmalina | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: GIS | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
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:"c47364ef0c368c9a0257dba68534d8781019cee4" c47364ef]:
{{{
#!CommitTicketReference repository=""
revision="c47364ef0c368c9a0257dba68534d8781019cee4"
Fixed #26134 -- Used new OpenGIS names for recent MySQL

Thanks František Malina for the report.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26134#comment:9>

Django

unread,
May 23, 2016, 12:13:41 PM5/23/16
to django-...@googlegroups.com
#26134: Update MySQL GIS function names to OpenGIS standard.
-------------------------------------+-------------------------------------
Reporter: fmalina | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: GIS | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* status: closed => new
* has_patch: 1 => 0
* resolution: fixed =>


Comment:

I think this isn't complete. I still see warnings such as:

* 'NUMPOINTS' is deprecated and will be removed in a future release.
Please use ST_NUMPOINTS instead
* 'NUMGEOMETRIES' is deprecated and will be removed in a future release.
Please use ST_NUMGEOMETRIES instead
* 'ENVELOPE' is deprecated and will be removed in a future release. Please
use ST_ENVELOPE instead
* 'CENTROID' is deprecated and will be removed in a future release. Please
use ST_CENTROID instead
* 'AREA' is deprecated and will be removed in a future release. Please use
ST_AREA instead

This might not be a complete list of what needs to be fixed.

--
Ticket URL: <https://code.djangoproject.com/ticket/26134#comment:10>

Django

unread,
May 24, 2016, 11:00:29 AM5/24/16
to django-...@googlegroups.com
#26134: Update MySQL GIS function names to OpenGIS standard.
--------------------------------------+------------------------------------
Reporter: fmalina | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):

* has_patch: 0 => 1

* stage: Ready for checkin => Accepted


Comment:

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

--
Ticket URL: <https://code.djangoproject.com/ticket/26134#comment:11>

Django

unread,
May 24, 2016, 9:50:28 PM5/24/16
to django-...@googlegroups.com
#26134: Update MySQL GIS function names to OpenGIS standard.
--------------------------------------+------------------------------------
Reporter: fmalina | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"92f88206d0e05e9e833e6cd49f93cbd7b72b30ff" 92f8820]:
{{{
#!CommitTicketReference repository=""
revision="92f88206d0e05e9e833e6cd49f93cbd7b72b30ff"
Refs #26134 -- Updated deprecated MySQL GIS function names.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26134#comment:12>

Django

unread,
May 24, 2016, 9:55:20 PM5/24/16
to django-...@googlegroups.com
#26134: Update MySQL GIS function names to OpenGIS standard.
--------------------------------------+------------------------------------
Reporter: fmalina | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"734e21786c31286dce30e42b26e62dcd47fb2c21" 734e2178]:
{{{
#!CommitTicketReference repository=""
revision="734e21786c31286dce30e42b26e62dcd47fb2c21"
[1.10.x] Refs #26134 -- Updated deprecated MySQL GIS function names.

Backport of 92f88206d0e05e9e833e6cd49f93cbd7b72b30ff from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26134#comment:13>

Django

unread,
May 27, 2016, 5:34:08 PM5/27/16
to django-...@googlegroups.com
#26134: Update MySQL GIS function names to OpenGIS standard.
--------------------------------------+------------------------------------
Reporter: fmalina | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: fixed

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

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


--
Ticket URL: <https://code.djangoproject.com/ticket/26134#comment:14>

Django

unread,
Jun 16, 2016, 8:30:32 PM6/16/16
to django-...@googlegroups.com
#26134: Update MySQL GIS function names to OpenGIS standard.
--------------------------------------+------------------------------------
Reporter: fmalina | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: GIS | Version: master

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"9c3fbf5423367cdcf1a30a411793919d86f5288c" 9c3fbf5]:
{{{
#!CommitTicketReference repository=""
revision="9c3fbf5423367cdcf1a30a411793919d86f5288c"
Used SQL from DB backend in GeomValue.

This avoids the deprecated GeomFromText on MySQL (refs #26134).

Thanks Claude Paroz for the review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26134#comment:15>

Django

unread,
Jun 16, 2016, 9:03:16 PM6/16/16
to django-...@googlegroups.com
#26134: Update MySQL GIS function names to OpenGIS standard.
--------------------------------------+------------------------------------
Reporter: fmalina | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: GIS | Version: master

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"f94f4db0a3fe4844c99759102de8191d413dae1d" f94f4db0]:
{{{
#!CommitTicketReference repository=""
revision="f94f4db0a3fe4844c99759102de8191d413dae1d"
[1.10.x] Used SQL from DB backend in GeomValue.

This avoids the deprecated GeomFromText on MySQL (refs #26134).

Thanks Claude Paroz for the review.

Backport of 9c3fbf5423367cdcf1a30a411793919d86f5288c from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26134#comment:16>

Reply all
Reply to author
Forward
0 new messages