/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.
* 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>
* owner: nobody => Sergey Fedoseev
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/28794#comment:2>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/9352 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/28794#comment:3>
* type: Uncategorized => Cleanup/optimization
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/28794#comment:4>
* 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>
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>
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>
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>
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>
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>