[Django] #28794: @@tx_isolation is deprecated warning in django/db/backends/mysql/base.py:71

61 views
Skip to first unread message

Django

unread,
Nov 12, 2017, 11:26:28 PM11/12/17
to django-...@googlegroups.com
#28794: @@tx_isolation is deprecated warning in django/db/backends/mysql/base.py:71
-------------------------------------+-------------------------------------
Reporter: JC | Owner: nobody
Type: | Status: new
Uncategorized |
Component: Database | Version: 2.0
layer (models, ORM) |
Severity: Normal | Keywords: mysql
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Testing on ubuntu 17.10 and received this warning.

/site-packages/django/db/backends/mysql/base.py:71: Warning: (1287,
"'@@tx_isolation' is deprecated and will be removed in a future release.
Please use '@@transaction_isolation' instead")
return self.cursor.execute(query, args)

Error does not halt execution but thought I would report it.


Ubuntu = 17.10
Python 3.6.3
MySQL Server/libmysqlclient = 5.7.20
Django version = 2.0b1

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

Django

unread,
Nov 13, 2017, 8:24:08 AM11/13/17
to django-...@googlegroups.com
#28794: @@tx_isolation is deprecated warning in django/db/backends/mysql/base.py:71
-------------------------------------+-------------------------------------
Reporter: JC | Owner: nobody
Type: Uncategorized | Status: new
Component: Database layer | Version: 2.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: mysql | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

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

* stage: Unreviewed => Accepted


Comment:

There is some notes in MySQL docs: https://dev.mysql.com/doc/refman/5.7/en
/server-system-variables.html#sysvar_tx_isolation.

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

Django

unread,
Nov 13, 2017, 8:42:48 AM11/13/17
to django-...@googlegroups.com
#28794: @@tx_isolation is deprecated warning in django/db/backends/mysql/base.py:71
-------------------------------------+-------------------------------------
Reporter: JC | Owner: Sergey
| Fedoseev
Type: Uncategorized | Status: assigned

Component: Database layer | Version: 2.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: mysql | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

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

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


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

Django

unread,
Nov 14, 2017, 12:18:41 PM11/14/17
to django-...@googlegroups.com
#28794: @@tx_isolation is deprecated warning in django/db/backends/mysql/base.py:71
-------------------------------------+-------------------------------------
Reporter: JC | Owner: Sergey
| Fedoseev
Type: Uncategorized | Status: assigned
Component: Database layer | Version: 2.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: mysql | Triage Stage: Accepted
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/9352 PR]

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

Django

unread,
Nov 14, 2017, 1:05:35 PM11/14/17
to django-...@googlegroups.com
#28794: tx_isolation deprecation warning with MySQL 5.7.20+

-------------------------------------+-------------------------------------
Reporter: JC | Owner: Sergey
Type: | Fedoseev
Cleanup/optimization | Status: assigned

Component: Database layer | Version: 2.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: mysql | 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 Tim Graham):

* type: Uncategorized => Cleanup/optimization
* stage: Accepted => Ready for checkin


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

Django

unread,
Nov 14, 2017, 3:41:08 PM11/14/17
to django-...@googlegroups.com
#28794: tx_isolation deprecation warning with MySQL 5.7.20+
-------------------------------------+-------------------------------------
Reporter: JC | Owner: Sergey
Type: | Fedoseev
Cleanup/optimization | Status: closed

Component: Database layer | Version: 2.0
(models, ORM) |
Severity: Normal | Resolution: fixed

Keywords: mysql | 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 Tim Graham <timograham@…>):

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


Comment:

In [changeset:"967450a3bf940c43db891fe1e2ef3bcf73456ff8" 967450a3]:
{{{
#!CommitTicketReference repository=""
revision="967450a3bf940c43db891fe1e2ef3bcf73456ff8"
Fixed #28794 -- Fixed tx_isolation deprecation warning on MySQL 5.7.20+.
}}}

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

Django

unread,
Nov 14, 2017, 4:07:41 PM11/14/17
to django-...@googlegroups.com
#28794: tx_isolation deprecation warning with MySQL 5.7.20+
-------------------------------------+-------------------------------------
Reporter: JC | Owner: Sergey
Type: | Fedoseev
Cleanup/optimization | Status: closed
Component: Database layer | Version: 2.0
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: mysql | Triage Stage: Ready for
| checkin
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:"5638b77627a6b733fae5ab0dbf1b5c3425461d56" 5638b77]:
{{{
#!CommitTicketReference repository=""
revision="5638b77627a6b733fae5ab0dbf1b5c3425461d56"
[2.0.x] Fixed #28794 -- Fixed tx_isolation deprecation warning on MySQL
5.7.20+.

Backport of 967450a3bf940c43db891fe1e2ef3bcf73456ff8 from master
}}}

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

Django

unread,
Jan 31, 2018, 11:54:45 PM1/31/18
to django-...@googlegroups.com
#28794: tx_isolation deprecation warning with MySQL 5.7.20+
-------------------------------------+-------------------------------------
Reporter: JC | Owner: Sergey
Type: | Fedoseev
Cleanup/optimization | Status: closed
Component: Database layer | Version: 2.0
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: mysql | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by dwasyl):

The same error occurs in 1.11. Is there a chance of this patch being
further backported (doesn't seem to require any changes) to 1.11 and
included in the next patch release?

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

Django

unread,
Feb 1, 2018, 8:35:46 AM2/1/18
to django-...@googlegroups.com
#28794: tx_isolation deprecation warning with MySQL 5.7.20+
-------------------------------------+-------------------------------------
Reporter: JC | Owner: Sergey
Type: | Fedoseev
Cleanup/optimization | Status: closed
Component: Database layer | Version: 2.0
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: mysql | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

It doesn't qualify for a backport per our
[https://docs.djangoproject.com/en/dev/internals/release-process
/#supported-versions supported versions policy]. 1.11 only receives
security and data loss fixes.

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

Django

unread,
Feb 1, 2018, 9:15:35 PM2/1/18
to django-...@googlegroups.com
#28794: tx_isolation deprecation warning with MySQL 5.7.20+
-------------------------------------+-------------------------------------
Reporter: JC | Owner: Sergey
Type: | Fedoseev
Cleanup/optimization | Status: closed
Component: Database layer | Version: 2.0
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: mysql | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by David Wasylciw):

Replying to [comment:8 Tim Graham]:


> It doesn't qualify for a backport per our
[https://docs.djangoproject.com/en/dev/internals/release-process
/#supported-versions supported versions policy]. 1.11 only receives
security and data loss fixes.

Fair enough! Was just hoping that a patch would be a better way of
supressing the constant depreciation warnings, wish the MySQL backend had
the same silent depreciation warnings as everything else now has.

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

Django

unread,
Feb 1, 2018, 9:41:08 PM2/1/18
to django-...@googlegroups.com
#28794: tx_isolation deprecation warning with MySQL 5.7.20+
-------------------------------------+-------------------------------------
Reporter: JC | Owner: Sergey
Type: | Fedoseev
Cleanup/optimization | Status: closed
Component: Database layer | Version: 2.0
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: mysql | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

I think the warning comes from MySQL itself and it's passed on through
MySQLdb/mysqlclient. This may do the trick to suppress it:
{{{
from warnings import filterwarnings
import MySQLdb as Database
filterwarnings('ignore', category=Database.Warning)
}}}

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

Reply all
Reply to author
Forward
0 new messages