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

Re: Bug#682835: Package description too specific



Martin Eberhard Schauer wrote:
> the package description (1) contains examples for specific tasks. Perhaps
> I'm not the only one who prefers more generic information.

[...]
> I suggest the following as a starting point for a package
> description rewrite.
> 
> Description: HTML/XHTML/XML string library for Python3

Usually I'd say that we don't need to mention Python in the synopsis
of python-pylibpython-mcpython (Section: python), but here I suppose
it's distinguishing versions.  Still, the upstream name is "Python 3"
with a space.

>  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.

It's also slightly odd English - more what?

The original version had one phrase that I think you should retain:
"unicode subclass".  (Lowercase because it's talking about the unicode
string type, not the Unicode standard.)  Oh, and instead of stacked
"that" clauses I'd say "implementing a unicode subclass".

Patch attached.
-- 
JBR	with qualifications in linguistics, experience as a Debian
	sysadmin, and probably no clue about this particular package

diff -ru markupsafe-0.15.pristine/debian/control markupsafe-0.15/debian/control
--- markupsafe-0.15.pristine/debian/control	2011-07-20 19:01:18.000000000 +0100
+++ markupsafe-0.15/debian/control	2012-07-26 09:51:45.411378479 +0100
@@ -17,61 +17,43 @@
 Architecture: any
 Depends: ${misc:Depends}, ${python:Depends}, ${shlibs:Depends}
 Provides: ${python:Provides}
-Description: XML/HTML/XHTML Markup safe string for Python
- MarkupSafe implements a unicode subclass that supports HTML strings:
- .
-  >>> from markupsafe import Markup, escape
-  >>> escape("<script>alert(document.cookie);</script>")
-  Markup(u'&lt;script&gt;alert(document.cookie);&lt;/script&gt;')
-  >>> tmpl = Markup("<em>%s</em>")
-  >>> tmpl % "Peter > Lustig"
-  Markup(u'<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)
-  u'42'
-  >>> soft_unicode(Markup('foo'))
-  Markup(u'foo')
+Description: HTML/XHTML/XML string library for Python
+ MarkupSafe is a Python library implementing a unicode subclass that is
+ aware of HTML escaping rules. It can be used to implement automatic
+ string escaping.
 
 Package: python-markupsafe-dbg
 Architecture: any
 Section: debug
 Priority: extra
 Depends: python-markupsafe (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
-Description: XML/HTML/XHTML Markup safe string for Python
- This package contains the extension built for the Python debug interpreter.
+Description: HTML/XHTML/XML string library for Python - debug version
+ MarkupSafe is a Python library implementing a unicode subclass that is
+ aware of HTML escaping rules. It can be used to implement automatic
+ string escaping.
+ .
+ This package contains the extension built for the Python debug
+ interpreter.
 
 Package: python3-markupsafe
 Architecture: any
 Depends: ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends}
-Description: XML/HTML/XHTML Markup safe string for Python3
- MarkupSafe implements a unicode subclass that supports HTML strings:
+Description: HTML/XHTML/XML string library for Python 3
+ MarkupSafe is a Python library implementing a unicode subclass that is
+ aware of HTML escaping rules. It can be used to implement automatic
+ string escaping.
  .
-  >>> 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')
+ This package contains the Python 3 version.
 
 Package: python3-markupsafe-dbg
 Architecture: any
 Section: debug
 Priority: extra
 Depends: python3-markupsafe (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}
-Description: XML/HTML/XHTML Markup safe string for Python3
- This package contains the extension built for the Python3 debug interpreter.
+Description: HTML/XHTML/XML string library for Python 3 - debug version
+ MarkupSafe is a Python library implementing a unicode subclass that is
+ aware of HTML escaping rules. It can be used to implement automatic
+ string escaping.
+ .
+ This package contains the extension built for the Python 3 debug
+ interpreter.

Reply to: