Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 610002 - Allow migration from mysql-python to mysqlclient
Summary: Allow migration from mysql-python to mysqlclient
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-19 10:44 UTC by Hanno Böck
Modified: 2020-09-26 13:41 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hanno Böck gentoo-dev 2017-02-19 10:44:22 UTC
It seems development on mysql-python has stalled, but mysqlclient is a fork which can be used as a drop-in replacement. mysql-python is python2-only, while mysqlclient can be used in both python2/3. mysql-pyhton and mysqlclient block each other and can't be installed in parallel.

There are many packages in the tree that depend on mysql-python, therefore moving from mysql-python to mysqlclient is currently impractical for most users.

Therefore probably all packages depending on mysql-python should change their dependencies to something like "|| ( dev-python/mysqlclient dev-python/mysql-python )". How can we proceed on that?
Comment 1 Hanno Böck gentoo-dev 2017-02-19 10:49:13 UTC
Packages that depend on mysql-python and don't allow mysqlclient:
app-admin/diamond
app-admin/glance
app-admin/salt
app-backup/holland-lib-mysql
app-text/bibus
dev-db/percona-server
dev-db/SchemaSync
dev-python/adodb-py
dev-python/atpy
dev-python/django
dev-python/oslo-db
dev-python/pSQL
dev-python/python-openid
dev-python/pyzor
dev-python/rdflib
dev-python/sqlalchemy
dev-python/sqlobject
dev-python/storm
dev-vcs/mercurial
media-plugins/mythplugins
media-tv/mythtv
net-print/pykota
sys-auth/keystone
sys-cluster/cinder
sys-cluster/neutron
sys-cluster/nova
www-apps/trac
www-apps/viewvc

There are currently two packages with an existing || dependency on mysql-python and mysqlclient:
net-analyzer/graphite-web
net-analyzer/netdata
Comment 2 David Seifert gentoo-dev 2017-02-19 11:12:05 UTC
(In reply to Hanno Boeck from comment #0)
> It seems development on mysql-python has stalled, but mysqlclient is a fork
> which can be used as a drop-in replacement. mysql-python is python2-only,
> while mysqlclient can be used in both python2/3. mysql-pyhton and
> mysqlclient block each other and can't be installed in parallel.
> 
> There are many packages in the tree that depend on mysql-python, therefore
> moving from mysql-python to mysqlclient is currently impractical for most
> users.
> 
> Therefore probably all packages depending on mysql-python should change
> their dependencies to something like "|| ( dev-python/mysqlclient
> dev-python/mysql-python )". How can we proceed on that?

I would suggest a virtual, as this is general less messy and hides the || ( ) ugliness. Furthermore, it is less prone to getting the order in || ( ) specifiers wrong.
Comment 3 Zhixu Liu 2019-04-07 03:35:47 UTC
Any progress on this thread? As more and more apps are moving to python3, it's better to implement this ASAP, thanks.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-04-07 06:17:43 UTC
If mysqlclient is really a drop-in replacement, I'd rather not waste time on virtuals.  What we really need is keywording and stabilization of mysqlclient, and working tests would be really helpful with that.
Comment 5 Zhixu Liu 2019-04-08 08:51:45 UTC
(In reply to Michał Górny from comment #4)
> If mysqlclient is really a drop-in replacement, I'd rather not waste time on
> virtuals.  What we really need is keywording and stabilization of
> mysqlclient, and working tests would be really helpful with that.

mysqlclient is already in stable state. We're using trac, after replace mysql-python by mysqlclient, and no problem found until now.
Comment 6 Linear Systems Tech Svcs. 2019-04-16 20:21:19 UTC
(In reply to Zhixu Liu from comment #5)
> (In reply to Michał Górny from comment #4)
> > If mysqlclient is really a drop-in replacement, I'd rather not waste time on
> > virtuals.  What we really need is keywording and stabilization of
> > mysqlclient, and working tests would be really helpful with that.
> 
> mysqlclient is already in stable state. We're using trac, after replace
> mysql-python by mysqlclient, and no problem found until now.

Problem found:

 ~ # emerge -pv =dev-python/rdflib-4.2.2 

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] dev-python/mysql-python-1.2.5-r1::gentoo  USE="-doc" PYTHON_TARGETS="python2_7 (-pypy)" 0 KiB
[ebuild   R    ] dev-python/rdflib-4.2.2::gentoo  USE="berkdb mysql -doc -examples -redland -sqlite -test" PYTHON_TARGETS="python2_7 python3_5 python3_6 (-python3_4%*)" 0 KiB
[blocks B      ] dev-python/mysql-python ("dev-python/mysql-python" is blocking dev-python/mysqlclient-1.4.2-r2)

Total: 2 packages (1 new, 1 reinstall), Size of downloads: 0 KiB
Conflict: 1 block (1 unsatisfied)

 * Error: The above package list contains packages which cannot be
 * installed at the same time on the same system.

  (dev-python/mysql-python-1.2.5-r1:0/0::gentoo, ebuild scheduled for merge) pulled in by
    dev-python/mysql-python[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] (dev-python/mysql-python[python_targets_python2_7(-),-python_single_target_python2_7(-)]) required by (dev-python/rdflib-4.2.2:0/0::gentoo, ebuild scheduled for merge)

  (dev-python/mysqlclient-1.4.2-r2:0/0::gentoo, installed) pulled in by
    dev-python/mysqlclient required by @selected


And, I do find it ironic that rdflib says it supports python3_[4,5,6] but it's dependency only supports python2_7.
Comment 7 Zhixu Liu 2019-05-16 00:47:44 UTC
(In reply to Linear Systems Tech Svcs. from comment #6)
> (In reply to Zhixu Liu from comment #5)
> > (In reply to Michał Górny from comment #4)
> > > If mysqlclient is really a drop-in replacement, I'd rather not waste time on
> > > virtuals.  What we really need is keywording and stabilization of
> > > mysqlclient, and working tests would be really helpful with that.
> > 
> > mysqlclient is already in stable state. We're using trac, after replace
> > mysql-python by mysqlclient, and no problem found until now.
> 
> Problem found:
> 
>  ~ # emerge -pv =dev-python/rdflib-4.2.2 
> 

sed -i 's/mysql-python/mysqlclient/g' ...ebuild
ebuild ...ebuild digest

then run emerge again. This is the solution I'm using. It's really nice to replace mysql-python by mysqlclient in portage officially.
Comment 8 Thomas Deutschmann (RETIRED) gentoo-dev 2019-08-23 20:03:59 UTC
Would be nice if we could make some progress: dev-python/mysql-python won't work with >=virtual/libmysqlclient-21 anymore (bug 632578). However, dev-python/mysqlclient isn't keyworded on all arches yet (looking at you, alpha), so we cannot just replace mysql-python with mysqlclient yet.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-09-26 13:41:56 UTC
The only two deps on mysql-python left are in old percona-server and optfeature in sqlalchemy (that might be outdated).