Snakeoil

Latest version: v0.10.9

Safety actively analyzes 681866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 10 of 13

0.4.2

---------------------------

- compatibility.raise_from; compatibility across py2k/py3k for doing py3k
raise EXCEPTION from CAUSE; see pep3134. Primarily for raising an exception
which was caused by another (casting an exception essentially).

- added klass.cached_property, and fixed klass.jit_attr to block bad usage
that goes recursive.

- add distutils_extension for building sphinx docs

- if the invoking python has issue 7604 fixed, then use a fast single lookup
version of delitem for slotted instances; else use the normal double lookup
workaround.

0.4.1

---------------------------

- issue 7567; python2.7.1 reintroduces it (2.7 lacked it). Gentoo bug 350215.

- snakeoil.unittest_extensions was split out from distutils_extensions.

- snakeoil.obj.make_SlottedDict_kls moved to mappings; it'll be removed from
snakeoil.obj in 0.5.

- currying.alias_class_method is now deprecated; use klass.alias_method
instead.

- handle differing lib2to3 dependant on multiprocessing existance.

0.4

-------------------------

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

0.3.7

---------------------------

- detect python bug 4660, and disable parallelization in 2to3 conversion if
the system suffers from it. This fixes an occasional "task_not_done"
ValueError.

- minor optimization to TerminfoFormatters to cache and reuse TerminfoColor.
Exempting the formatter, Terminfo* objects are now immutable

- snakeoil.mappings.defaultdict; compatibility implementation, defaults to
collections.defaultdict for >=python-2.5, a native python implementation
for 2.4

0.3.6.5

-----------------------------

- add discard method to AtomicWriteFile to intentionally discard the
updated content.

- fix initialization of RefCountingSet to set the refcount correctly on
duplicate keys

0.3.6.4

-----------------------------

- fix rare segfault potential with cpython generic_equality __eq__/__ne__
when it's blindly transferred across classes.

- fix py3k handling of terminfo entries- xterm for example was affected.

Page 10 of 13

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.