[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#682835: Package description too specific



Package: python3-markupsafe
Version: 0.9.2-2
Severity: wishlist
X-Debbugs-CC: debian-l10n-english@lists.debian.org


Dear Debian Python Modules Team,
the package description (1) contains examples for specific tasks. Perhaps
I'm not the only one who prefers more generic information.


   Description: XML/HTML/XHTML Markup safe string for Python3
    MarkupSafe implements a unicode subclass that supports HTML strings:
    .
>>> from markupsafe import Markup, escape
>>> escape("<script>alert(document.cookie);</script>")
      Markup('&lt;script&gt;alert(document.cookie);&lt;/script&gt;')
>>> tmpl = Markup("<em>%s</em>")
>>> tmpl % "Peter > Lustig"
      Markup('<em>Peter &gt; Lustig</em>')
    .
    If you want to make an object unicode that is not yet unicode
    but don't want to lose the taint information, you can use the
    `soft_unicode` function:
    .
>>> from markupsafe import soft_unicode
>>> soft_unicode(42)
      '42'
>>> soft_unicode(Markup('foo'))
      Markup('foo')


Though I'm sceptic about copying from upstream (2), (3) in general,
I like it in this case.

(2) The MarkupSafe HTML string library
(3) MarkupSafe is a library for Python that implements a unicode string that
    is aware of HTML escaping rules and can be used to implement automatic
    string escaping. It is used by Jinja 2, the Mako templating engine, the
    Pylons web framework and many more.

I suggest the following as a starting point for a package description rewrite.


Description: HTML/XHTML/XML string library for Python3
 MarkupSafe is a Python library that implements a unicode string that is
 aware of HTML escaping rules. It can be used to implement automatic string
 escaping. It is used by Jinja 2, the Mako templating engine, the Pylons
 web framework and many more.


But I'm not sure whether the last sentence is really needed.

Also I would appreciate very much to see the new boilerplate in the
descriptions of the other packages from the same source (4), for example
the debug version of this package (5):


Description: XML/HTML/XHTML Markup safe string for Python3 - debug version
 MarkupSafe is a Python library that implements a unicode string that is
 aware of HTML escaping rules. It can be used to implement automatic string
 escaping. It is used by Jinja 2, the Mako templating engine, the Pylons
 web framework and many more.
 .
This package contains the extension built for the Python3 debug interpreter.

Kind regards,
   Martin


1: http://ddtp.debian.net/ddt.cgi?desc_id=75640
2: http://www.pocoo.org/projects/#project-hub
3: http://www.pocoo.org/projects/markupsafe/#markupsafe
4: http://ddtp.debian.net/ddt.cgi?source=markupsafe
5: http://ddtp.debian.net/ddt.cgi?desc_id=74068


Reply to: