This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 669835 - RFE: add debug and pypy subpackages to MySQL-python.spec
RFE: add debug and pypy subpackages to MySQL-python.spec
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: MySQL-python (Show other bugs)
rawhide
Unspecified Linux
low Severity medium
: ---
: ---
Assigned To: Jakub Dorňák
Fedora Extras Quality Assurance
:
Depends On: pypy-setuptools
Blocks: PyPyStack
  Show dependency treegraph
 
Reported: 2011-01-14 17:48 EST by Dave Malcolm
Modified: 2013-11-11 11:09 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-11 11:09:39 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Patch to add subpackages to MySQL-python (3.29 KB, patch)
2011-01-14 17:48 EST, Dave Malcolm
no flags Details | Diff

  None (edit)
Description Dave Malcolm 2011-01-14 17:48:06 EST
Created attachment 473608 [details]
Patch to add subpackages to MySQL-python

I've added a "/usr/bin/python-debug" build of python (CPython), emitted as a subpackage of python.src.rpm's build.  This is a build of python with debugging flags turned on: e.g. reference tracking.  This shares .py and .pyc/.pyo files with the main python build, but has its own .so files, as the ABI is incompatible.  For a module FOO.so, it looks for a FOO_d.so  See:
  https://fedoraproject.org/wiki/Features/DebugPythonStacks
for more information.

I've also packaged the PyPy python runtime for Fedora, and am hoping to eventually build out a stack of Python modules for it.  This has its own .py installation location, with its own .pyc and .so files.  See:
  https://fedoraproject.org/wiki/Features/PyPyStack

I'm attaching a patch to MySQL-python which adds two subpackages:
  MySQLdb-python-debug
  pypy-MySQLdb

As is, I don't think the pypy part of this is ready yet, due to a few of caveats (am posting here for early feedback):

(i) the site_packages location for PyPy  currently embeds the full PyPy version in its location: pypy-1.4.1  We probably don't want to require rebuilding all pypy packages every time we update to a new version of pypy
(ii) I'm not yet sure what upstream PyPy's plans are w.r.t. bytecode formats and ABI compatibility

Most significantly, the PyPy code crashes hard:

  $ pypy -c "import MySQLdb; c = MySQLdb.connect() ; print(c)"
  Traceback (most recent call last):
    File "app_main.py", line 53, in run_toplevel
    File "app_main.py", line 492, in run_it
    File "<string>", line 1, in <module>
    File "/usr/lib64/pypy-1.4.1/site-packages/MySQLdb/__init__.py", line 81, in Connect
      return Connection(*args, **kwargs)
    File "/usr/lib64/pypy-1.4.1/site-packages/MySQLdb/connections.py", line 147, in __init__
      from converters import conversions
    File "/usr/lib64/pypy-1.4.1/site-packages/MySQLdb/converters.py", line 126, in <module>
      array.ArrayType: array2Str,
  AttributeError: 'module' object has no attribute 'ArrayType'
  
  $ pypy -c "import _mysql; c = _mysql.connect() ; print(c)"
  RPython traceback:
    File "implement.c", line 14616, in PyErr_SetObject
    File "implement_3.c", line 37566, in from_ref
  Fatal RPython error: AssertionError
  Aborted (core dumped)
  
  $ pypy -c "import _mysql; c = _mysql.connect() ; print(c)"
  Segmentation fault (core dumped)



The python-debug code _does_ seem to work (at least for calling into the mysql libs):

  $ python-debug -c "import MySQLdb; c = MySQLdb.connect() ; print(c)"
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/usr/lib64/python2.6/site-packages/MySQLdb/__init__.py", line 81, in Connect
      return Connection(*args, **kwargs)
    File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 187, in __init__
      super(Connection, self).__init__(*args, **kwargs2)
  _mysql_exceptions.OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)")
  [31000 refs]
  
  $ python-debug -c "import _mysql; c = _mysql.connect() ; print(c)"
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
  _mysql_exceptions.OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)")
  [15294 refs]
Comment 1 Fedora Admin XMLRPC Client 2013-05-09 09:52:54 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 2 Fedora Admin XMLRPC Client 2013-11-06 09:23:15 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 3 Jakub Dorňák 2013-11-11 11:09:39 EST
Since blocking Bug #669825 was closed with resolution WONTFIX long time ago, I am closing this one too.

(I have added subpackage debug.)

Note You need to log in before you can comment on or make changes to this bug.