From 667d897a934e9bdfd83a4461f4d3b3c11925d4ea Mon Sep 17 00:00:00 2001 From: mohr Date: Mon, 5 Nov 2018 15:10:50 +0100 Subject: [PATCH] Change mysql python package dependency to PyMySQL --- Fred2/IO/MartsAdapter.py | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Fred2/IO/MartsAdapter.py b/Fred2/IO/MartsAdapter.py index 4feaec81..6248f818 100755 --- a/Fred2/IO/MartsAdapter.py +++ b/Fred2/IO/MartsAdapter.py @@ -11,7 +11,7 @@ import urllib2 import warnings import logging -import MySQLdb +import pymysql.cursors from operator import itemgetter from Fred2.IO.ADBAdapter import ADBAdapter, EAdapterFields, EIdentifierTypes @@ -32,7 +32,7 @@ def __init__(self, usr=None, host=None, pwd=None, db=None, biomart=None): self.sequence_proxy = dict() if usr and host and pwd and db: - self.connection = MySQLdb.connect(user=usr, host=host, passwd=pwd, db=db) + self.connection = pymysql.connect(user=usr, host=host, password=pwd, db=db) else: self.connection = None diff --git a/setup.py b/setup.py index 3d33675a..16752141 100644 --- a/setup.py +++ b/setup.py @@ -120,6 +120,6 @@ #ext_modules=[d2s_module], # Run-time dependencies. (will be installed by pip when FRED2 is installed) - install_requires=['setuptools>=18.2', 'pandas', 'pyomo>=4.0','svmlight', 'MySQL-python >= 1.2.4', 'biopython', 'pyVCF'], + install_requires=['setuptools>=18.2', 'pandas', 'pyomo>=4.0','svmlight', 'PyMySQL', 'biopython', 'pyVCF'], )