What are the differences between mysql-connector-python, mysql-connector-python-rf and mysql-connector-repackaged?
Asked Answered
A

4

34

I'd like to use the mysql-connector library for python 3. I could use pymysql instead, but mysql-connector already has a connection pool implementation, while pymysql doesn't seem to have one. So this would be less code for me to write.

However, when I do

$ pip3 search mysql-connector

I find that these 3 libraries are available:

mysql-connector-repackaged     - MySQL driver written in Python
mysql-connector-python-rf      - MySQL driver written in Python
mysql-connector-python         - MySQL driver written in Python

This is very confusing. Anybody knows which one I should use and why?

Thanks for your help.

Antonyantonym answered 9/12, 2015 at 0:21 Comment(1)
pipreqs got it all wrong. github.com/bndr/pipreqs/issues/261Adessive
H
9

I was just asking myself similar question and I think I found the "fresh" answer. Here is info from two weeks ago: https://github.com/pypa/warehouse/issues/5537

It seems that currently a long-inactive person is owner of the mysql-connector name, hence MySQL developers release under name mysql-connector-python.

Hime answered 20/3, 2019 at 9:29 Comment(2)
That seems to finally answer the question indeed. Thanks!Antonyantonym
Now mysql-connector description says Deprecated, go for official version pypi.org/project/mysql-connector-python.Exchange
P
21

The main differences between them are:

  • mysql-connector-repackaged: is old, do not use it

  • mysql-connector-python 2.0.4: is the original uploaded by MySQL. But it has the problem that does not works with Django >= 1.8. MySQL did not upload yet their stable version 2.1.3 to this repo.

  • mysql-connector-python-rf 2.1.3: is the solution to all your problems if you use Django >= 1.8

Prototherian answered 27/1, 2016 at 23:4 Comment(3)
Thanks for your reply. Do you have a source about this?Antonyantonym
My own experience @JohnSmithOptional !Prototherian
Would recommend using mysql-connector-python now, it's on version 8.0.29 as of today.Borrowing
H
9

I was just asking myself similar question and I think I found the "fresh" answer. Here is info from two weeks ago: https://github.com/pypa/warehouse/issues/5537

It seems that currently a long-inactive person is owner of the mysql-connector name, hence MySQL developers release under name mysql-connector-python.

Hime answered 20/3, 2019 at 9:29 Comment(2)
That seems to finally answer the question indeed. Thanks!Antonyantonym
Now mysql-connector description says Deprecated, go for official version pypi.org/project/mysql-connector-python.Exchange
J
5

If I were to base my assessment on the goodness of a package by how many people have downloaded it, I would suggest you choose mysql-connector-python-rf 2.1.3.

mysql-connector-python-rf worked for me with pip whereas mysql-connector-python gave me issues.

Jaimeejaimes answered 31/12, 2015 at 4:23 Comment(3)
The stats must be wrong. Even very obscure libraries have more hits than 5 downloads a month. I guess the stats are wrong because mysql-connector-python is externally hosted (you have to install it using --allow-external).Antonyantonym
the 5 downloads in the past month is seemingly because everyone downloads it straight from dev.mysql.com instead of from pypiJaimeejaimes
Just want to callout that mysql-connector-python has been more active than the old rf package in the last 6-9ish months. It's on version 8.0.11 now (and I believe it's now the more preferred) but :shrugs:.Courtmartial
B
1

I'd recommend using mysql-connector-python nowadays, it's the official release from Oracle and still gets updated.

mysql-connector-repackaged     - last updated: Mar 11, 2012 (version 0.3.1)
mysql-connector-python-rf      - last updated: Feb 4, 2017 (version 2.2.2)
mysql-connector-python         - last updated: Dec 7, 2021 (version 8.0.28)
Borrowing answered 11/7, 2022 at 13:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.