Bug #72358 Error on Python2.7
Submitted: 16 Apr 2014 14:48 Modified: 13 May 2014 8:10
Reporter: Xue-Yan liu Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / Python Severity:S3 (Non-critical)
Version:1.1.6 OS:Any
Assigned to: CPU Architecture:Any
Tags: python2, queue, super

[16 Apr 2014 14:48] Xue-Yan liu
Description:
- import error

in file mysql/connector/pooling.py
```
import queue
```
won't work on python2.x

- super().__init__() error

```
mysql/connector/network.py", line 341, in __init__
    super().__init__()
TypeError: super() takes at least 1 argument (0 given)
```

How to repeat:
run and query sth in python2
[17 Apr 2014 1:33] Xue-Yan liu
i mistook. there're no such bugs, i just got the wrong version
[17 Apr 2014 1:35] Xue-Yan liu
mistook again, the bugs do exist!
[17 Apr 2014 1:39] Xue-Yan liu
i think it is caused by the installer.

code is ok, but setup.py install py3 code into py2 env.

i'm using python2.7.4 and virtualenv 1.11.4, and install mysql-connector-python in a virtualenv, by:
```
python setup.py install
```
[21 Apr 2014 18:46] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior:

[sveta@delly mysql-connector-python-1.1.6]$ sudo /usr/local/bin/python2.7 setup.py install
running install
running build
running build_py
running install_lib
running install_egg_info
Writing /usr/local/lib/python2.7/site-packages/mysql_connector_python-1.1.6-py2.7.egg-info

[sveta@delly mysql-connector-python-1.1.6]$ /usr/local/bin/python2.7 --version
Python 2.7.6

Please provide all steps to repeat the issue and their output.
[13 May 2014 6:36] Geert Vanderkelen
When installing using setup.py, make sure that the build/ folder is removed. When you do not clean up, and installing for Python 2 or Python 3, you will experience problems like described in this bug report.

Best is to always use clean:
 shell> python setup.py clean -a install
[13 May 2014 8:10] Xue-Yan liu
Thanks! Solved!