rubber uses deprecated md5 module

Bug #338285 reported by Alex Valavanis
86
This bug affects 15 people
Affects Status Importance Assigned to Milestone
One Hundred Papercuts
Invalid
Undecided
Unassigned
Rubber
Fix Released
Medium
Paul Natsuo Kishimoto
rubber (Debian)
Fix Released
Unknown
rubber (Ubuntu)
Fix Released
Low
Unassigned
Declined for Jaunty by Brian Murray

Bug Description

Binary package hint: rubber

The utilities module for rubber uses the old md5 module, which is deprecated in python 2.6 in jaunty.

/usr/share/rubber/rubber/util.py:8: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5

I got rid of the deprecation warning by changing to the hashlib module. Take a look at the DIY patch I've uploaded.

Related branches

Revision history for this message
Alex Valavanis (valavanisalex) wrote :
Revision history for this message
Adam Schreiber (sadam) wrote :

That patch is identical to that found in Debian bug #520048. I don't know if it's been reported upstream yet though.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=520048

Changed in rubber (Ubuntu):
importance: Undecided → Low
Revision history for this message
Brian Murray (brian-murray) wrote :

This is just a warning and is more appropriate for fixing in Karmic than in Jaunty.

Revision history for this message
Adam Schreiber (sadam) wrote :

It's a warning that annoyingly is displayed in the bottom pane of Gedit when using the LaTeX plugin. Showing the user errors that don't affect the operation of the software but they can't do anything about is bad. This pane is typically used for showing the user real errors about compiling their document.

Revision history for this message
ceripald (metriccq) wrote :

This warning was annoying me when compiling my LaTeX document in Gedit. I assume that there is some method of running the above patch so that it updates your util.py file, but I couldn't figure it out. In the end, I just opened up the util.py file and changed the appropriate lines, which succeeded in getting rid of the Gedit warning. So thanks to the person who wrote the patch, and here are the lines to change if anyone else is as python baffled as I am:

first run 'sudo gedit /usr/share/rubber/rubber/util.py'
then change 'import md5' to 'import hashlib' (which was line 8 in my util.py file)
and 'm = md5.new()' to 'm = hashlib.md5()' (which was line 22 in my util.py file)

Apologies if this is not the correct place to post this info.

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

You just need to download the patch file to somewhere convenient (let's say a folder called ~/rubberpatch) and then run the patch tool:

cd ~/rubberpatch
sudo patch /usr/share/rubber/rubber/util.py util.py.diff

Changed in rubber (Debian):
status: Unknown → New
Revision history for this message
gianluca (antonelli) wrote :

@ceripald : thanks it worked for me

Changed in rubber (Ubuntu):
status: New → Confirmed
Revision history for this message
Jingyu Zou (jingyu-zou) wrote :

This is like one of those most annoying but easiest to fix bugs, and yet it is still unfixed in Karmic. It seems to me that any Ubuntu maintainer in position could have fixed it at his fingertips but nobody has done it yet. Or maybe Ubuntu assumes users are responsible for small bug fixes themselves?

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Well, you're right that it's easy to fix and annoying for the user. I have nominated it for the hundred paper cuts project: https://wiki.ubuntu.com/PaperCut Hopefully, someone will quickly push this fix through :)

Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :

Alex, if you read the definition of a 'papercut' used by that project, you will see that rubber is out of scope. There's also been no indication that another round of papercut fixing is going to happen in the Lucid development cycle.

If you view the project home page at http://www.pps.jussieu.fr/~beffara/soft/rubber/, it is obvious that rubber has not been touched in a long time by the original developer. Debian and Ubuntu maintainers *aren't* expected to assume the role of the upstream developer when that person stops work.

Changed in hundredpapercuts:
status: New → Invalid
Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :

...so maybe we can revive development?

Changed in rubber:
assignee: nobody → Paul Kishimoto (khaeru)
importance: Undecided → Medium
milestone: none → 1.2
status: New → Confirmed
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Oops, sorry about that. I didn't pick up on the "average user" clause in 100 papercuts. It would be great if rubber could be restarted :)

Changed in rubber:
status: Confirmed → Fix Committed
Revision history for this message
Jingyu Zou (jingyu-zou) wrote :

I am very happy to see my comment revived a project! Thank you guys!

Revision history for this message
Hicham HAOUARI (funnylife-ma) wrote :

a simple fix like this one is taking ages, what a shame !

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

While we're waiting for an upstream release, I have put an updated package in my PPA which fixes this bug. I'm new to debian packaging, so please forgive any mistakes.

https://launchpad.net/~valavanisalex/+archive/rubber/+packages

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Attaching debdiff for patched version

Revision history for this message
Hicham HAOUARI (funnylife-ma) wrote :

The patch have been available for ages, and it is already fixed in upstream svn. All what the packager maintainer should do is take an svn snapshot, but it is up to him after all.

Revision history for this message
Fabrice Coutadeur (fabricesp) wrote :

Hi,

We generally don't add a patch system to a debian package: we uses the one provided by Debian (that can be none), to make the changes 'lighter'.

so could you please apply the patch directly to the source, without patch system, and attach the new debdiff here?

If you prefer, I can take care of that.

Thanks,

Fabrice

Changed in rubber (Ubuntu):
assignee: nobody → Alex Valavanis (valavanisalex)
status: Confirmed → In Progress
Revision history for this message
Emmanuel Beffara (manu-beffara) wrote :

Hi,

As mentioned above, it's been ages since I last made a release of rubber, but I finally found some time and motivation to revive the project properly. So I took the old repository (that was previously stored on my web page in Darcs format) and put it on Launchpad as the new main branch. In particular it contains the long awaited fix about the deprecated md5 module, among other changes.

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Hi Fabrice,

Sorry about the mistake. I'm pretty new to this! I have updated the package in my PPA and I'm attaching a new debdiff.

Thanks

Alex

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Hi Emmanuel,

Thanks very much for making the upstream changes and copying the source across :)

Alex

Changed in rubber (Ubuntu):
status: In Progress → Fix Committed
status: Fix Committed → Confirmed
assignee: Alex Valavanis (valavanisalex) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rubber - 1.1-2.2ubuntu1

---------------
rubber (1.1-2.2ubuntu1) lucid; urgency=low

  * debian/rules: Allow distclean errors to be handled properly
  * Replace deprecated md5 module with hashlib (LP: #338285)
 -- Alexander Valavanis <email address hidden> Sat, 06 Mar 2010 09:27:56 +0000

Changed in rubber (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Fabrice Coutadeur (fabricesp) wrote :

Hmm, it seems that my previous comment has been lost...

@Alex: we generally don't bump the standard-versions of a Debian package in Ubuntu, so I undo your changes linked to that change. Also, I've delete the Debian Bug reference in the changelog, as it's of no use. Anyway, good job!

@Emmanuel: I saw that you are the Debian maintainer. Do you plan to update the package there?

Thanks,
Fabrice

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Hi Fabrice,

Thanks a lot for all your good advice. I'm very pleased to have helped out.

Alex

Changed in rubber (Debian):
status: New → Confirmed
Changed in rubber (Debian):
status: Confirmed → Fix Released
Sebastian Kapfer (caci)
Changed in rubber:
milestone: 1.2 → none
status: Fix Committed → 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.