Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12491 closed Patch - Bug Fix (fixed)

Accessing myth database from python bindings throws an exception

Reported by: hobbes1069@… Owned by: Roger Siddons
Priority: minor Milestone: 0.28
Component: Bindings - Python Version: 0.27-fixes
Severity: medium Keywords:
Cc: Ticket locked: no

Description

I have a bugzilla ticket with the python bindings on Fedora 22. There is a fix listed in it but I would like to know if it's the correct way to fix the problem first.

https://bugzilla.rpmfusion.org/show_bug.cgi?id=3734

Attachments (1)

Fix-python-mysqldb-upstream-changes.patch (1.3 KB) - added by Roger Siddons <dizygotheca@…> 9 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 9 years ago by Roger Siddons <dizygotheca@…>

Dev list discussion http://www.gossamer-threads.com/lists/mythtv/dev/592151

This issue also affects Ubuntu 15.10.
Vivid (15.04) uses python-mysqldb 1.2.3.2 whereas Wily (15.10) uses 1.3.4-2

The bindings do appear to support 2 Python SQL libraries - mysqldb and oursql. This issue only concerns mysqldb, which changed upstream in 1.3.4
https://github.com/PyMySQL/mysqlclient-python/commit/382fb9f9b3453f579f7bb59af46f127405635945

For mysqldb, Fedora & Ubuntu package the same source, which was MySQLdb1 up to 1.2.3 and mysqlclient thereafter.

MySQLdb1 http://sourceforge.net/projects/mysql-python/ is a legacy project that's been dormant for 2 years. It doesn't support Python 3 and the maintainer cannot be contacted.

mysqlclient https://github.com/PyMySQL/mysqlclient-python is an active fork to support distributions moving to Python 3.

It appears they will likely be merged back together once the name ownership is resolved.
https://github.com/PyMySQL/mysqlclient-python/issues/44

Attached patch has been tested on Ubuntu 15.04 (python scripts still work) & 15.10 (fixes issue), so should fix all distros using python-mysqldb

Changed 9 years ago by Roger Siddons <dizygotheca@…>

comment:2 Changed 9 years ago by Karl Egly

Type: Bug Report - GeneralPatch - Bug Fix

comment:3 Changed 9 years ago by Stuart Auchterlonie

Milestone: unknown0.28
Owner: changed from Raymond Wagner to Roger Siddons
Status: newassigned

Roger,

Your patch fixes the issue with database access. I've tested this on Fedora 23.

I have a further issue with the hardware profiler, but that's a different issue.

Regards Stuart

comment:4 Changed 9 years ago by Stuart Auchterlonie <stuarta@…>

In dcd42102b88fbd3469d6203457fcc649b0e5cdbd/mythtv:

Fixes #12562 Gather memory information on kernel 4.x

Refs #12491 - Requires the DB accessor fix.

comment:5 Changed 9 years ago by Stuart Auchterlonie <stuarta@…>

In 74a7dc8e3414d5cd5fa2f9370e378252e17a9602/mythtv:

Fixes #12562 Gather memory information on kernel 4.x

Refs #12491 - Requires the DB accessor fix.

(cherry picked from commit dcd42102b88fbd3469d6203457fcc649b0e5cdbd)

comment:6 Changed 9 years ago by Roger Siddons <dizygotheca@…>

Resolution: fixed
Status: assignedclosed

In eb622a4b71943ce16d2fb7623cbabccd863172c4/mythtv:

Fix python mysqldb upstream changes

mysqlclient-python 1.3.4 changed cursor connection from weakref proxy to a ref

Fixes #12491

comment:7 Changed 9 years ago by Roger Siddons <dizygotheca@…>

In caccfc87cd5f7f2f4c1dff34a9c428f874eb7922/mythtv:

Fixes #12491. Fix python mysqldb upstream changes

mysqlclient-python 1.3.4 changed cursor connection from weakref proxy to a ref

Fixes #12491

Note: See TracTickets for help on using tickets.