Bug 481608

Summary: [PATCH] Suppress DeprecationWarnings in python-2.6
Product: [Fedora] Fedora Reporter: Satoru SATOH <ssato>
Component: cobblerAssignee: Michael DeHaan <mdehaan>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: mdehaan
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-26 18:55:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch 1/2: Use cobbler.utils.popen2 instead of popen2.popen2 deprecated in python-2.6
none
Patch 2/2: Make md5 indirectly imported none

Description Satoru SATOH 2009-01-26 18:05:37 UTC
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 18:13:17 UTC
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 18:50:20 UTC
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 18:55:26 UTC
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