Snakeoil

Latest version: v0.10.8

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

Scan your dependencies

Page 11 of 12

0.3.6.2

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

- overhauls to 2to3k support; speedup caching by near 16% via moving it into
the process rather then as an external invocation. Additionally fork the
workers off to of cpus on the system for parallelization when the results
aren't cached.

- force -fno-strict-aliasing to be appended when it's invalidly left out by
distutils internals. See issue 969718 in pythons tracker.
If you're using a non gcc compiler, you'll need to pass
--disable-distutils-flag-fixing to disable the -fno-strict-aliasing
additions.

0.3.6.1

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

- Licensing changes- see COPYING for specifics. Majority of snakeoil
is now GPL2/BSD 3 clause w/ a few exemptions.

- minor cleanup to extensions for GC support and stricter gcc.

0.3.6

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

- add a cpy extension for jit_attr functionality; this brings the
overhead down to effectively background noise for most usages.

- add a reflective_hash class to snakeoil.klass; this is primarily used
for when the has is precomputed and stored somewhere.

- add an extension for ProtectedSet.__contains__; this levels a nice
speedup for pcheck scans.

- enable a set of extensions for slots backed mappings; primarily affects
pkgcore cache data objects, end result being pquery against a full
repo in raw mode is about 8% faster overall.

0.3.5

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

- snakeoil.struct_compat module was added; provides py2.4 compat, and
adds read/write methods that take an fd and operate as unpack/pack
against that fd. This simplifies invocation/stream access primarily.

- add test_slot_shadowing; basically looks for __slots__ usage where
a derivative class adds slotting the parent already provides, thus
leading to a very unfun set of bugs and wasted memory.

- fix test_demandload_usage to properly recurse...

0.3.4

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

- add compatibility.is_py3k_like for marking if it's >=py2.7, or py3k

0.3.3

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

- use the registration framework for epydoc to make it aware of partials.

- monkeypatch pydoc.isdata on the fly to be aware of partials. This
makes pydoc output far more useful (and matches what is expected).

- experimental py3.1 support via 2to3. setup.py automatically will
convert the source if invoked by a py3k interpretter.

- snakeoil.osutils.readlines was expanded out into multiple functions,
utf8, ascii, utf8_strict, ascii_strict, and bytes. 'Strict' means
that we always want it decoded. Non strict is useful when the file
has some utf8 in it you don't care about, and don't want to take
the codecs.open performance hit under py2k. Under py3k, it's always
decoded (required due to py3k changes).

- snakeoil.osutils.readfile was expanded out into multiple functions,
utf8, ascii, ascii_strict, and bytes. Use the appropriate one- this
will make py3k compliance far easier.

- optimization in snakeoil.osutils.readlines; for small files, it's
roughly a 4-8% speedup, for larger files (over half a meg) growing
past 25%. This puts its performance at roughly 2x over the open
equivalent for small files, and near 10-15% faster for larger files.

- snakeoil.klass grew new properties to ease common tasks;
jit_attr (invoke the target func to get the value, cache the value,
return that value till the cached value is wiped).
alias_attr (when that attr is accessed, hand the attribute the alias
targets).

- snakeoil.compatibility additions; next, cmp, file_cls, and is_py3k, next,
intern, sort_cmp (to paper over sorted no longer accepting a cmp arg), and
sort_cmp (to paper over list.sort no longer accepting a cmp arg).

- snakeoil.klass.cached_hash; decorator to automatically cache the results
of the target function. primarily intended for __hash__ implementations.

- snakeoil.klass.inject_richcmp_methods_from_cmp ; passed a class scope,
it'll automatically add __le__, __lt__, __gt__, __eq__, etc, via invoking
__cmp__ if the python version is py3k.

- snakeoil/caching_2to3.py, a caching form of 2to3 that relies on an
env var 'PY2TO3_CACHEDIR' to determine where to store cached versions
of converted source. Algorithm behind the cache is md5 based- if the
md5 of the targeted source exists in the cachedir, it reuses the results
from the previous run instead of invoking 2to3. Massive performance
speed up from this- uncached, setup.py test is ~32s. cached, ~1.9s.
That said, this is experimental- bug reports welcome however.

- setup.py test has been heavily enhanced- now it does its testing
against a standalone install of the source, should have zero
side affects on the underlying source.

- paper over a bug in cElementTree where it fails to import fully, but
doesn't raise ImportError. This address upstream python bug 3475.

- snakeoil no longer installs a bundled copy of elementtree if the
python version is 2.5 or higher (no need, python bundles its own).

- snakeoil.test.test_demandload_usage now supports blacklisting- this
is primarily useful for blocking py3k specific modules from being checked
under py2k, and vice versa.

- in test_demandload_usage helper functionality it's possible for
a file to disappear under its feet- ignore it, lock files from
trial can trigger this. Note it via logging.warn, and continue.

Page 11 of 12

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.