[XML-SIG] [Announce] Gnosis Utils 1.2.0
David Mertz, Ph.D.
mertz at gnosis.cx
Thu Apr 7 06:36:07 CEST 2005
David Mertz (mertz at gnosis.cx)
Frank McIngvale (frankm at hiwaay.net)
This release of the Gnosis Utilities contains several new modules,
as well as fixes, enhancements, and speedups in existing
subpackages.
Try it out, have fun, send feedback!
NEW SUBPACKAGES
------------------------------------------------------------------------
ADDED gnosis.utils.hashcash (also runs standalone). Python
implementation of Hashcash v.1 (backward compatible with hashcash
v.0).
ADDED disthelper. A collection of scripts and modules that are
generally useful for building/maintaining a Python source
distribution.
- To use disthelper in your own distribution, copy the entire
disthelper/ tree into the toplevel of your tree, as has been done
in Gnosis_Utils.
- See disthelper/README for details.
ADDED gnosis.pyconfig. Detect actual capabilities available in a
Python interpreter. gnosis.pyconfig lets you write much more
robust/readable code than simply relying on sys.version_info.
ADDED gnosis.xml.xmlmap. Unicode->XML legality testing & Unicode
helper functions.
- For detailed background information on the motivation for
this module, see "All About Python and Unicode" at:
http://boodebr.org/python/pyunicode/index.html
ENHANCEMENTS
------------------------------------------------------------------------
There is one critical change in gnosis.xml.pickle; all xml.pickle
users are encouraged to upgrade.
Catch unpickleable data in gnosis.xml.pickle and abort, instead of
creating pickles that can't be reloaded.
- Recommend all xml.pickle users upgrade to 1.2.0.
- Issues: not all valid Unicode strings are valid XML CDATA or
attribute values.
- There have not been any reports of data loss due to this, but it
is a possibility with 1.1.1.
- A future Gnosis release will fix this so that the 'bad' data can
be pickled, instead of just bailing out.
Numerous new convenience functions for gnosis.xml.objectify. See
gnosis/docs/xml_matters_39.txt for more discussion.
- addChild() # moved to utils subpackage
- walk_xo() # Recursively traverse the nodes
- write_xml() # Serialize an _XO_ object back into XML
- XPath() # Find node(s) within an _XO_ object
- pyobj_printer() # moved to utils subpackage
Some of older conveniences have been tweaked and/or were not announced
previously:
- content() # The (mixed) content of o as a list
- children() # The child nodes (not PCDATA) of o
- text() # List of textual children
- dumps(): # The PCDATA in o (preserves whitespace)
- normalize() # Whitespace normalize string,
# e.g. o.PCDATA==normalize(dumps(o))
- tagname() # The element tag o was generated from
- attributes()# List of (XML) attributes of o
Fixed two bugs causing leaks in long running gnosis.xml.objectify
processes (file close and expat base class).
Significant speedups by miscellaneous refactoring/cleanup in
gnosis.xml.objectify.
Fixes to gnosis.xml.indexer suggested by Uche Ogbuji.
Security fixes to gnosis.utils.convert.dmText2Html.
DOWNLOADING:
------------------------------------------------------------------------
Browse the latest development snapshot or download it using 'wget -r'
or similar tools:
http://gnosis.cx/download/gnosis/
It may be obtained at:
http://gnosis.cx/download/Gnosis_Utils-1.2.0.tar.gz
The current release is always available as:
http://gnosis.cx/download/Gnosis_Utils-current.tar.gz
Other distribution formats and older versions can be found at:
http://gnosis.cx/download/Gnosis_Utils.More/
BACKGROUND:
------------------------------------------------------------------------
Gnosis Utilities contains a number of Python libraries, most (but not
all) related to working with XML. These include:
disthelper (Create more flexible distutils archives)
gnosis.indexer (Full-text indexing/searching)
gnosis.xml.pickle (XML pickling of Python objects)
gnosis.xml.objectify (Any XML to "native" Python objects)
gnosis.xml.validity (Enforce validity constraints)
gnosis.xml.relax (Tools for working with RelaxNG)
gnosis.xml.indexer (XPATH indexing of XML documents)
[...].convert.txt2html (Convert ASCII source files to HTML)
gnosis.util.dtd2sql (DTD -> SQL 'CREATE TABLE' statements)
gnosis.util.sql2dtd (SQL query -> DTD for query results)
gnosis.util.xml2sql (XML -> SQL 'INSERT INTO' statements)
gnosis.util.combinators (Combinatorial higher-order functions)
gnosis.util.introspect (Introspect Python objects)
gnosis.utils.hashcash (Hashcash proof-of-work protocol)
gnosis.magic (Multimethods, metaclasses, etc)
gnosis.trigramlib (Work w/ trigrams, e.g. spam filtering)
gnosis.pyconfig (Capability-based version adaptation)
...and so much more! :-)
More information about the XML-SIG
mailing list