Doclifter is not compatible with newer Python versions

Bug #498892 reported by Mathieu Comandon
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
doclifter (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Lucid by Mathieu Comandon

Bug Description

Binary package hint: doclifter

Oh noes, a tool written by Eric S. Raymond himself is broken in Ubuntu, this is not acceptable.
The problem is that the code is quite old and has not been updated in years, some variable are reserved keywords of the python language (with, as) . There is also an obsolete module (sre) which can easily be removed.

What freaks me out is that this bug has been left unnoticed for years, and this means that no one has read "The art of Unix programming" by ESR where the tool is mentioned. This is an essential book , read it !

I have attached a patch which solves issues with doclifter.

Related branches

Revision history for this message
Mathieu Comandon (strycore) wrote :
Changed in doclifter (Ubuntu):
status: New → Confirmed
Revision history for this message
Mathieu Comandon (strycore) wrote :

btw you might want the error messages given by Ubuntu's version :

strider@astoria:~/dev$ doclifter
  File "/usr/bin/doclifter", line 388
    (mark, token, as, markup) = line[5:].split()

strider@astoria:~$ doclifter XvGetStill.3 File "/usr/bin/doclifter", line 6381
    def replacemacro(self, args, with):
                                                  ^SyntaxError: invalid syntax

strider@astoria:~$ doclifter XvGetStill.3
/usr/bin/doclifter:129: DeprecationWarning: The sre module is deprecated, please import re.
  import sys, os, glob, re, sre, string, exceptions, copy, tempfile, time, pprint

Revision history for this message
Mathieu Comandon (strycore) wrote :

And this is what you get when running doclifter with Python 2.5

/usr/bin/doclifter:388: Warning: 'as' will become a reserved keyword in Python 2.6
/usr/bin/doclifter:389: Warning: 'as' will become a reserved keyword in Python 2.6
/usr/bin/doclifter:6373: Warning: 'with' will become a reserved keyword in Python 2.6
/usr/bin/doclifter:6374: Warning: 'with' will become a reserved keyword in Python 2.6
/usr/bin/doclifter:129: DeprecationWarning: The sre module is deprecated, please import re.
  import sys, os, glob, re, sre, string, exceptions, copy, tempfile, time, pprint

This is what happens when nobody cares about warnings :D

Revision history for this message
Mathieu Comandon (strycore) wrote :

Here is the debdiff, now almost all the work is done ;)

Changed in doclifter (Ubuntu):
assignee: nobody → Mathieu Comandon (strycore)
status: Confirmed → Fix Committed
Changed in doclifter (Ubuntu):
status: Fix Committed → In Progress
Changed in doclifter (Ubuntu):
assignee: Mathieu Comandon (strycore) → Fabrice Coutadeur (fabricesp)
Revision history for this message
Fabrice Coutadeur (fabricesp) wrote :

By the way: I assume that your debdiff is ready to be sponsored, even if it's in Progress.
FYI, the normal way to receive a quick sponsorship is to mark the bug report as Confirmed, and unassign yourself from the bug. Otherwise sponsors think you are still working on it, and don't even look at it :-D

Fabrice

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

Uploaded. Thanks for your work!

I updated some things before uploading:
- maintainer field in debian/control. Please remember to update it next time. You can use update-maintainer script for that purpose
- to properly close a bug in a changelog, you have to use LP: <bug number> instead of Closes. Closes is for Debian.
- I also added more details in the changelog entry

Otherwise, good work ;-)

Thanks,
Fabrice

Changed in doclifter (Ubuntu):
assignee: Fabrice Coutadeur (fabricesp) → nobody
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package doclifter - 2.3-2ubuntu1

---------------
doclifter (2.3-2ubuntu1) lucid; urgency=low

  * doclifter: Fix for Python 2.6. (LP: #498892)
    - Removed import of obsolete package sre (replaced it with re)
    - Renamed 'with' variable as 'with_var' and 'as' as 'as_var'
 -- Mathieu Comandon <email address hidden> Mon, 18 Jan 2010 12:54:30 +0100

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

One last comment: could you please forward your patch to Debian: python 2.6 i making his way into the archive, and I'm sure they will be interested in your patch. You can forward your changes by using submittodebian.

Thanks,
Fabrice

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.