Bug 481608 - [PATCH] Suppress DeprecationWarnings in python-2.6
Summary: [PATCH] Suppress DeprecationWarnings in python-2.6
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: cobbler
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Michael DeHaan
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-26 18:05 UTC by Satoru SATOH
Modified: 2009-01-26 18:55 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-26 18:55:26 UTC
Type: ---
Embargoed:


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 18:05 UTC, Satoru SATOH
no flags Details | Diff
Patch 2/2: Make md5 indirectly imported (3.24 KB, patch)
2009-01-26 18:13 UTC, Satoru SATOH
no flags Details | Diff

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


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