Bug 481608 - [PATCH] Suppress DeprecationWarnings in python-2.6
[PATCH] Suppress DeprecationWarnings in python-2.6
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: cobbler (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Michael DeHaan
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-26 13:05 EST by Satoru SATOH
Modified: 2009-01-26 13:55 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-26 13:55:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch 1/2: Use cobbler.utils.popen2 instead of popen2.popen2 deprecated in python-2.6 (2.40 KB, patch)
2009-01-26 13:05 EST, Satoru SATOH
no flags Details | Diff
Patch 2/2: Make md5 indirectly imported (3.24 KB, patch)
2009-01-26 13:13 EST, Satoru SATOH
no flags Details | Diff

  None (edit)
Description Satoru SATOH 2009-01-26 13:05:37 EST
Created attachment 330010 [details]
Patch 1/2: Use cobbler.utils.popen2 instead of popen2.popen2 deprecated in python-2.6

Description of problem:
The problem should be same as bz#475871 and bz#480945.

Some parts of the code of cobbler still uses the modules / methods deprecated 
in python-2.6, therefore, annoying "DeprecatedWarning" messages are shown everytime cobbler command run.


Version-Release number of selected component (if applicable):
Confirmed with cobbler-1.4.1-1.fc11.noarch

How reproducible: always


Steps to Reproduce:
1. Run "cobbler <any_action> ..." with python-2.6 (rawhide's python default)
2.
3.
  
Actual results: "DeprecationWarning" messages are out.


Expected results: No warning messages.


Additional info:

I'll attach a series of patches originally created for git HEAD.

Also, I've not confirmed but expect that these patches may be work with older python versions (< 2.5).
Comment 1 Satoru SATOH 2009-01-26 13:13:17 EST
Created attachment 330012 [details]
Patch 2/2: Make md5 indirectly imported

This patch enables that md5 module for each python versions imported appropriately.
At the same time, it removes unnecessary "import md5" line in some code.

Same as the previous patch, I originally made this patch for the current git HEAD.
Comment 2 Michael DeHaan 2009-01-26 13:50:20 EST
Thanks.

I'll take a look at applying this and including this for 1.4.2 and the devel branch.
Comment 3 Michael DeHaan 2009-01-26 13:55:26 EST
Merged into the devel and master branch, thanks!

In the future if you want to share patches with the cobbler mailing list, that's the preferred way of doing things, that way other folks can keep up with development, though this is fine too.

This will be included in 1.4.2 which should release at the end of this week.

--Michael

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