-------------------------
- added snakeoil.klass.immutable_instance metaclass and an equivalent inject
function for modifying the scope. These are used to avoid classes adhoc'ing
the same sort of functionality, rarely throwing appropriate/standardized
exceptions.
- for any consumers of snakeoil's common header, for py2.4/py2.5 we've added
suppression of the segfault potential for Py_CLEAR(tmp); see
http://mail.python.org/pipermail/python-bugs-list/2008-July/055285.html
for the sordid details.
- mappings.inject_getitem_as_getattr, and AttrAccessible were added. The
former is for modifying a class so that attribute access is proxied to
item access (including rewriting KeyError to AttributeError); the latter
is a general usable class for this.
- mappings.ListBackedDict and mappings.TupleBackedDict have been removed.
- demandload.demand_compile_regexp no longer returns the placeholder- instead
it injects the placeholder directly into the scope, just like demandload
does.
- added snakeoil.iterables.chain_from_iterable; this is compatibility for
py2.4/py2.5, in >=py2.6 it just uses itertools.chain.from.iterable .
- initial work towards jython2.5 support.
- Massive amount of docstring work. Yes, snakeoil is now documented and has
examples.
- correct an off by one in caching_iter.
- snakeoil.dependant_methods.ForcedDepends grew two new methods;
__set_stage_state__ for tweaking stage state manually, and
__stage_step_callback__ for being notified on each stage completed.
- snakeoil.stringio; basically a py2k/py3k compatible set of class wrapping
cStringIO/StringIO as necessary to provide readonly or writable versions of
text vs bytes StringIO handles. Note that readonly instances throw
TypeError on write/truncate/etc, instead of cStringIO's behaviour or
just not having the methods (or silently modifying things).
- pkgcore ticket 172; posix access technically allows for a root invoker to
get a True result when doing X_OK on a non-executable file; this renders the
function a fair bit useless for doing $PATH lookups for example, so we bundle
a native python implementation that is fallen back to for userlands
(opensolaris for example) that choose to implement that broken posix option.
Linux/\*BSDs don't have this issue, so os.access is used for those userlands.
- pkgcore ticket 13; data_source.get* functions return handles that have
.exceptions holding the exceptions they can throw, and that are caused by
underlying implementation issues (versus caused by bad usage of the object).
- snakeoil data_source's will loose their get\_ methods in the next major
version- they're kept strictly for compatibility.
- fix_copy.inject_copy will be removed after the next major version. What
remains does nothing.
- pkgcore.chksum was moved to snakeoil.chksum; pkgcore.interfaces.data_source
was moved to snakeoil.data_source in addition.
- all bash functionality was split out of .fileutils into .bash
- osutils.readlines arg strip_newlines became strip_whitespace; if set,
it'll wipe all leading/trailing whitespace from a line.
- snakeoil.weakrefs grew a new experimental metaclass; WeakRefFinalizer.
Basically this class allows __del__ without the GC issues __del__ normally
suffers. Experimental, but should work- just keep in mind you get proxies
back from users of that class.
- snakeoil.test.test_del_usage was added to scan for classes using __del__
when they could use WeakRefFinalizer instead.
- snakeoil.lists.predicate_split; given a predicate function, a stream, and
an optional key function (think DSU pattern for sorted), split the stream
into two sequences- one sequence where the predicate evalutes true, the
other sequence where it evaluates false.
- detect python bug 3770 (gentoo bug 330511), and disable multiprocessing
for 2to3 conversion if it's found.