Annoying deprecation warning

Bug #436035 reported by Johan Nilsson
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
rdiff-backup
Unknown
Unknown
rdiff-backup (Debian)
Fix Released
Unknown
rdiff-backup (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: rdiff-backup

I have used rdiff-backup in several backup solutions and everything works great except I receive some annoying warnings about deprecated function calls every time i use it:

/var/lib/python-support/python2.6/rdiff_backup/SetConnections.py:148: DeprecationWarning: os.popen2 is deprecated. Use the subprocess module.
  stdin, stdout = os.popen2(remote_cmd)
/var/lib/python-support/python2.6/rdiff_backup/SetConnections.py:148: DeprecationWarning: os.popen2 is deprecated. Use the subprocess module.
  stdin, stdout = os.popen2(remote_cmd)

Do rdiff-backup lack maintenance or is my system some how not up to date? I receive this warnings on 3 of my systems all running Ubuntu 9.04 and rdiff-backup version 1.2.7.

Regards
Johan

Revision history for this message
Teemu Torma (teemu-torma) wrote :

I agree this is very annoying.

Would it be possible to add the small patch attached to https://savannah.nongnu.org/bugs/?26064 to the Karmic version?

Revision history for this message
Andreas Olsson (andol) wrote :

I will do some tests on the suggested patch. Since it uses an already present workaround it *should* be safe.

Changed in rdiff-backup (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Andreas Olsson (andol) wrote :

Taken the patch from https://savannah.nongnu.org/bugs/?26064 and done some necessary modifications.

First it only checks against the two first "parts" of the version number, ie 2.6 instead of 2.6.2+ for example. Python really wouldn't consider 2+ an int.

 Also, the *nix version of rdiff-backup requires shell=True instead of shell=False in the subprocess.Popen call.

Attaching a debdiff which applies the patch.

Revision history for this message
Andreas Olsson (andol) wrote :

In case anyone wants to try out the patch, the following PPA builds are available.

https://launchpad.net/~andol/+archive/private/+files/rdiff-backup_1.2.8-1ubuntu2~andol1~karmic1_i386.deb
https://launchpad.net/~andol/+archive/private/+files/rdiff-backup_1.2.8-1ubuntu2~andol1~karmic1_amd64.deb

Except for the versioning these builds are identical to the result of the previously attached debdiff.

Revision history for this message
Jimmy Hedman (jimmy-hedman) wrote :

This fix worked fine for me. Tried the i386 version.

Revision history for this message
Andreas Olsson (andol) wrote :

@Jimmy: Thanks for the help testing.

Done some additional (successful) testing myself, and I'd say this fix is ready to subscribe universe-sponsors to.

*subscribing*

Changed in rdiff-backup (Ubuntu):
assignee: nobody → fabrice_sp (fabricesp)
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rdiff-backup - 1.2.8-1ubuntu2

---------------
rdiff-backup (1.2.8-1ubuntu2) karmic; urgency=low

  * 02_python_2.6_deprecationwarning.dpatch: Handling Python 2.6 deprecation
   annoying warnings (LP: #436035)

 -- Andreas Olsson <email address hidden> Sat, 03 Oct 2009 19:37:30 +0200

Changed in rdiff-backup (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Fabrice Coutadeur (fabricesp) wrote :

Uploaded. Thanks for your contribution!
I've just added a description in the patch and changed a bit the changelog entry to make clear the patch name.
Also, I would have split the modifications in 2 patch, but it's a personal taste.

Thanks!
Fabrice

Changed in rdiff-backup (Ubuntu):
assignee: fabrice_sp (fabricesp) → nobody
status: Fix Released → Fix Committed
Revision history for this message
Fabrice Coutadeur (fabricesp) wrote :

Manually closing the bug report.

Changed in rdiff-backup (Ubuntu):
status: Fix Committed → Fix Released
Changed in rdiff-backup (Debian):
status: Unknown → Incomplete
Changed in rdiff-backup (Debian):
status: Incomplete → Confirmed
Changed in rdiff-backup (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.