Bug 505611 - Deprecation warning in MySQL-python
Deprecation warning in MySQL-python
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: MySQL-python (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Tom Lane
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-12 11:16 EDT by Georgi Hristozov
Modified: 2013-07-02 23:22 EDT (History)
6 users (show)

See Also:
Fixed In Version: 1.2.3-0.1.c1.fc11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-03 15:53:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Georgi Hristozov 2009-06-12 11:16:53 EDT
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.
Comment 1 Felix Schwarz 2009-06-15 06:28:11 EDT
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?
Comment 2 Georgi Hristozov 2009-06-15 06:40:01 EDT
I don't think a specific patch is needed. The 1.2.3c1 release works well with Python 2.6.
Comment 3 Felix Schwarz 2009-06-15 14:13:38 EDT
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).
Comment 4 Georgi Hristozov 2009-06-15 14:34:18 EDT
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. :)
Comment 5 Tom Lane 2009-06-15 15:34:27 EDT
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.
Comment 6 Jan ONDREJ 2009-06-19 08:16:21 EDT
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.
Comment 7 Felix Schwarz 2009-06-20 03:28:27 EDT
(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.
Comment 8 Tom Lane 2009-06-28 12:57:43 EDT
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.
Comment 9 Fedora Update System 2009-06-28 13:00:23 EDT
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
Comment 10 Jan ONDREJ 2009-06-29 07:29:41 EDT
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.
Comment 11 Fedora Update System 2009-06-30 17:40:48 EDT
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
Comment 12 iarly selbir 2009-07-02 10:19:28 EDT
It was fixed for me with this last update

I added a comment on bodhi.

Thanks.
Comment 13 Fedora Update System 2009-07-03 15:53:34 EDT
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.

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