Description of problem: Importing MySQLdb triggers a warning: /usr/lib/python2.6/site-packages/MySQLdb/__init__.py:34: DeprecationWarning: the sets module is deprecated from sets import ImmutableSet Without additional effort, this makes the desired script unusable. Version-Release number of selected component (if applicable): Python 2.6.2 MySQL-python 1.2.2 How reproducible: Always Steps to Reproduce: 1. import MySQLdb Actual results: The above warning. Expected results: Clean import.
The fix is actually quite simple and non-intrusive and it has been fixed in upstream's 1.2 branch already: See upstream changesets r554, r558, r559, r603. Are you (maintainers) willing to carry a fedora-specific patch which fixes DeprecationWarnings until 1.2.3 is released?
I don't think a specific patch is needed. The 1.2.3c1 release works well with Python 2.6.
The question is if we want to ship a pre-release version of a software. MySQL-python has *long* release cycles (two years since the last stable release) so probably there are quite a lot of changes in 1.2.3 (which might break existing applications).
If there were such epic changes it wouldn't be 1.2.3c1, but 1.3 or something (I don't know their versioning scheme). :) Just see the changelog. And don't forget that the things are already broken. I don't think that maintaining a patched version of the package is reasonable when there are mostly bugfixes in the release candidate. But let's leave it to the maintainer. :)
Surely a deprecation warning doesn't render the package "unusable"? My inclination is to do nothing about this until 1.2.3 is released. Judging from the timing of the betas it won't be very long now. The numbering scheme that Andy has chosen precludes direct use of the release candidate version in Fedora. (1.2.3c1 would be NVR-newer than 1.2.3, so updating from RC to final would fail.) So the alternatives are to back-port or wait, and this doesn't seem important enough to back-port.
I think, this should be fixed with a patch. I have some scripts, which are started from cron and now produces unwanted output, because this warning is showed. Also all warnings are disturbing, when developing an application. As an developer, I need to see all of them and fix them. Because this warning can't be fixed in my programs, it's disturbing too. Patch to fix problem with MySQLdb is simple, so why to do not apply? If you need a patch for current fedora release, just tell me, I can make and test it.
(In reply to comment #6) You can filter the warning in your Python scripts using the warnings module: import warnings warnings.filterwarnings('ignore', '.*the sets module is deprecated.*', DeprecationWarning, 'MySQLdb') This will suppress this specific warning from MySQLdb but you have to do it before you import MySQLdb.
Actually it turns out there is an approved method for putting release candidates into the RPM numbering sequence. I am pushing MySQL-python-1.2.3-0.1.c1.fc11 into fedora-testing, please see if it works for you.
MySQL-python-1.2.3-0.1.c1.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/MySQL-python-1.2.3-0.1.c1.fc11
Works well for me. Thank you. No warnings. Basic tests with my applications are good. After this will be available in updates-testing, I can test this in some production servers.
MySQL-python-1.2.3-0.1.c1.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update MySQL-python'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-7166
It was fixed for me with this last update I added a comment on bodhi. Thanks.
MySQL-python-1.2.3-0.1.c1.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.