Skip to content

v0.11.1

Choose a tag to compare

@github-actions github-actions released this 19 Jun 11:20
· 20 commits to master since this release
v0.11.1
149a1d1

Features

  • snakeoil.klass.memoize contains a modern rewrite of snakeoil.caching.WeakInstMeta.
    To migrate, just switch from setting the metaclass to the old, and inherit
    memoize.WeaklyCached. If this is ABC, inherit WeaklyCachedABC. This version now
    supports inheritance of toleration of uncachable arguments, defaulting to cache enabled or
    disabled based on the parent, and passing directives via the now standard class inherit
    approach of class foon(blah, x=1, y=2).

API deprecations

  • snakeoil.caching. Please migrate to snakeoil.klass.memoize.WeaklyCached instead.
    Removal in 0.12.0.
  • snakeoil.sequences.predicate_split. snakeoil.iterables.partition is
    the iterable equivalent. Use that instead. Removal in 0.12.0.
  • snakeoil.contexts.patch. Use unittest.mock.patch instead. Removal in 0.12.0.
  • snakeoil.contexts.syspath. Use snakeoil.modules.import_module_from_path for
    runtime usage, or snakeoil.test.python_namespace.protect_imports in tests.
    Removal in 0.12.0.

API removals

  • snakeoil.contexts.SplitExec: Removed due to deep coupling with CPython internals
    that proved fragile across environments. No maintained replacement is provided;
    use a subprocess if isolated execution is needed.
  • snakeoil.contexts.Namespace: Removed alongside SplitExec which it depended on.

Changes

  • snakeoil.tools.find_unused_exports has been renamed to snakeoil.tools.imports
    and now uses subcommands. The previous find_unused_exports behavior is available
    as snakeoil-imports find-unused-exports.

Packaging

  • pytest >= 9.0 is now a dependency for tests
  • pytest-subtests is no longer a dependency.