Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#65035 - [python-peewee] broken mariadb support

Attached to Project: Community Packages
Opened by loqs (loqs) - Friday, 03 January 2020, 21:38 GMT
Last edited by Morten Linderud (Foxboron) - Thursday, 31 March 2022, 08:45 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
mariadb support is provided by the optional dependency mysql-python.
However python-peewee is built with python 3 while mysql-python is built for python 2.
Installing python-mysqlclient produces the expected output.

Additional info:
* python-peewee 3.13.0-1
* mysql-python 1.2.5-3

Steps to reproduce:
python
Python 3.8.1 (default, Dec 21 2019, 20:57:38)
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from peewee import *
>>> mysql_db = MySQLDatabase('my_database')
>>> mysql_db.connect()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.8/site-packages/peewee.py", line 2993, in connect
self._state.set_connection(self._connect())
File "/usr/lib/python3.8/site-packages/peewee.py", line 3890, in _connect
raise ImproperlyConfigured('MySQL driver not installed!')
peewee.ImproperlyConfigured: MySQL driver not installed!

Expected output:
python
Python 3.8.1 (default, Dec 21 2019, 20:57:38)
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from peewee import *
>>> mysql_db = MySQLDatabase('my_database')
>>> mysql_db.connect()
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/peewee.py", line 2993, in connect
self._state.set_connection(self._connect())
File "/usr/lib/python3.8/site-packages/peewee.py", line 3891, in _connect
conn = mysql.connect(db=self.database, **self.connect_params)
File "/usr/lib/python3.8/site-packages/MySQLdb/__init__.py", line 84, in Connect
return Connection(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/MySQLdb/connections.py", line 179, in __init__
super(Connection, self).__init__(*args, **kwargs2)
MySQLdb._exceptions.OperationalError: (2002, "Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2)")

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.8/site-packages/peewee.py", line 2996, in connect
self._initialize_connection(self._state.conn)
File "/usr/lib/python3.8/site-packages/peewee.py", line 2831, in __exit__
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "/usr/lib/python3.8/site-packages/peewee.py", line 183, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3.8/site-packages/peewee.py", line 2993, in connect
self._state.set_connection(self._connect())
File "/usr/lib/python3.8/site-packages/peewee.py", line 3891, in _connect
conn = mysql.connect(db=self.database, **self.connect_params)
File "/usr/lib/python3.8/site-packages/MySQLdb/__init__.py", line 84, in Connect
return Connection(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/MySQLdb/connections.py", line 179, in __init__
super(Connection, self).__init__(*args, **kwargs2)
peewee.OperationalError: (2002, "Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2)")
This task depends upon

Closed by  Morten Linderud (Foxboron)
Thursday, 31 March 2022, 08:45 GMT
Reason for closing:  Fixed
Additional comments about closing:  3.14.8-2
Comment by loqs (loqs) - Friday, 18 March 2022, 22:59 GMT

Loading...